forked from bluesky-social/indigo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverdescribeServer.go
40 lines (32 loc) · 1.8 KB
/
serverdescribeServer.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
package atproto
// schema: com.atproto.server.describeServer
import (
"context"
"github.com/bluesky-social/indigo/xrpc"
)
// ServerDescribeServer_Links is a "links" in the com.atproto.server.describeServer schema.
type ServerDescribeServer_Links struct {
PrivacyPolicy *string `json:"privacyPolicy,omitempty" cborgen:"privacyPolicy,omitempty"`
TermsOfService *string `json:"termsOfService,omitempty" cborgen:"termsOfService,omitempty"`
}
// ServerDescribeServer_Output is the output of a com.atproto.server.describeServer call.
type ServerDescribeServer_Output struct {
// availableUserDomains: List of domain suffixes that can be used in account handles.
AvailableUserDomains []string `json:"availableUserDomains" cborgen:"availableUserDomains"`
Did string `json:"did" cborgen:"did"`
// inviteCodeRequired: If true, an invite code must be supplied to create an account on this instance.
InviteCodeRequired *bool `json:"inviteCodeRequired,omitempty" cborgen:"inviteCodeRequired,omitempty"`
// links: URLs of service policy documents.
Links *ServerDescribeServer_Links `json:"links,omitempty" cborgen:"links,omitempty"`
// phoneVerificationRequired: If true, a phone verification token must be supplied to create an account on this instance.
PhoneVerificationRequired *bool `json:"phoneVerificationRequired,omitempty" cborgen:"phoneVerificationRequired,omitempty"`
}
// ServerDescribeServer calls the XRPC method "com.atproto.server.describeServer".
func ServerDescribeServer(ctx context.Context, c *xrpc.Client) (*ServerDescribeServer_Output, error) {
var out ServerDescribeServer_Output
if err := c.Do(ctx, xrpc.Query, "", "com.atproto.server.describeServer", nil, nil, &out); err != nil {
return nil, err
}
return &out, nil
}