fork of indigo with slightly nicer lexgen
1// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
2
3package atproto
4
5// schema: com.atproto.server.getSession
6
7import (
8 "context"
9
10 "github.com/bluesky-social/indigo/lex/util"
11)
12
13// ServerGetSession_Output is the output of a com.atproto.server.getSession call.
14type ServerGetSession_Output struct {
15 Active *bool `json:"active,omitempty" cborgen:"active,omitempty"`
16 Did string `json:"did" cborgen:"did"`
17 DidDoc *interface{} `json:"didDoc,omitempty" cborgen:"didDoc,omitempty"`
18 Email *string `json:"email,omitempty" cborgen:"email,omitempty"`
19 EmailAuthFactor *bool `json:"emailAuthFactor,omitempty" cborgen:"emailAuthFactor,omitempty"`
20 EmailConfirmed *bool `json:"emailConfirmed,omitempty" cborgen:"emailConfirmed,omitempty"`
21 Handle string `json:"handle" cborgen:"handle"`
22 // status: If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted.
23 Status *string `json:"status,omitempty" cborgen:"status,omitempty"`
24}
25
26// ServerGetSession calls the XRPC method "com.atproto.server.getSession".
27func ServerGetSession(ctx context.Context, c util.LexClient) (*ServerGetSession_Output, error) {
28 var out ServerGetSession_Output
29 if err := c.LexDo(ctx, util.Query, "", "com.atproto.server.getSession", nil, nil, &out); err != nil {
30 return nil, err
31 }
32
33 return &out, nil
34}