diff --git a/api/atproto/admindefs.go b/api/atproto/admindefs.go index 061d75b6..b298e958 100644 --- a/api/atproto/admindefs.go +++ b/api/atproto/admindefs.go @@ -5,23 +5,23 @@ package atproto import ( - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // AdminDefs_AccountView is a "accountView" in the com.atproto.admin.defs schema. type AdminDefs_AccountView struct { - DeactivatedAt *string `json:"deactivatedAt,omitempty" cborgen:"deactivatedAt,omitempty"` - Did string `json:"did" cborgen:"did"` - Email *string `json:"email,omitempty" cborgen:"email,omitempty"` - EmailConfirmedAt *string `json:"emailConfirmedAt,omitempty" cborgen:"emailConfirmedAt,omitempty"` - Handle string `json:"handle" cborgen:"handle"` - IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` - InviteNote *string `json:"inviteNote,omitempty" cborgen:"inviteNote,omitempty"` - InvitedBy *ServerDefs_InviteCode `json:"invitedBy,omitempty" cborgen:"invitedBy,omitempty"` - Invites []*ServerDefs_InviteCode `json:"invites,omitempty" cborgen:"invites,omitempty"` - InvitesDisabled *bool `json:"invitesDisabled,omitempty" cborgen:"invitesDisabled,omitempty"` - RelatedRecords []*util.LexiconTypeDecoder `json:"relatedRecords,omitempty" cborgen:"relatedRecords,omitempty"` - ThreatSignatures []*AdminDefs_ThreatSignature `json:"threatSignatures,omitempty" cborgen:"threatSignatures,omitempty"` + DeactivatedAt *string `json:"deactivatedAt,omitempty" cborgen:"deactivatedAt,omitempty"` + Did string `json:"did" cborgen:"did"` + Email *string `json:"email,omitempty" cborgen:"email,omitempty"` + EmailConfirmedAt *string `json:"emailConfirmedAt,omitempty" cborgen:"emailConfirmedAt,omitempty"` + Handle string `json:"handle" cborgen:"handle"` + IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` + InviteNote *string `json:"inviteNote,omitempty" cborgen:"inviteNote,omitempty"` + InvitedBy *ServerDefs_InviteCode `json:"invitedBy,omitempty" cborgen:"invitedBy,omitempty"` + Invites []*ServerDefs_InviteCode `json:"invites,omitempty" cborgen:"invites,omitempty"` + InvitesDisabled *bool `json:"invitesDisabled,omitempty" cborgen:"invitesDisabled,omitempty"` + RelatedRecords []*lexutil.LexiconTypeDecoder `json:"relatedRecords,omitempty" cborgen:"relatedRecords,omitempty"` + ThreatSignatures []*AdminDefs_ThreatSignature `json:"threatSignatures,omitempty" cborgen:"threatSignatures,omitempty"` } // AdminDefs_RepoBlobRef is a "repoBlobRef" in the com.atproto.admin.defs schema. diff --git a/api/atproto/admindeleteAccount.go b/api/atproto/admindeleteAccount.go index f91b778a..73cd28a7 100644 --- a/api/atproto/admindeleteAccount.go +++ b/api/atproto/admindeleteAccount.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // AdminDeleteAccount_Input is the input argument to a com.atproto.admin.deleteAccount call. @@ -16,8 +16,8 @@ type AdminDeleteAccount_Input struct { } // AdminDeleteAccount calls the XRPC method "com.atproto.admin.deleteAccount". -func AdminDeleteAccount(ctx context.Context, c util.LexClient, input *AdminDeleteAccount_Input) error { - if err := c.LexDo(ctx, util.Procedure, "application/json", "com.atproto.admin.deleteAccount", nil, input, nil); err != nil { +func AdminDeleteAccount(ctx context.Context, c lexutil.LexClient, input *AdminDeleteAccount_Input) error { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "com.atproto.admin.deleteAccount", nil, input, nil); err != nil { return err } diff --git a/api/atproto/admindisableAccountInvites.go b/api/atproto/admindisableAccountInvites.go index 02f1ce75..4881d41f 100644 --- a/api/atproto/admindisableAccountInvites.go +++ b/api/atproto/admindisableAccountInvites.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // AdminDisableAccountInvites_Input is the input argument to a com.atproto.admin.disableAccountInvites call. @@ -18,8 +18,8 @@ type AdminDisableAccountInvites_Input struct { } // AdminDisableAccountInvites calls the XRPC method "com.atproto.admin.disableAccountInvites". -func AdminDisableAccountInvites(ctx context.Context, c util.LexClient, input *AdminDisableAccountInvites_Input) error { - if err := c.LexDo(ctx, util.Procedure, "application/json", "com.atproto.admin.disableAccountInvites", nil, input, nil); err != nil { +func AdminDisableAccountInvites(ctx context.Context, c lexutil.LexClient, input *AdminDisableAccountInvites_Input) error { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "com.atproto.admin.disableAccountInvites", nil, input, nil); err != nil { return err } diff --git a/api/atproto/admindisableInviteCodes.go b/api/atproto/admindisableInviteCodes.go index 6ad5e8c0..4eaf5996 100644 --- a/api/atproto/admindisableInviteCodes.go +++ b/api/atproto/admindisableInviteCodes.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // AdminDisableInviteCodes_Input is the input argument to a com.atproto.admin.disableInviteCodes call. @@ -17,8 +17,8 @@ type AdminDisableInviteCodes_Input struct { } // AdminDisableInviteCodes calls the XRPC method "com.atproto.admin.disableInviteCodes". -func AdminDisableInviteCodes(ctx context.Context, c util.LexClient, input *AdminDisableInviteCodes_Input) error { - if err := c.LexDo(ctx, util.Procedure, "application/json", "com.atproto.admin.disableInviteCodes", nil, input, nil); err != nil { +func AdminDisableInviteCodes(ctx context.Context, c lexutil.LexClient, input *AdminDisableInviteCodes_Input) error { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "com.atproto.admin.disableInviteCodes", nil, input, nil); err != nil { return err } diff --git a/api/atproto/adminenableAccountInvites.go b/api/atproto/adminenableAccountInvites.go index bca0cd79..9aef0983 100644 --- a/api/atproto/adminenableAccountInvites.go +++ b/api/atproto/adminenableAccountInvites.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // AdminEnableAccountInvites_Input is the input argument to a com.atproto.admin.enableAccountInvites call. @@ -18,8 +18,8 @@ type AdminEnableAccountInvites_Input struct { } // AdminEnableAccountInvites calls the XRPC method "com.atproto.admin.enableAccountInvites". -func AdminEnableAccountInvites(ctx context.Context, c util.LexClient, input *AdminEnableAccountInvites_Input) error { - if err := c.LexDo(ctx, util.Procedure, "application/json", "com.atproto.admin.enableAccountInvites", nil, input, nil); err != nil { +func AdminEnableAccountInvites(ctx context.Context, c lexutil.LexClient, input *AdminEnableAccountInvites_Input) error { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "com.atproto.admin.enableAccountInvites", nil, input, nil); err != nil { return err } diff --git a/api/atproto/admingetAccountInfo.go b/api/atproto/admingetAccountInfo.go index 6193ab6f..de3ccb24 100644 --- a/api/atproto/admingetAccountInfo.go +++ b/api/atproto/admingetAccountInfo.go @@ -7,16 +7,16 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // AdminGetAccountInfo calls the XRPC method "com.atproto.admin.getAccountInfo". -func AdminGetAccountInfo(ctx context.Context, c util.LexClient, did string) (*AdminDefs_AccountView, error) { +func AdminGetAccountInfo(ctx context.Context, c lexutil.LexClient, did string) (*AdminDefs_AccountView, error) { var out AdminDefs_AccountView params := map[string]interface{}{} params["did"] = did - if err := c.LexDo(ctx, util.Query, "", "com.atproto.admin.getAccountInfo", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "com.atproto.admin.getAccountInfo", params, nil, &out); err != nil { return nil, err } diff --git a/api/atproto/admingetAccountInfos.go b/api/atproto/admingetAccountInfos.go index 41543957..93318f9e 100644 --- a/api/atproto/admingetAccountInfos.go +++ b/api/atproto/admingetAccountInfos.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // AdminGetAccountInfos_Output is the output of a com.atproto.admin.getAccountInfos call. @@ -16,12 +16,12 @@ type AdminGetAccountInfos_Output struct { } // AdminGetAccountInfos calls the XRPC method "com.atproto.admin.getAccountInfos". -func AdminGetAccountInfos(ctx context.Context, c util.LexClient, dids []string) (*AdminGetAccountInfos_Output, error) { +func AdminGetAccountInfos(ctx context.Context, c lexutil.LexClient, dids []string) (*AdminGetAccountInfos_Output, error) { var out AdminGetAccountInfos_Output params := map[string]interface{}{} params["dids"] = dids - if err := c.LexDo(ctx, util.Query, "", "com.atproto.admin.getAccountInfos", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "com.atproto.admin.getAccountInfos", params, nil, &out); err != nil { return nil, err } diff --git a/api/atproto/admingetInviteCodes.go b/api/atproto/admingetInviteCodes.go index dc51b966..d3e15a7c 100644 --- a/api/atproto/admingetInviteCodes.go +++ b/api/atproto/admingetInviteCodes.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // AdminGetInviteCodes_Output is the output of a com.atproto.admin.getInviteCodes call. @@ -17,7 +17,7 @@ type AdminGetInviteCodes_Output struct { } // AdminGetInviteCodes calls the XRPC method "com.atproto.admin.getInviteCodes". -func AdminGetInviteCodes(ctx context.Context, c util.LexClient, cursor string, limit int64, sort string) (*AdminGetInviteCodes_Output, error) { +func AdminGetInviteCodes(ctx context.Context, c lexutil.LexClient, cursor string, limit int64, sort string) (*AdminGetInviteCodes_Output, error) { var out AdminGetInviteCodes_Output params := map[string]interface{}{} @@ -30,7 +30,7 @@ func AdminGetInviteCodes(ctx context.Context, c util.LexClient, cursor string, l if sort != "" { params["sort"] = sort } - if err := c.LexDo(ctx, util.Query, "", "com.atproto.admin.getInviteCodes", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "com.atproto.admin.getInviteCodes", params, nil, &out); err != nil { return nil, err } diff --git a/api/atproto/admingetSubjectStatus.go b/api/atproto/admingetSubjectStatus.go index 0872865b..29c4adcb 100644 --- a/api/atproto/admingetSubjectStatus.go +++ b/api/atproto/admingetSubjectStatus.go @@ -9,7 +9,7 @@ import ( "encoding/json" "fmt" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // AdminGetSubjectStatus_Output is the output of a com.atproto.admin.getSubjectStatus call. @@ -42,7 +42,7 @@ func (t *AdminGetSubjectStatus_Output_Subject) MarshalJSON() ([]byte, error) { } func (t *AdminGetSubjectStatus_Output_Subject) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -57,14 +57,13 @@ func (t *AdminGetSubjectStatus_Output_Subject) UnmarshalJSON(b []byte) error { case "com.atproto.admin.defs#repoBlobRef": t.AdminDefs_RepoBlobRef = new(AdminDefs_RepoBlobRef) return json.Unmarshal(b, t.AdminDefs_RepoBlobRef) - default: return nil } } // AdminGetSubjectStatus calls the XRPC method "com.atproto.admin.getSubjectStatus". -func AdminGetSubjectStatus(ctx context.Context, c util.LexClient, blob string, did string, uri string) (*AdminGetSubjectStatus_Output, error) { +func AdminGetSubjectStatus(ctx context.Context, c lexutil.LexClient, blob string, did string, uri string) (*AdminGetSubjectStatus_Output, error) { var out AdminGetSubjectStatus_Output params := map[string]interface{}{} @@ -77,7 +76,7 @@ func AdminGetSubjectStatus(ctx context.Context, c util.LexClient, blob string, d if uri != "" { params["uri"] = uri } - if err := c.LexDo(ctx, util.Query, "", "com.atproto.admin.getSubjectStatus", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "com.atproto.admin.getSubjectStatus", params, nil, &out); err != nil { return nil, err } diff --git a/api/atproto/adminsearchAccounts.go b/api/atproto/adminsearchAccounts.go index f74ed522..fa43fb1e 100644 --- a/api/atproto/adminsearchAccounts.go +++ b/api/atproto/adminsearchAccounts.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // AdminSearchAccounts_Output is the output of a com.atproto.admin.searchAccounts call. @@ -17,7 +17,7 @@ type AdminSearchAccounts_Output struct { } // AdminSearchAccounts calls the XRPC method "com.atproto.admin.searchAccounts". -func AdminSearchAccounts(ctx context.Context, c util.LexClient, cursor string, email string, limit int64) (*AdminSearchAccounts_Output, error) { +func AdminSearchAccounts(ctx context.Context, c lexutil.LexClient, cursor string, email string, limit int64) (*AdminSearchAccounts_Output, error) { var out AdminSearchAccounts_Output params := map[string]interface{}{} @@ -30,7 +30,7 @@ func AdminSearchAccounts(ctx context.Context, c util.LexClient, cursor string, e if limit != 0 { params["limit"] = limit } - if err := c.LexDo(ctx, util.Query, "", "com.atproto.admin.searchAccounts", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "com.atproto.admin.searchAccounts", params, nil, &out); err != nil { return nil, err } diff --git a/api/atproto/adminsendEmail.go b/api/atproto/adminsendEmail.go index 86bd3049..0dacd5e4 100644 --- a/api/atproto/adminsendEmail.go +++ b/api/atproto/adminsendEmail.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // AdminSendEmail_Input is the input argument to a com.atproto.admin.sendEmail call. @@ -26,9 +26,9 @@ type AdminSendEmail_Output struct { } // AdminSendEmail calls the XRPC method "com.atproto.admin.sendEmail". -func AdminSendEmail(ctx context.Context, c util.LexClient, input *AdminSendEmail_Input) (*AdminSendEmail_Output, error) { +func AdminSendEmail(ctx context.Context, c lexutil.LexClient, input *AdminSendEmail_Input) (*AdminSendEmail_Output, error) { var out AdminSendEmail_Output - if err := c.LexDo(ctx, util.Procedure, "application/json", "com.atproto.admin.sendEmail", nil, input, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "com.atproto.admin.sendEmail", nil, input, &out); err != nil { return nil, err } diff --git a/api/atproto/adminupdateAccountEmail.go b/api/atproto/adminupdateAccountEmail.go index 2ace2a79..ab108f1a 100644 --- a/api/atproto/adminupdateAccountEmail.go +++ b/api/atproto/adminupdateAccountEmail.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // AdminUpdateAccountEmail_Input is the input argument to a com.atproto.admin.updateAccountEmail call. @@ -18,8 +18,8 @@ type AdminUpdateAccountEmail_Input struct { } // AdminUpdateAccountEmail calls the XRPC method "com.atproto.admin.updateAccountEmail". -func AdminUpdateAccountEmail(ctx context.Context, c util.LexClient, input *AdminUpdateAccountEmail_Input) error { - if err := c.LexDo(ctx, util.Procedure, "application/json", "com.atproto.admin.updateAccountEmail", nil, input, nil); err != nil { +func AdminUpdateAccountEmail(ctx context.Context, c lexutil.LexClient, input *AdminUpdateAccountEmail_Input) error { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "com.atproto.admin.updateAccountEmail", nil, input, nil); err != nil { return err } diff --git a/api/atproto/adminupdateAccountHandle.go b/api/atproto/adminupdateAccountHandle.go index 55763fff..46261d95 100644 --- a/api/atproto/adminupdateAccountHandle.go +++ b/api/atproto/adminupdateAccountHandle.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // AdminUpdateAccountHandle_Input is the input argument to a com.atproto.admin.updateAccountHandle call. @@ -17,8 +17,8 @@ type AdminUpdateAccountHandle_Input struct { } // AdminUpdateAccountHandle calls the XRPC method "com.atproto.admin.updateAccountHandle". -func AdminUpdateAccountHandle(ctx context.Context, c util.LexClient, input *AdminUpdateAccountHandle_Input) error { - if err := c.LexDo(ctx, util.Procedure, "application/json", "com.atproto.admin.updateAccountHandle", nil, input, nil); err != nil { +func AdminUpdateAccountHandle(ctx context.Context, c lexutil.LexClient, input *AdminUpdateAccountHandle_Input) error { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "com.atproto.admin.updateAccountHandle", nil, input, nil); err != nil { return err } diff --git a/api/atproto/adminupdateAccountPassword.go b/api/atproto/adminupdateAccountPassword.go index e4e0ad9a..446719af 100644 --- a/api/atproto/adminupdateAccountPassword.go +++ b/api/atproto/adminupdateAccountPassword.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // AdminUpdateAccountPassword_Input is the input argument to a com.atproto.admin.updateAccountPassword call. @@ -17,8 +17,8 @@ type AdminUpdateAccountPassword_Input struct { } // AdminUpdateAccountPassword calls the XRPC method "com.atproto.admin.updateAccountPassword". -func AdminUpdateAccountPassword(ctx context.Context, c util.LexClient, input *AdminUpdateAccountPassword_Input) error { - if err := c.LexDo(ctx, util.Procedure, "application/json", "com.atproto.admin.updateAccountPassword", nil, input, nil); err != nil { +func AdminUpdateAccountPassword(ctx context.Context, c lexutil.LexClient, input *AdminUpdateAccountPassword_Input) error { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "com.atproto.admin.updateAccountPassword", nil, input, nil); err != nil { return err } diff --git a/api/atproto/adminupdateAccountSigningKey.go b/api/atproto/adminupdateAccountSigningKey.go index bfa2ba86..cd73d287 100644 --- a/api/atproto/adminupdateAccountSigningKey.go +++ b/api/atproto/adminupdateAccountSigningKey.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // AdminUpdateAccountSigningKey_Input is the input argument to a com.atproto.admin.updateAccountSigningKey call. @@ -18,8 +18,8 @@ type AdminUpdateAccountSigningKey_Input struct { } // AdminUpdateAccountSigningKey calls the XRPC method "com.atproto.admin.updateAccountSigningKey". -func AdminUpdateAccountSigningKey(ctx context.Context, c util.LexClient, input *AdminUpdateAccountSigningKey_Input) error { - if err := c.LexDo(ctx, util.Procedure, "application/json", "com.atproto.admin.updateAccountSigningKey", nil, input, nil); err != nil { +func AdminUpdateAccountSigningKey(ctx context.Context, c lexutil.LexClient, input *AdminUpdateAccountSigningKey_Input) error { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "com.atproto.admin.updateAccountSigningKey", nil, input, nil); err != nil { return err } diff --git a/api/atproto/adminupdateSubjectStatus.go b/api/atproto/adminupdateSubjectStatus.go index ff079c59..610c8ac6 100644 --- a/api/atproto/adminupdateSubjectStatus.go +++ b/api/atproto/adminupdateSubjectStatus.go @@ -9,7 +9,7 @@ import ( "encoding/json" "fmt" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // AdminUpdateSubjectStatus_Input is the input argument to a com.atproto.admin.updateSubjectStatus call. @@ -42,7 +42,7 @@ func (t *AdminUpdateSubjectStatus_Input_Subject) MarshalJSON() ([]byte, error) { } func (t *AdminUpdateSubjectStatus_Input_Subject) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -57,7 +57,6 @@ func (t *AdminUpdateSubjectStatus_Input_Subject) UnmarshalJSON(b []byte) error { case "com.atproto.admin.defs#repoBlobRef": t.AdminDefs_RepoBlobRef = new(AdminDefs_RepoBlobRef) return json.Unmarshal(b, t.AdminDefs_RepoBlobRef) - default: return nil } @@ -92,7 +91,7 @@ func (t *AdminUpdateSubjectStatus_Output_Subject) MarshalJSON() ([]byte, error) } func (t *AdminUpdateSubjectStatus_Output_Subject) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -107,16 +106,15 @@ func (t *AdminUpdateSubjectStatus_Output_Subject) UnmarshalJSON(b []byte) error case "com.atproto.admin.defs#repoBlobRef": t.AdminDefs_RepoBlobRef = new(AdminDefs_RepoBlobRef) return json.Unmarshal(b, t.AdminDefs_RepoBlobRef) - default: return nil } } // AdminUpdateSubjectStatus calls the XRPC method "com.atproto.admin.updateSubjectStatus". -func AdminUpdateSubjectStatus(ctx context.Context, c util.LexClient, input *AdminUpdateSubjectStatus_Input) (*AdminUpdateSubjectStatus_Output, error) { +func AdminUpdateSubjectStatus(ctx context.Context, c lexutil.LexClient, input *AdminUpdateSubjectStatus_Input) (*AdminUpdateSubjectStatus_Output, error) { var out AdminUpdateSubjectStatus_Output - if err := c.LexDo(ctx, util.Procedure, "application/json", "com.atproto.admin.updateSubjectStatus", nil, input, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "com.atproto.admin.updateSubjectStatus", nil, input, &out); err != nil { return nil, err } diff --git a/api/atproto/identitygetRecommendedDidCredentials.go b/api/atproto/identitygetRecommendedDidCredentials.go index 63172a6d..3a524b1b 100644 --- a/api/atproto/identitygetRecommendedDidCredentials.go +++ b/api/atproto/identitygetRecommendedDidCredentials.go @@ -7,22 +7,22 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // IdentityGetRecommendedDidCredentials_Output is the output of a com.atproto.identity.getRecommendedDidCredentials call. type IdentityGetRecommendedDidCredentials_Output struct { AlsoKnownAs []string `json:"alsoKnownAs,omitempty" cborgen:"alsoKnownAs,omitempty"` // rotationKeys: Recommended rotation keys for PLC dids. Should be undefined (or ignored) for did:webs. - RotationKeys []string `json:"rotationKeys,omitempty" cborgen:"rotationKeys,omitempty"` - Services *util.LexiconTypeDecoder `json:"services,omitempty" cborgen:"services,omitempty"` - VerificationMethods *util.LexiconTypeDecoder `json:"verificationMethods,omitempty" cborgen:"verificationMethods,omitempty"` + RotationKeys []string `json:"rotationKeys,omitempty" cborgen:"rotationKeys,omitempty"` + Services *lexutil.LexiconTypeDecoder `json:"services,omitempty" cborgen:"services,omitempty"` + VerificationMethods *lexutil.LexiconTypeDecoder `json:"verificationMethods,omitempty" cborgen:"verificationMethods,omitempty"` } // IdentityGetRecommendedDidCredentials calls the XRPC method "com.atproto.identity.getRecommendedDidCredentials". -func IdentityGetRecommendedDidCredentials(ctx context.Context, c util.LexClient) (*IdentityGetRecommendedDidCredentials_Output, error) { +func IdentityGetRecommendedDidCredentials(ctx context.Context, c lexutil.LexClient) (*IdentityGetRecommendedDidCredentials_Output, error) { var out IdentityGetRecommendedDidCredentials_Output - if err := c.LexDo(ctx, util.Query, "", "com.atproto.identity.getRecommendedDidCredentials", nil, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "com.atproto.identity.getRecommendedDidCredentials", nil, nil, &out); err != nil { return nil, err } diff --git a/api/atproto/identityrefreshIdentity.go b/api/atproto/identityrefreshIdentity.go index 8d5b1c96..321d8962 100644 --- a/api/atproto/identityrefreshIdentity.go +++ b/api/atproto/identityrefreshIdentity.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // IdentityRefreshIdentity_Input is the input argument to a com.atproto.identity.refreshIdentity call. @@ -16,9 +16,9 @@ type IdentityRefreshIdentity_Input struct { } // IdentityRefreshIdentity calls the XRPC method "com.atproto.identity.refreshIdentity". -func IdentityRefreshIdentity(ctx context.Context, c util.LexClient, input *IdentityRefreshIdentity_Input) (*IdentityDefs_IdentityInfo, error) { +func IdentityRefreshIdentity(ctx context.Context, c lexutil.LexClient, input *IdentityRefreshIdentity_Input) (*IdentityDefs_IdentityInfo, error) { var out IdentityDefs_IdentityInfo - if err := c.LexDo(ctx, util.Procedure, "application/json", "com.atproto.identity.refreshIdentity", nil, input, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "com.atproto.identity.refreshIdentity", nil, input, &out); err != nil { return nil, err } diff --git a/api/atproto/identityrequestPlcOperationSignature.go b/api/atproto/identityrequestPlcOperationSignature.go index a6654098..d5485731 100644 --- a/api/atproto/identityrequestPlcOperationSignature.go +++ b/api/atproto/identityrequestPlcOperationSignature.go @@ -7,12 +7,12 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // IdentityRequestPlcOperationSignature calls the XRPC method "com.atproto.identity.requestPlcOperationSignature". -func IdentityRequestPlcOperationSignature(ctx context.Context, c util.LexClient) error { - if err := c.LexDo(ctx, util.Procedure, "", "com.atproto.identity.requestPlcOperationSignature", nil, nil, nil); err != nil { +func IdentityRequestPlcOperationSignature(ctx context.Context, c lexutil.LexClient) error { + if err := c.LexDo(ctx, lexutil.Procedure, "", "com.atproto.identity.requestPlcOperationSignature", nil, nil, nil); err != nil { return err } diff --git a/api/atproto/identityresolveDid.go b/api/atproto/identityresolveDid.go index 23cedb57..b55abb9c 100644 --- a/api/atproto/identityresolveDid.go +++ b/api/atproto/identityresolveDid.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // IdentityResolveDid_Output is the output of a com.atproto.identity.resolveDid call. @@ -19,12 +19,12 @@ type IdentityResolveDid_Output struct { // IdentityResolveDid calls the XRPC method "com.atproto.identity.resolveDid". // // did: DID to resolve. -func IdentityResolveDid(ctx context.Context, c util.LexClient, did string) (*IdentityResolveDid_Output, error) { +func IdentityResolveDid(ctx context.Context, c lexutil.LexClient, did string) (*IdentityResolveDid_Output, error) { var out IdentityResolveDid_Output params := map[string]interface{}{} params["did"] = did - if err := c.LexDo(ctx, util.Query, "", "com.atproto.identity.resolveDid", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "com.atproto.identity.resolveDid", params, nil, &out); err != nil { return nil, err } diff --git a/api/atproto/identityresolveHandle.go b/api/atproto/identityresolveHandle.go index 1ba08e3d..3e825ebe 100644 --- a/api/atproto/identityresolveHandle.go +++ b/api/atproto/identityresolveHandle.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // IdentityResolveHandle_Output is the output of a com.atproto.identity.resolveHandle call. @@ -18,12 +18,12 @@ type IdentityResolveHandle_Output struct { // IdentityResolveHandle calls the XRPC method "com.atproto.identity.resolveHandle". // // handle: The handle to resolve. -func IdentityResolveHandle(ctx context.Context, c util.LexClient, handle string) (*IdentityResolveHandle_Output, error) { +func IdentityResolveHandle(ctx context.Context, c lexutil.LexClient, handle string) (*IdentityResolveHandle_Output, error) { var out IdentityResolveHandle_Output params := map[string]interface{}{} params["handle"] = handle - if err := c.LexDo(ctx, util.Query, "", "com.atproto.identity.resolveHandle", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "com.atproto.identity.resolveHandle", params, nil, &out); err != nil { return nil, err } diff --git a/api/atproto/identityresolveIdentity.go b/api/atproto/identityresolveIdentity.go index 60198e31..9699d232 100644 --- a/api/atproto/identityresolveIdentity.go +++ b/api/atproto/identityresolveIdentity.go @@ -7,18 +7,18 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // IdentityResolveIdentity calls the XRPC method "com.atproto.identity.resolveIdentity". // // identifier: Handle or DID to resolve. -func IdentityResolveIdentity(ctx context.Context, c util.LexClient, identifier string) (*IdentityDefs_IdentityInfo, error) { +func IdentityResolveIdentity(ctx context.Context, c lexutil.LexClient, identifier string) (*IdentityDefs_IdentityInfo, error) { var out IdentityDefs_IdentityInfo params := map[string]interface{}{} params["identifier"] = identifier - if err := c.LexDo(ctx, util.Query, "", "com.atproto.identity.resolveIdentity", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "com.atproto.identity.resolveIdentity", params, nil, &out); err != nil { return nil, err } diff --git a/api/atproto/identitysignPlcOperation.go b/api/atproto/identitysignPlcOperation.go index 74259229..8c1702a0 100644 --- a/api/atproto/identitysignPlcOperation.go +++ b/api/atproto/identitysignPlcOperation.go @@ -7,29 +7,29 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // IdentitySignPlcOperation_Input is the input argument to a com.atproto.identity.signPlcOperation call. type IdentitySignPlcOperation_Input struct { - AlsoKnownAs []string `json:"alsoKnownAs,omitempty" cborgen:"alsoKnownAs,omitempty"` - RotationKeys []string `json:"rotationKeys,omitempty" cborgen:"rotationKeys,omitempty"` - Services *util.LexiconTypeDecoder `json:"services,omitempty" cborgen:"services,omitempty"` + AlsoKnownAs []string `json:"alsoKnownAs,omitempty" cborgen:"alsoKnownAs,omitempty"` + RotationKeys []string `json:"rotationKeys,omitempty" cborgen:"rotationKeys,omitempty"` + Services *lexutil.LexiconTypeDecoder `json:"services,omitempty" cborgen:"services,omitempty"` // token: A token received through com.atproto.identity.requestPlcOperationSignature - Token *string `json:"token,omitempty" cborgen:"token,omitempty"` - VerificationMethods *util.LexiconTypeDecoder `json:"verificationMethods,omitempty" cborgen:"verificationMethods,omitempty"` + Token *string `json:"token,omitempty" cborgen:"token,omitempty"` + VerificationMethods *lexutil.LexiconTypeDecoder `json:"verificationMethods,omitempty" cborgen:"verificationMethods,omitempty"` } // IdentitySignPlcOperation_Output is the output of a com.atproto.identity.signPlcOperation call. type IdentitySignPlcOperation_Output struct { // operation: A signed DID PLC operation. - Operation *util.LexiconTypeDecoder `json:"operation" cborgen:"operation"` + Operation *lexutil.LexiconTypeDecoder `json:"operation" cborgen:"operation"` } // IdentitySignPlcOperation calls the XRPC method "com.atproto.identity.signPlcOperation". -func IdentitySignPlcOperation(ctx context.Context, c util.LexClient, input *IdentitySignPlcOperation_Input) (*IdentitySignPlcOperation_Output, error) { +func IdentitySignPlcOperation(ctx context.Context, c lexutil.LexClient, input *IdentitySignPlcOperation_Input) (*IdentitySignPlcOperation_Output, error) { var out IdentitySignPlcOperation_Output - if err := c.LexDo(ctx, util.Procedure, "application/json", "com.atproto.identity.signPlcOperation", nil, input, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "com.atproto.identity.signPlcOperation", nil, input, &out); err != nil { return nil, err } diff --git a/api/atproto/identitysubmitPlcOperation.go b/api/atproto/identitysubmitPlcOperation.go index e83f35a9..e5e94716 100644 --- a/api/atproto/identitysubmitPlcOperation.go +++ b/api/atproto/identitysubmitPlcOperation.go @@ -7,17 +7,17 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // IdentitySubmitPlcOperation_Input is the input argument to a com.atproto.identity.submitPlcOperation call. type IdentitySubmitPlcOperation_Input struct { - Operation *util.LexiconTypeDecoder `json:"operation" cborgen:"operation"` + Operation *lexutil.LexiconTypeDecoder `json:"operation" cborgen:"operation"` } // IdentitySubmitPlcOperation calls the XRPC method "com.atproto.identity.submitPlcOperation". -func IdentitySubmitPlcOperation(ctx context.Context, c util.LexClient, input *IdentitySubmitPlcOperation_Input) error { - if err := c.LexDo(ctx, util.Procedure, "application/json", "com.atproto.identity.submitPlcOperation", nil, input, nil); err != nil { +func IdentitySubmitPlcOperation(ctx context.Context, c lexutil.LexClient, input *IdentitySubmitPlcOperation_Input) error { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "com.atproto.identity.submitPlcOperation", nil, input, nil); err != nil { return err } diff --git a/api/atproto/identityupdateHandle.go b/api/atproto/identityupdateHandle.go index 7eb21764..248a1327 100644 --- a/api/atproto/identityupdateHandle.go +++ b/api/atproto/identityupdateHandle.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // IdentityUpdateHandle_Input is the input argument to a com.atproto.identity.updateHandle call. @@ -17,8 +17,8 @@ type IdentityUpdateHandle_Input struct { } // IdentityUpdateHandle calls the XRPC method "com.atproto.identity.updateHandle". -func IdentityUpdateHandle(ctx context.Context, c util.LexClient, input *IdentityUpdateHandle_Input) error { - if err := c.LexDo(ctx, util.Procedure, "application/json", "com.atproto.identity.updateHandle", nil, input, nil); err != nil { +func IdentityUpdateHandle(ctx context.Context, c lexutil.LexClient, input *IdentityUpdateHandle_Input) error { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "com.atproto.identity.updateHandle", nil, input, nil); err != nil { return err } diff --git a/api/atproto/labeldefs.go b/api/atproto/labeldefs.go index 8f290f9a..69008b86 100644 --- a/api/atproto/labeldefs.go +++ b/api/atproto/labeldefs.go @@ -5,7 +5,7 @@ package atproto import ( - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // LabelDefs_Label is a "label" in the com.atproto.label.defs schema. @@ -21,7 +21,7 @@ type LabelDefs_Label struct { // neg: If true, this is a negation label, overwriting a previous label. Neg *bool `json:"neg,omitempty" cborgen:"neg,omitempty"` // sig: Signature of dag-cbor encoded label. - Sig util.LexBytes `json:"sig,omitempty" cborgen:"sig,omitempty"` + Sig lexutil.LexBytes `json:"sig,omitempty" cborgen:"sig,omitempty"` // src: DID of the actor who created this label. Src string `json:"src" cborgen:"src"` // uri: AT URI of the record, repository (account), or other resource that this label applies to. diff --git a/api/atproto/labelqueryLabels.go b/api/atproto/labelqueryLabels.go index bc7cd14a..085139fa 100644 --- a/api/atproto/labelqueryLabels.go +++ b/api/atproto/labelqueryLabels.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // LabelQueryLabels_Output is the output of a com.atproto.label.queryLabels call. @@ -20,7 +20,7 @@ type LabelQueryLabels_Output struct { // // sources: Optional list of label sources (DIDs) to filter on. // uriPatterns: List of AT URI patterns to match (boolean 'OR'). Each may be a prefix (ending with '*'; will match inclusive of the string leading to '*'), or a full URI. -func LabelQueryLabels(ctx context.Context, c util.LexClient, cursor string, limit int64, sources []string, uriPatterns []string) (*LabelQueryLabels_Output, error) { +func LabelQueryLabels(ctx context.Context, c lexutil.LexClient, cursor string, limit int64, sources []string, uriPatterns []string) (*LabelQueryLabels_Output, error) { var out LabelQueryLabels_Output params := map[string]interface{}{} @@ -34,7 +34,7 @@ func LabelQueryLabels(ctx context.Context, c util.LexClient, cursor string, limi params["sources"] = sources } params["uriPatterns"] = uriPatterns - if err := c.LexDo(ctx, util.Query, "", "com.atproto.label.queryLabels", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "com.atproto.label.queryLabels", params, nil, &out); err != nil { return nil, err } diff --git a/api/atproto/lexiconschema.go b/api/atproto/lexiconschema.go index 196babde..d10cba04 100644 --- a/api/atproto/lexiconschema.go +++ b/api/atproto/lexiconschema.go @@ -5,11 +5,11 @@ package atproto import ( - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) func init() { - util.RegisterType("com.atproto.lexicon.schema", &LexiconSchema{}) + lexutil.RegisterType("com.atproto.lexicon.schema", &LexiconSchema{}) } type LexiconSchema struct { diff --git a/api/atproto/moderationcreateReport.go b/api/atproto/moderationcreateReport.go index 5e0b55ac..d017baeb 100644 --- a/api/atproto/moderationcreateReport.go +++ b/api/atproto/moderationcreateReport.go @@ -9,7 +9,7 @@ import ( "encoding/json" "fmt" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ModerationCreateReport_Input is the input argument to a com.atproto.moderation.createReport call. @@ -40,7 +40,7 @@ func (t *ModerationCreateReport_Input_Subject) MarshalJSON() ([]byte, error) { } func (t *ModerationCreateReport_Input_Subject) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -52,7 +52,6 @@ func (t *ModerationCreateReport_Input_Subject) UnmarshalJSON(b []byte) error { case "com.atproto.repo.strongRef": t.RepoStrongRef = new(RepoStrongRef) return json.Unmarshal(b, t.RepoStrongRef) - default: return nil } @@ -96,7 +95,7 @@ func (t *ModerationCreateReport_Output_Subject) MarshalJSON() ([]byte, error) { } func (t *ModerationCreateReport_Output_Subject) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -108,16 +107,15 @@ func (t *ModerationCreateReport_Output_Subject) UnmarshalJSON(b []byte) error { case "com.atproto.repo.strongRef": t.RepoStrongRef = new(RepoStrongRef) return json.Unmarshal(b, t.RepoStrongRef) - default: return nil } } // ModerationCreateReport calls the XRPC method "com.atproto.moderation.createReport". -func ModerationCreateReport(ctx context.Context, c util.LexClient, input *ModerationCreateReport_Input) (*ModerationCreateReport_Output, error) { +func ModerationCreateReport(ctx context.Context, c lexutil.LexClient, input *ModerationCreateReport_Input) (*ModerationCreateReport_Output, error) { var out ModerationCreateReport_Output - if err := c.LexDo(ctx, util.Procedure, "application/json", "com.atproto.moderation.createReport", nil, input, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "com.atproto.moderation.createReport", nil, input, &out); err != nil { return nil, err } diff --git a/api/atproto/repoapplyWrites.go b/api/atproto/repoapplyWrites.go index a16a3c3f..599d2142 100644 --- a/api/atproto/repoapplyWrites.go +++ b/api/atproto/repoapplyWrites.go @@ -9,7 +9,7 @@ import ( "encoding/json" "fmt" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // RepoApplyWrites_Create is a "create" in the com.atproto.repo.applyWrites schema. @@ -19,8 +19,8 @@ type RepoApplyWrites_Create struct { LexiconTypeID string `json:"$type" cborgen:"$type,const=com.atproto.repo.applyWrites#create"` Collection string `json:"collection" cborgen:"collection"` // rkey: NOTE: maxLength is redundant with record-key format. Keeping it temporarily to ensure backwards compatibility. - Rkey *string `json:"rkey,omitempty" cborgen:"rkey,omitempty"` - Value *util.LexiconTypeDecoder `json:"value" cborgen:"value"` + Rkey *string `json:"rkey,omitempty" cborgen:"rkey,omitempty"` + Value *lexutil.LexiconTypeDecoder `json:"value" cborgen:"value"` } // RepoApplyWrites_CreateResult is a "createResult" in the com.atproto.repo.applyWrites schema. @@ -79,7 +79,7 @@ func (t *RepoApplyWrites_Input_Writes_Elem) MarshalJSON() ([]byte, error) { } func (t *RepoApplyWrites_Input_Writes_Elem) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -94,7 +94,6 @@ func (t *RepoApplyWrites_Input_Writes_Elem) UnmarshalJSON(b []byte) error { case "com.atproto.repo.applyWrites#delete": t.RepoApplyWrites_Delete = new(RepoApplyWrites_Delete) return json.Unmarshal(b, t.RepoApplyWrites_Delete) - default: return fmt.Errorf("closed unions must match a listed schema") } @@ -129,7 +128,7 @@ func (t *RepoApplyWrites_Output_Results_Elem) MarshalJSON() ([]byte, error) { } func (t *RepoApplyWrites_Output_Results_Elem) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -144,7 +143,6 @@ func (t *RepoApplyWrites_Output_Results_Elem) UnmarshalJSON(b []byte) error { case "com.atproto.repo.applyWrites#deleteResult": t.RepoApplyWrites_DeleteResult = new(RepoApplyWrites_DeleteResult) return json.Unmarshal(b, t.RepoApplyWrites_DeleteResult) - default: return fmt.Errorf("closed unions must match a listed schema") } @@ -154,10 +152,10 @@ func (t *RepoApplyWrites_Output_Results_Elem) UnmarshalJSON(b []byte) error { // // Operation which updates an existing record. type RepoApplyWrites_Update struct { - LexiconTypeID string `json:"$type" cborgen:"$type,const=com.atproto.repo.applyWrites#update"` - Collection string `json:"collection" cborgen:"collection"` - Rkey string `json:"rkey" cborgen:"rkey"` - Value *util.LexiconTypeDecoder `json:"value" cborgen:"value"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=com.atproto.repo.applyWrites#update"` + Collection string `json:"collection" cborgen:"collection"` + Rkey string `json:"rkey" cborgen:"rkey"` + Value *lexutil.LexiconTypeDecoder `json:"value" cborgen:"value"` } // RepoApplyWrites_UpdateResult is a "updateResult" in the com.atproto.repo.applyWrites schema. @@ -169,9 +167,9 @@ type RepoApplyWrites_UpdateResult struct { } // RepoApplyWrites calls the XRPC method "com.atproto.repo.applyWrites". -func RepoApplyWrites(ctx context.Context, c util.LexClient, input *RepoApplyWrites_Input) (*RepoApplyWrites_Output, error) { +func RepoApplyWrites(ctx context.Context, c lexutil.LexClient, input *RepoApplyWrites_Input) (*RepoApplyWrites_Output, error) { var out RepoApplyWrites_Output - if err := c.LexDo(ctx, util.Procedure, "application/json", "com.atproto.repo.applyWrites", nil, input, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "com.atproto.repo.applyWrites", nil, input, &out); err != nil { return nil, err } diff --git a/api/atproto/repocreateRecord.go b/api/atproto/repocreateRecord.go index 29021cda..fffcf8e0 100644 --- a/api/atproto/repocreateRecord.go +++ b/api/atproto/repocreateRecord.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // RepoCreateRecord_Input is the input argument to a com.atproto.repo.createRecord call. @@ -15,7 +15,7 @@ type RepoCreateRecord_Input struct { // collection: The NSID of the record collection. Collection string `json:"collection" cborgen:"collection"` // record: The record itself. Must contain a $type field. - Record *util.LexiconTypeDecoder `json:"record" cborgen:"record"` + Record *lexutil.LexiconTypeDecoder `json:"record" cborgen:"record"` // repo: The handle or DID of the repo (aka, current account). Repo string `json:"repo" cborgen:"repo"` // rkey: The Record Key. @@ -35,9 +35,9 @@ type RepoCreateRecord_Output struct { } // RepoCreateRecord calls the XRPC method "com.atproto.repo.createRecord". -func RepoCreateRecord(ctx context.Context, c util.LexClient, input *RepoCreateRecord_Input) (*RepoCreateRecord_Output, error) { +func RepoCreateRecord(ctx context.Context, c lexutil.LexClient, input *RepoCreateRecord_Input) (*RepoCreateRecord_Output, error) { var out RepoCreateRecord_Output - if err := c.LexDo(ctx, util.Procedure, "application/json", "com.atproto.repo.createRecord", nil, input, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "com.atproto.repo.createRecord", nil, input, &out); err != nil { return nil, err } diff --git a/api/atproto/repodeleteRecord.go b/api/atproto/repodeleteRecord.go index 9b057193..17d808c2 100644 --- a/api/atproto/repodeleteRecord.go +++ b/api/atproto/repodeleteRecord.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // RepoDeleteRecord_Input is the input argument to a com.atproto.repo.deleteRecord call. @@ -30,9 +30,9 @@ type RepoDeleteRecord_Output struct { } // RepoDeleteRecord calls the XRPC method "com.atproto.repo.deleteRecord". -func RepoDeleteRecord(ctx context.Context, c util.LexClient, input *RepoDeleteRecord_Input) (*RepoDeleteRecord_Output, error) { +func RepoDeleteRecord(ctx context.Context, c lexutil.LexClient, input *RepoDeleteRecord_Input) (*RepoDeleteRecord_Output, error) { var out RepoDeleteRecord_Output - if err := c.LexDo(ctx, util.Procedure, "application/json", "com.atproto.repo.deleteRecord", nil, input, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "com.atproto.repo.deleteRecord", nil, input, &out); err != nil { return nil, err } diff --git a/api/atproto/repodescribeRepo.go b/api/atproto/repodescribeRepo.go index ba5b5c98..178fd94c 100644 --- a/api/atproto/repodescribeRepo.go +++ b/api/atproto/repodescribeRepo.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // RepoDescribeRepo_Output is the output of a com.atproto.repo.describeRepo call. @@ -25,12 +25,12 @@ type RepoDescribeRepo_Output struct { // RepoDescribeRepo calls the XRPC method "com.atproto.repo.describeRepo". // // repo: The handle or DID of the repo. -func RepoDescribeRepo(ctx context.Context, c util.LexClient, repo string) (*RepoDescribeRepo_Output, error) { +func RepoDescribeRepo(ctx context.Context, c lexutil.LexClient, repo string) (*RepoDescribeRepo_Output, error) { var out RepoDescribeRepo_Output params := map[string]interface{}{} params["repo"] = repo - if err := c.LexDo(ctx, util.Query, "", "com.atproto.repo.describeRepo", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "com.atproto.repo.describeRepo", params, nil, &out); err != nil { return nil, err } diff --git a/api/atproto/repogetRecord.go b/api/atproto/repogetRecord.go index 70a14d63..5a40418e 100644 --- a/api/atproto/repogetRecord.go +++ b/api/atproto/repogetRecord.go @@ -7,14 +7,14 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // RepoGetRecord_Output is the output of a com.atproto.repo.getRecord call. type RepoGetRecord_Output struct { - Cid *string `json:"cid,omitempty" cborgen:"cid,omitempty"` - Uri string `json:"uri" cborgen:"uri"` - Value *util.LexiconTypeDecoder `json:"value" cborgen:"value"` + Cid *string `json:"cid,omitempty" cborgen:"cid,omitempty"` + Uri string `json:"uri" cborgen:"uri"` + Value *lexutil.LexiconTypeDecoder `json:"value" cborgen:"value"` } // RepoGetRecord calls the XRPC method "com.atproto.repo.getRecord". @@ -23,7 +23,7 @@ type RepoGetRecord_Output struct { // collection: The NSID of the record collection. // repo: The handle or DID of the repo. // rkey: The Record Key. -func RepoGetRecord(ctx context.Context, c util.LexClient, cid string, collection string, repo string, rkey string) (*RepoGetRecord_Output, error) { +func RepoGetRecord(ctx context.Context, c lexutil.LexClient, cid string, collection string, repo string, rkey string) (*RepoGetRecord_Output, error) { var out RepoGetRecord_Output params := map[string]interface{}{} @@ -33,7 +33,7 @@ func RepoGetRecord(ctx context.Context, c util.LexClient, cid string, collection params["collection"] = collection params["repo"] = repo params["rkey"] = rkey - if err := c.LexDo(ctx, util.Query, "", "com.atproto.repo.getRecord", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "com.atproto.repo.getRecord", params, nil, &out); err != nil { return nil, err } diff --git a/api/atproto/repoimportRepo.go b/api/atproto/repoimportRepo.go index 7705cb9a..8bb16574 100644 --- a/api/atproto/repoimportRepo.go +++ b/api/atproto/repoimportRepo.go @@ -8,12 +8,12 @@ import ( "context" "io" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // RepoImportRepo calls the XRPC method "com.atproto.repo.importRepo". -func RepoImportRepo(ctx context.Context, c util.LexClient, input io.Reader) error { - if err := c.LexDo(ctx, util.Procedure, "application/vnd.ipld.car", "com.atproto.repo.importRepo", nil, input, nil); err != nil { +func RepoImportRepo(ctx context.Context, c lexutil.LexClient, input io.Reader) error { + if err := c.LexDo(ctx, lexutil.Procedure, "application/vnd.ipld.car", "com.atproto.repo.importRepo", nil, input, nil); err != nil { return err } diff --git a/api/atproto/repolistMissingBlobs.go b/api/atproto/repolistMissingBlobs.go index d3b1d73a..2cfaf0e7 100644 --- a/api/atproto/repolistMissingBlobs.go +++ b/api/atproto/repolistMissingBlobs.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // RepoListMissingBlobs_Output is the output of a com.atproto.repo.listMissingBlobs call. @@ -23,7 +23,7 @@ type RepoListMissingBlobs_RecordBlob struct { } // RepoListMissingBlobs calls the XRPC method "com.atproto.repo.listMissingBlobs". -func RepoListMissingBlobs(ctx context.Context, c util.LexClient, cursor string, limit int64) (*RepoListMissingBlobs_Output, error) { +func RepoListMissingBlobs(ctx context.Context, c lexutil.LexClient, cursor string, limit int64) (*RepoListMissingBlobs_Output, error) { var out RepoListMissingBlobs_Output params := map[string]interface{}{} @@ -33,7 +33,7 @@ func RepoListMissingBlobs(ctx context.Context, c util.LexClient, cursor string, if limit != 0 { params["limit"] = limit } - if err := c.LexDo(ctx, util.Query, "", "com.atproto.repo.listMissingBlobs", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "com.atproto.repo.listMissingBlobs", params, nil, &out); err != nil { return nil, err } diff --git a/api/atproto/repolistRecords.go b/api/atproto/repolistRecords.go index 671e7e8b..9e6cabc2 100644 --- a/api/atproto/repolistRecords.go +++ b/api/atproto/repolistRecords.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // RepoListRecords_Output is the output of a com.atproto.repo.listRecords call. @@ -18,9 +18,9 @@ type RepoListRecords_Output struct { // RepoListRecords_Record is a "record" in the com.atproto.repo.listRecords schema. type RepoListRecords_Record struct { - Cid string `json:"cid" cborgen:"cid"` - Uri string `json:"uri" cborgen:"uri"` - Value *util.LexiconTypeDecoder `json:"value" cborgen:"value"` + Cid string `json:"cid" cborgen:"cid"` + Uri string `json:"uri" cborgen:"uri"` + Value *lexutil.LexiconTypeDecoder `json:"value" cborgen:"value"` } // RepoListRecords calls the XRPC method "com.atproto.repo.listRecords". @@ -29,7 +29,7 @@ type RepoListRecords_Record struct { // limit: The number of records to return. // repo: The handle or DID of the repo. // reverse: Flag to reverse the order of the returned records. -func RepoListRecords(ctx context.Context, c util.LexClient, collection string, cursor string, limit int64, repo string, reverse bool) (*RepoListRecords_Output, error) { +func RepoListRecords(ctx context.Context, c lexutil.LexClient, collection string, cursor string, limit int64, repo string, reverse bool) (*RepoListRecords_Output, error) { var out RepoListRecords_Output params := map[string]interface{}{} @@ -44,7 +44,7 @@ func RepoListRecords(ctx context.Context, c util.LexClient, collection string, c if reverse { params["reverse"] = reverse } - if err := c.LexDo(ctx, util.Query, "", "com.atproto.repo.listRecords", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "com.atproto.repo.listRecords", params, nil, &out); err != nil { return nil, err } diff --git a/api/atproto/repoputRecord.go b/api/atproto/repoputRecord.go index 51fe2abb..091a95db 100644 --- a/api/atproto/repoputRecord.go +++ b/api/atproto/repoputRecord.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // RepoPutRecord_Input is the input argument to a com.atproto.repo.putRecord call. @@ -15,7 +15,7 @@ type RepoPutRecord_Input struct { // collection: The NSID of the record collection. Collection string `json:"collection" cborgen:"collection"` // record: The record to write. - Record *util.LexiconTypeDecoder `json:"record" cborgen:"record"` + Record *lexutil.LexiconTypeDecoder `json:"record" cborgen:"record"` // repo: The handle or DID of the repo (aka, current account). Repo string `json:"repo" cborgen:"repo"` // rkey: The Record Key. @@ -37,9 +37,9 @@ type RepoPutRecord_Output struct { } // RepoPutRecord calls the XRPC method "com.atproto.repo.putRecord". -func RepoPutRecord(ctx context.Context, c util.LexClient, input *RepoPutRecord_Input) (*RepoPutRecord_Output, error) { +func RepoPutRecord(ctx context.Context, c lexutil.LexClient, input *RepoPutRecord_Input) (*RepoPutRecord_Output, error) { var out RepoPutRecord_Output - if err := c.LexDo(ctx, util.Procedure, "application/json", "com.atproto.repo.putRecord", nil, input, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "com.atproto.repo.putRecord", nil, input, &out); err != nil { return nil, err } diff --git a/api/atproto/repostrongRef.go b/api/atproto/repostrongRef.go index 6b94b23c..fd465d71 100644 --- a/api/atproto/repostrongRef.go +++ b/api/atproto/repostrongRef.go @@ -5,11 +5,11 @@ package atproto import ( - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) func init() { - util.RegisterType("com.atproto.repo.strongRef#main", &RepoStrongRef{}) + lexutil.RegisterType("com.atproto.repo.strongRef#main", &RepoStrongRef{}) } // RepoStrongRef is a "main" in the com.atproto.repo.strongRef schema. diff --git a/api/atproto/repouploadBlob.go b/api/atproto/repouploadBlob.go index 5380d4da..40deb949 100644 --- a/api/atproto/repouploadBlob.go +++ b/api/atproto/repouploadBlob.go @@ -8,18 +8,18 @@ import ( "context" "io" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // RepoUploadBlob_Output is the output of a com.atproto.repo.uploadBlob call. type RepoUploadBlob_Output struct { - Blob *util.LexBlob `json:"blob" cborgen:"blob"` + Blob *lexutil.LexBlob `json:"blob" cborgen:"blob"` } // RepoUploadBlob calls the XRPC method "com.atproto.repo.uploadBlob". -func RepoUploadBlob(ctx context.Context, c util.LexClient, input io.Reader) (*RepoUploadBlob_Output, error) { +func RepoUploadBlob(ctx context.Context, c lexutil.LexClient, input io.Reader) (*RepoUploadBlob_Output, error) { var out RepoUploadBlob_Output - if err := c.LexDo(ctx, util.Procedure, "*/*", "com.atproto.repo.uploadBlob", nil, input, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "*/*", "com.atproto.repo.uploadBlob", nil, input, &out); err != nil { return nil, err } diff --git a/api/atproto/serveractivateAccount.go b/api/atproto/serveractivateAccount.go index 2d980fa9..ad034472 100644 --- a/api/atproto/serveractivateAccount.go +++ b/api/atproto/serveractivateAccount.go @@ -7,12 +7,12 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ServerActivateAccount calls the XRPC method "com.atproto.server.activateAccount". -func ServerActivateAccount(ctx context.Context, c util.LexClient) error { - if err := c.LexDo(ctx, util.Procedure, "", "com.atproto.server.activateAccount", nil, nil, nil); err != nil { +func ServerActivateAccount(ctx context.Context, c lexutil.LexClient) error { + if err := c.LexDo(ctx, lexutil.Procedure, "", "com.atproto.server.activateAccount", nil, nil, nil); err != nil { return err } diff --git a/api/atproto/servercheckAccountStatus.go b/api/atproto/servercheckAccountStatus.go index c41ba1a7..f307d188 100644 --- a/api/atproto/servercheckAccountStatus.go +++ b/api/atproto/servercheckAccountStatus.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ServerCheckAccountStatus_Output is the output of a com.atproto.server.checkAccountStatus call. @@ -24,9 +24,9 @@ type ServerCheckAccountStatus_Output struct { } // ServerCheckAccountStatus calls the XRPC method "com.atproto.server.checkAccountStatus". -func ServerCheckAccountStatus(ctx context.Context, c util.LexClient) (*ServerCheckAccountStatus_Output, error) { +func ServerCheckAccountStatus(ctx context.Context, c lexutil.LexClient) (*ServerCheckAccountStatus_Output, error) { var out ServerCheckAccountStatus_Output - if err := c.LexDo(ctx, util.Query, "", "com.atproto.server.checkAccountStatus", nil, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "com.atproto.server.checkAccountStatus", nil, nil, &out); err != nil { return nil, err } diff --git a/api/atproto/serverconfirmEmail.go b/api/atproto/serverconfirmEmail.go index 5823b045..aa770735 100644 --- a/api/atproto/serverconfirmEmail.go +++ b/api/atproto/serverconfirmEmail.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ServerConfirmEmail_Input is the input argument to a com.atproto.server.confirmEmail call. @@ -17,8 +17,8 @@ type ServerConfirmEmail_Input struct { } // ServerConfirmEmail calls the XRPC method "com.atproto.server.confirmEmail". -func ServerConfirmEmail(ctx context.Context, c util.LexClient, input *ServerConfirmEmail_Input) error { - if err := c.LexDo(ctx, util.Procedure, "application/json", "com.atproto.server.confirmEmail", nil, input, nil); err != nil { +func ServerConfirmEmail(ctx context.Context, c lexutil.LexClient, input *ServerConfirmEmail_Input) error { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "com.atproto.server.confirmEmail", nil, input, nil); err != nil { return err } diff --git a/api/atproto/servercreateAccount.go b/api/atproto/servercreateAccount.go index 84e07423..8589beea 100644 --- a/api/atproto/servercreateAccount.go +++ b/api/atproto/servercreateAccount.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ServerCreateAccount_Input is the input argument to a com.atproto.server.createAccount call. @@ -42,9 +42,9 @@ type ServerCreateAccount_Output struct { } // ServerCreateAccount calls the XRPC method "com.atproto.server.createAccount". -func ServerCreateAccount(ctx context.Context, c util.LexClient, input *ServerCreateAccount_Input) (*ServerCreateAccount_Output, error) { +func ServerCreateAccount(ctx context.Context, c lexutil.LexClient, input *ServerCreateAccount_Input) (*ServerCreateAccount_Output, error) { var out ServerCreateAccount_Output - if err := c.LexDo(ctx, util.Procedure, "application/json", "com.atproto.server.createAccount", nil, input, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "com.atproto.server.createAccount", nil, input, &out); err != nil { return nil, err } diff --git a/api/atproto/servercreateAppPassword.go b/api/atproto/servercreateAppPassword.go index 8178b550..456231f7 100644 --- a/api/atproto/servercreateAppPassword.go +++ b/api/atproto/servercreateAppPassword.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ServerCreateAppPassword_AppPassword is a "appPassword" in the com.atproto.server.createAppPassword schema. @@ -27,9 +27,9 @@ type ServerCreateAppPassword_Input struct { } // ServerCreateAppPassword calls the XRPC method "com.atproto.server.createAppPassword". -func ServerCreateAppPassword(ctx context.Context, c util.LexClient, input *ServerCreateAppPassword_Input) (*ServerCreateAppPassword_AppPassword, error) { +func ServerCreateAppPassword(ctx context.Context, c lexutil.LexClient, input *ServerCreateAppPassword_Input) (*ServerCreateAppPassword_AppPassword, error) { var out ServerCreateAppPassword_AppPassword - if err := c.LexDo(ctx, util.Procedure, "application/json", "com.atproto.server.createAppPassword", nil, input, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "com.atproto.server.createAppPassword", nil, input, &out); err != nil { return nil, err } diff --git a/api/atproto/servercreateInviteCode.go b/api/atproto/servercreateInviteCode.go index 614fa738..84759b0a 100644 --- a/api/atproto/servercreateInviteCode.go +++ b/api/atproto/servercreateInviteCode.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ServerCreateInviteCode_Input is the input argument to a com.atproto.server.createInviteCode call. @@ -22,9 +22,9 @@ type ServerCreateInviteCode_Output struct { } // ServerCreateInviteCode calls the XRPC method "com.atproto.server.createInviteCode". -func ServerCreateInviteCode(ctx context.Context, c util.LexClient, input *ServerCreateInviteCode_Input) (*ServerCreateInviteCode_Output, error) { +func ServerCreateInviteCode(ctx context.Context, c lexutil.LexClient, input *ServerCreateInviteCode_Input) (*ServerCreateInviteCode_Output, error) { var out ServerCreateInviteCode_Output - if err := c.LexDo(ctx, util.Procedure, "application/json", "com.atproto.server.createInviteCode", nil, input, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "com.atproto.server.createInviteCode", nil, input, &out); err != nil { return nil, err } diff --git a/api/atproto/servercreateInviteCodes.go b/api/atproto/servercreateInviteCodes.go index 4ac1567e..649ac203 100644 --- a/api/atproto/servercreateInviteCodes.go +++ b/api/atproto/servercreateInviteCodes.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ServerCreateInviteCodes_AccountCodes is a "accountCodes" in the com.atproto.server.createInviteCodes schema. @@ -29,9 +29,9 @@ type ServerCreateInviteCodes_Output struct { } // ServerCreateInviteCodes calls the XRPC method "com.atproto.server.createInviteCodes". -func ServerCreateInviteCodes(ctx context.Context, c util.LexClient, input *ServerCreateInviteCodes_Input) (*ServerCreateInviteCodes_Output, error) { +func ServerCreateInviteCodes(ctx context.Context, c lexutil.LexClient, input *ServerCreateInviteCodes_Input) (*ServerCreateInviteCodes_Output, error) { var out ServerCreateInviteCodes_Output - if err := c.LexDo(ctx, util.Procedure, "application/json", "com.atproto.server.createInviteCodes", nil, input, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "com.atproto.server.createInviteCodes", nil, input, &out); err != nil { return nil, err } diff --git a/api/atproto/servercreateSession.go b/api/atproto/servercreateSession.go index d077595d..bd508f9d 100644 --- a/api/atproto/servercreateSession.go +++ b/api/atproto/servercreateSession.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ServerCreateSession_Input is the input argument to a com.atproto.server.createSession call. @@ -36,9 +36,9 @@ type ServerCreateSession_Output struct { } // ServerCreateSession calls the XRPC method "com.atproto.server.createSession". -func ServerCreateSession(ctx context.Context, c util.LexClient, input *ServerCreateSession_Input) (*ServerCreateSession_Output, error) { +func ServerCreateSession(ctx context.Context, c lexutil.LexClient, input *ServerCreateSession_Input) (*ServerCreateSession_Output, error) { var out ServerCreateSession_Output - if err := c.LexDo(ctx, util.Procedure, "application/json", "com.atproto.server.createSession", nil, input, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "com.atproto.server.createSession", nil, input, &out); err != nil { return nil, err } diff --git a/api/atproto/serverdeactivateAccount.go b/api/atproto/serverdeactivateAccount.go index 5d8fe3b8..f48e6388 100644 --- a/api/atproto/serverdeactivateAccount.go +++ b/api/atproto/serverdeactivateAccount.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ServerDeactivateAccount_Input is the input argument to a com.atproto.server.deactivateAccount call. @@ -17,8 +17,8 @@ type ServerDeactivateAccount_Input struct { } // ServerDeactivateAccount calls the XRPC method "com.atproto.server.deactivateAccount". -func ServerDeactivateAccount(ctx context.Context, c util.LexClient, input *ServerDeactivateAccount_Input) error { - if err := c.LexDo(ctx, util.Procedure, "application/json", "com.atproto.server.deactivateAccount", nil, input, nil); err != nil { +func ServerDeactivateAccount(ctx context.Context, c lexutil.LexClient, input *ServerDeactivateAccount_Input) error { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "com.atproto.server.deactivateAccount", nil, input, nil); err != nil { return err } diff --git a/api/atproto/serverdeleteAccount.go b/api/atproto/serverdeleteAccount.go index 3be88e07..ce4e57d8 100644 --- a/api/atproto/serverdeleteAccount.go +++ b/api/atproto/serverdeleteAccount.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ServerDeleteAccount_Input is the input argument to a com.atproto.server.deleteAccount call. @@ -18,8 +18,8 @@ type ServerDeleteAccount_Input struct { } // ServerDeleteAccount calls the XRPC method "com.atproto.server.deleteAccount". -func ServerDeleteAccount(ctx context.Context, c util.LexClient, input *ServerDeleteAccount_Input) error { - if err := c.LexDo(ctx, util.Procedure, "application/json", "com.atproto.server.deleteAccount", nil, input, nil); err != nil { +func ServerDeleteAccount(ctx context.Context, c lexutil.LexClient, input *ServerDeleteAccount_Input) error { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "com.atproto.server.deleteAccount", nil, input, nil); err != nil { return err } diff --git a/api/atproto/serverdeleteSession.go b/api/atproto/serverdeleteSession.go index b0e175cd..adce5390 100644 --- a/api/atproto/serverdeleteSession.go +++ b/api/atproto/serverdeleteSession.go @@ -7,12 +7,12 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ServerDeleteSession calls the XRPC method "com.atproto.server.deleteSession". -func ServerDeleteSession(ctx context.Context, c util.LexClient) error { - if err := c.LexDo(ctx, util.Procedure, "", "com.atproto.server.deleteSession", nil, nil, nil); err != nil { +func ServerDeleteSession(ctx context.Context, c lexutil.LexClient) error { + if err := c.LexDo(ctx, lexutil.Procedure, "", "com.atproto.server.deleteSession", nil, nil, nil); err != nil { return err } diff --git a/api/atproto/serverdescribeServer.go b/api/atproto/serverdescribeServer.go index 03800ca2..76679c0d 100644 --- a/api/atproto/serverdescribeServer.go +++ b/api/atproto/serverdescribeServer.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ServerDescribeServer_Contact is a "contact" in the com.atproto.server.describeServer schema. @@ -37,9 +37,9 @@ type ServerDescribeServer_Output struct { } // ServerDescribeServer calls the XRPC method "com.atproto.server.describeServer". -func ServerDescribeServer(ctx context.Context, c util.LexClient) (*ServerDescribeServer_Output, error) { +func ServerDescribeServer(ctx context.Context, c lexutil.LexClient) (*ServerDescribeServer_Output, error) { var out ServerDescribeServer_Output - if err := c.LexDo(ctx, util.Query, "", "com.atproto.server.describeServer", nil, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "com.atproto.server.describeServer", nil, nil, &out); err != nil { return nil, err } diff --git a/api/atproto/servergetAccountInviteCodes.go b/api/atproto/servergetAccountInviteCodes.go index 8a0dfe21..8841e762 100644 --- a/api/atproto/servergetAccountInviteCodes.go +++ b/api/atproto/servergetAccountInviteCodes.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ServerGetAccountInviteCodes_Output is the output of a com.atproto.server.getAccountInviteCodes call. @@ -18,7 +18,7 @@ type ServerGetAccountInviteCodes_Output struct { // ServerGetAccountInviteCodes calls the XRPC method "com.atproto.server.getAccountInviteCodes". // // createAvailable: Controls whether any new 'earned' but not 'created' invites should be created. -func ServerGetAccountInviteCodes(ctx context.Context, c util.LexClient, createAvailable bool, includeUsed bool) (*ServerGetAccountInviteCodes_Output, error) { +func ServerGetAccountInviteCodes(ctx context.Context, c lexutil.LexClient, createAvailable bool, includeUsed bool) (*ServerGetAccountInviteCodes_Output, error) { var out ServerGetAccountInviteCodes_Output params := map[string]interface{}{} @@ -28,7 +28,7 @@ func ServerGetAccountInviteCodes(ctx context.Context, c util.LexClient, createAv if includeUsed { params["includeUsed"] = includeUsed } - if err := c.LexDo(ctx, util.Query, "", "com.atproto.server.getAccountInviteCodes", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "com.atproto.server.getAccountInviteCodes", params, nil, &out); err != nil { return nil, err } diff --git a/api/atproto/servergetServiceAuth.go b/api/atproto/servergetServiceAuth.go index 5487e503..052744da 100644 --- a/api/atproto/servergetServiceAuth.go +++ b/api/atproto/servergetServiceAuth.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ServerGetServiceAuth_Output is the output of a com.atproto.server.getServiceAuth call. @@ -20,7 +20,7 @@ type ServerGetServiceAuth_Output struct { // aud: The DID of the service that the token will be used to authenticate with // exp: The time in Unix Epoch seconds that the JWT expires. Defaults to 60 seconds in the future. The service may enforce certain time bounds on tokens depending on the requested scope. // lxm: Lexicon (XRPC) method to bind the requested token to -func ServerGetServiceAuth(ctx context.Context, c util.LexClient, aud string, exp int64, lxm string) (*ServerGetServiceAuth_Output, error) { +func ServerGetServiceAuth(ctx context.Context, c lexutil.LexClient, aud string, exp int64, lxm string) (*ServerGetServiceAuth_Output, error) { var out ServerGetServiceAuth_Output params := map[string]interface{}{} @@ -31,7 +31,7 @@ func ServerGetServiceAuth(ctx context.Context, c util.LexClient, aud string, exp if lxm != "" { params["lxm"] = lxm } - if err := c.LexDo(ctx, util.Query, "", "com.atproto.server.getServiceAuth", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "com.atproto.server.getServiceAuth", params, nil, &out); err != nil { return nil, err } diff --git a/api/atproto/servergetSession.go b/api/atproto/servergetSession.go index 13c96b30..323a3189 100644 --- a/api/atproto/servergetSession.go +++ b/api/atproto/servergetSession.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ServerGetSession_Output is the output of a com.atproto.server.getSession call. @@ -24,9 +24,9 @@ type ServerGetSession_Output struct { } // ServerGetSession calls the XRPC method "com.atproto.server.getSession". -func ServerGetSession(ctx context.Context, c util.LexClient) (*ServerGetSession_Output, error) { +func ServerGetSession(ctx context.Context, c lexutil.LexClient) (*ServerGetSession_Output, error) { var out ServerGetSession_Output - if err := c.LexDo(ctx, util.Query, "", "com.atproto.server.getSession", nil, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "com.atproto.server.getSession", nil, nil, &out); err != nil { return nil, err } diff --git a/api/atproto/serverlistAppPasswords.go b/api/atproto/serverlistAppPasswords.go index 398740bb..e5b000b2 100644 --- a/api/atproto/serverlistAppPasswords.go +++ b/api/atproto/serverlistAppPasswords.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ServerListAppPasswords_AppPassword is a "appPassword" in the com.atproto.server.listAppPasswords schema. @@ -23,9 +23,9 @@ type ServerListAppPasswords_Output struct { } // ServerListAppPasswords calls the XRPC method "com.atproto.server.listAppPasswords". -func ServerListAppPasswords(ctx context.Context, c util.LexClient) (*ServerListAppPasswords_Output, error) { +func ServerListAppPasswords(ctx context.Context, c lexutil.LexClient) (*ServerListAppPasswords_Output, error) { var out ServerListAppPasswords_Output - if err := c.LexDo(ctx, util.Query, "", "com.atproto.server.listAppPasswords", nil, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "com.atproto.server.listAppPasswords", nil, nil, &out); err != nil { return nil, err } diff --git a/api/atproto/serverrefreshSession.go b/api/atproto/serverrefreshSession.go index 528dee63..a0a7d91a 100644 --- a/api/atproto/serverrefreshSession.go +++ b/api/atproto/serverrefreshSession.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ServerRefreshSession_Output is the output of a com.atproto.server.refreshSession call. @@ -23,9 +23,9 @@ type ServerRefreshSession_Output struct { } // ServerRefreshSession calls the XRPC method "com.atproto.server.refreshSession". -func ServerRefreshSession(ctx context.Context, c util.LexClient) (*ServerRefreshSession_Output, error) { +func ServerRefreshSession(ctx context.Context, c lexutil.LexClient) (*ServerRefreshSession_Output, error) { var out ServerRefreshSession_Output - if err := c.LexDo(ctx, util.Procedure, "", "com.atproto.server.refreshSession", nil, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "", "com.atproto.server.refreshSession", nil, nil, &out); err != nil { return nil, err } diff --git a/api/atproto/serverrequestAccountDelete.go b/api/atproto/serverrequestAccountDelete.go index b03d45aa..086fb140 100644 --- a/api/atproto/serverrequestAccountDelete.go +++ b/api/atproto/serverrequestAccountDelete.go @@ -7,12 +7,12 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ServerRequestAccountDelete calls the XRPC method "com.atproto.server.requestAccountDelete". -func ServerRequestAccountDelete(ctx context.Context, c util.LexClient) error { - if err := c.LexDo(ctx, util.Procedure, "", "com.atproto.server.requestAccountDelete", nil, nil, nil); err != nil { +func ServerRequestAccountDelete(ctx context.Context, c lexutil.LexClient) error { + if err := c.LexDo(ctx, lexutil.Procedure, "", "com.atproto.server.requestAccountDelete", nil, nil, nil); err != nil { return err } diff --git a/api/atproto/serverrequestEmailConfirmation.go b/api/atproto/serverrequestEmailConfirmation.go index cf9f2168..e96fbd66 100644 --- a/api/atproto/serverrequestEmailConfirmation.go +++ b/api/atproto/serverrequestEmailConfirmation.go @@ -7,12 +7,12 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ServerRequestEmailConfirmation calls the XRPC method "com.atproto.server.requestEmailConfirmation". -func ServerRequestEmailConfirmation(ctx context.Context, c util.LexClient) error { - if err := c.LexDo(ctx, util.Procedure, "", "com.atproto.server.requestEmailConfirmation", nil, nil, nil); err != nil { +func ServerRequestEmailConfirmation(ctx context.Context, c lexutil.LexClient) error { + if err := c.LexDo(ctx, lexutil.Procedure, "", "com.atproto.server.requestEmailConfirmation", nil, nil, nil); err != nil { return err } diff --git a/api/atproto/serverrequestEmailUpdate.go b/api/atproto/serverrequestEmailUpdate.go index d58217c7..e3447acb 100644 --- a/api/atproto/serverrequestEmailUpdate.go +++ b/api/atproto/serverrequestEmailUpdate.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ServerRequestEmailUpdate_Output is the output of a com.atproto.server.requestEmailUpdate call. @@ -16,9 +16,9 @@ type ServerRequestEmailUpdate_Output struct { } // ServerRequestEmailUpdate calls the XRPC method "com.atproto.server.requestEmailUpdate". -func ServerRequestEmailUpdate(ctx context.Context, c util.LexClient) (*ServerRequestEmailUpdate_Output, error) { +func ServerRequestEmailUpdate(ctx context.Context, c lexutil.LexClient) (*ServerRequestEmailUpdate_Output, error) { var out ServerRequestEmailUpdate_Output - if err := c.LexDo(ctx, util.Procedure, "", "com.atproto.server.requestEmailUpdate", nil, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "", "com.atproto.server.requestEmailUpdate", nil, nil, &out); err != nil { return nil, err } diff --git a/api/atproto/serverrequestPasswordReset.go b/api/atproto/serverrequestPasswordReset.go index bd14f264..3a81e01d 100644 --- a/api/atproto/serverrequestPasswordReset.go +++ b/api/atproto/serverrequestPasswordReset.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ServerRequestPasswordReset_Input is the input argument to a com.atproto.server.requestPasswordReset call. @@ -16,8 +16,8 @@ type ServerRequestPasswordReset_Input struct { } // ServerRequestPasswordReset calls the XRPC method "com.atproto.server.requestPasswordReset". -func ServerRequestPasswordReset(ctx context.Context, c util.LexClient, input *ServerRequestPasswordReset_Input) error { - if err := c.LexDo(ctx, util.Procedure, "application/json", "com.atproto.server.requestPasswordReset", nil, input, nil); err != nil { +func ServerRequestPasswordReset(ctx context.Context, c lexutil.LexClient, input *ServerRequestPasswordReset_Input) error { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "com.atproto.server.requestPasswordReset", nil, input, nil); err != nil { return err } diff --git a/api/atproto/serverreserveSigningKey.go b/api/atproto/serverreserveSigningKey.go index cd3c13a9..b2469448 100644 --- a/api/atproto/serverreserveSigningKey.go +++ b/api/atproto/serverreserveSigningKey.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ServerReserveSigningKey_Input is the input argument to a com.atproto.server.reserveSigningKey call. @@ -23,9 +23,9 @@ type ServerReserveSigningKey_Output struct { } // ServerReserveSigningKey calls the XRPC method "com.atproto.server.reserveSigningKey". -func ServerReserveSigningKey(ctx context.Context, c util.LexClient, input *ServerReserveSigningKey_Input) (*ServerReserveSigningKey_Output, error) { +func ServerReserveSigningKey(ctx context.Context, c lexutil.LexClient, input *ServerReserveSigningKey_Input) (*ServerReserveSigningKey_Output, error) { var out ServerReserveSigningKey_Output - if err := c.LexDo(ctx, util.Procedure, "application/json", "com.atproto.server.reserveSigningKey", nil, input, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "com.atproto.server.reserveSigningKey", nil, input, &out); err != nil { return nil, err } diff --git a/api/atproto/serverresetPassword.go b/api/atproto/serverresetPassword.go index 61ffeead..3037fd82 100644 --- a/api/atproto/serverresetPassword.go +++ b/api/atproto/serverresetPassword.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ServerResetPassword_Input is the input argument to a com.atproto.server.resetPassword call. @@ -17,8 +17,8 @@ type ServerResetPassword_Input struct { } // ServerResetPassword calls the XRPC method "com.atproto.server.resetPassword". -func ServerResetPassword(ctx context.Context, c util.LexClient, input *ServerResetPassword_Input) error { - if err := c.LexDo(ctx, util.Procedure, "application/json", "com.atproto.server.resetPassword", nil, input, nil); err != nil { +func ServerResetPassword(ctx context.Context, c lexutil.LexClient, input *ServerResetPassword_Input) error { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "com.atproto.server.resetPassword", nil, input, nil); err != nil { return err } diff --git a/api/atproto/serverrevokeAppPassword.go b/api/atproto/serverrevokeAppPassword.go index dbf74a81..3cba9c49 100644 --- a/api/atproto/serverrevokeAppPassword.go +++ b/api/atproto/serverrevokeAppPassword.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ServerRevokeAppPassword_Input is the input argument to a com.atproto.server.revokeAppPassword call. @@ -16,8 +16,8 @@ type ServerRevokeAppPassword_Input struct { } // ServerRevokeAppPassword calls the XRPC method "com.atproto.server.revokeAppPassword". -func ServerRevokeAppPassword(ctx context.Context, c util.LexClient, input *ServerRevokeAppPassword_Input) error { - if err := c.LexDo(ctx, util.Procedure, "application/json", "com.atproto.server.revokeAppPassword", nil, input, nil); err != nil { +func ServerRevokeAppPassword(ctx context.Context, c lexutil.LexClient, input *ServerRevokeAppPassword_Input) error { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "com.atproto.server.revokeAppPassword", nil, input, nil); err != nil { return err } diff --git a/api/atproto/serverupdateEmail.go b/api/atproto/serverupdateEmail.go index 355047b2..e79fa78e 100644 --- a/api/atproto/serverupdateEmail.go +++ b/api/atproto/serverupdateEmail.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ServerUpdateEmail_Input is the input argument to a com.atproto.server.updateEmail call. @@ -19,8 +19,8 @@ type ServerUpdateEmail_Input struct { } // ServerUpdateEmail calls the XRPC method "com.atproto.server.updateEmail". -func ServerUpdateEmail(ctx context.Context, c util.LexClient, input *ServerUpdateEmail_Input) error { - if err := c.LexDo(ctx, util.Procedure, "application/json", "com.atproto.server.updateEmail", nil, input, nil); err != nil { +func ServerUpdateEmail(ctx context.Context, c lexutil.LexClient, input *ServerUpdateEmail_Input) error { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "com.atproto.server.updateEmail", nil, input, nil); err != nil { return err } diff --git a/api/atproto/syncgetBlob.go b/api/atproto/syncgetBlob.go index 11cd8188..0ce0cef4 100644 --- a/api/atproto/syncgetBlob.go +++ b/api/atproto/syncgetBlob.go @@ -8,20 +8,20 @@ import ( "bytes" "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // SyncGetBlob calls the XRPC method "com.atproto.sync.getBlob". // // cid: The CID of the blob to fetch // did: The DID of the account. -func SyncGetBlob(ctx context.Context, c util.LexClient, cid string, did string) ([]byte, error) { +func SyncGetBlob(ctx context.Context, c lexutil.LexClient, cid string, did string) ([]byte, error) { buf := new(bytes.Buffer) params := map[string]interface{}{} params["cid"] = cid params["did"] = did - if err := c.LexDo(ctx, util.Query, "", "com.atproto.sync.getBlob", params, nil, buf); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "com.atproto.sync.getBlob", params, nil, buf); err != nil { return nil, err } diff --git a/api/atproto/syncgetBlocks.go b/api/atproto/syncgetBlocks.go index fd8c0334..3964c1a1 100644 --- a/api/atproto/syncgetBlocks.go +++ b/api/atproto/syncgetBlocks.go @@ -8,19 +8,19 @@ import ( "bytes" "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // SyncGetBlocks calls the XRPC method "com.atproto.sync.getBlocks". // // did: The DID of the repo. -func SyncGetBlocks(ctx context.Context, c util.LexClient, cids []string, did string) ([]byte, error) { +func SyncGetBlocks(ctx context.Context, c lexutil.LexClient, cids []string, did string) ([]byte, error) { buf := new(bytes.Buffer) params := map[string]interface{}{} params["cids"] = cids params["did"] = did - if err := c.LexDo(ctx, util.Query, "", "com.atproto.sync.getBlocks", params, nil, buf); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "com.atproto.sync.getBlocks", params, nil, buf); err != nil { return nil, err } diff --git a/api/atproto/syncgetCheckout.go b/api/atproto/syncgetCheckout.go index fdd731b9..6c3ba098 100644 --- a/api/atproto/syncgetCheckout.go +++ b/api/atproto/syncgetCheckout.go @@ -8,18 +8,18 @@ import ( "bytes" "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // SyncGetCheckout calls the XRPC method "com.atproto.sync.getCheckout". // // did: The DID of the repo. -func SyncGetCheckout(ctx context.Context, c util.LexClient, did string) ([]byte, error) { +func SyncGetCheckout(ctx context.Context, c lexutil.LexClient, did string) ([]byte, error) { buf := new(bytes.Buffer) params := map[string]interface{}{} params["did"] = did - if err := c.LexDo(ctx, util.Query, "", "com.atproto.sync.getCheckout", params, nil, buf); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "com.atproto.sync.getCheckout", params, nil, buf); err != nil { return nil, err } diff --git a/api/atproto/syncgetHead.go b/api/atproto/syncgetHead.go index 6b523f4a..efb90e36 100644 --- a/api/atproto/syncgetHead.go +++ b/api/atproto/syncgetHead.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // SyncGetHead_Output is the output of a com.atproto.sync.getHead call. @@ -18,12 +18,12 @@ type SyncGetHead_Output struct { // SyncGetHead calls the XRPC method "com.atproto.sync.getHead". // // did: The DID of the repo. -func SyncGetHead(ctx context.Context, c util.LexClient, did string) (*SyncGetHead_Output, error) { +func SyncGetHead(ctx context.Context, c lexutil.LexClient, did string) (*SyncGetHead_Output, error) { var out SyncGetHead_Output params := map[string]interface{}{} params["did"] = did - if err := c.LexDo(ctx, util.Query, "", "com.atproto.sync.getHead", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "com.atproto.sync.getHead", params, nil, &out); err != nil { return nil, err } diff --git a/api/atproto/syncgetHostStatus.go b/api/atproto/syncgetHostStatus.go index 64d3d2ed..08dc4ad4 100644 --- a/api/atproto/syncgetHostStatus.go +++ b/api/atproto/syncgetHostStatus.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // SyncGetHostStatus_Output is the output of a com.atproto.sync.getHostStatus call. @@ -23,12 +23,12 @@ type SyncGetHostStatus_Output struct { // SyncGetHostStatus calls the XRPC method "com.atproto.sync.getHostStatus". // // hostname: Hostname of the host (eg, PDS or relay) being queried. -func SyncGetHostStatus(ctx context.Context, c util.LexClient, hostname string) (*SyncGetHostStatus_Output, error) { +func SyncGetHostStatus(ctx context.Context, c lexutil.LexClient, hostname string) (*SyncGetHostStatus_Output, error) { var out SyncGetHostStatus_Output params := map[string]interface{}{} params["hostname"] = hostname - if err := c.LexDo(ctx, util.Query, "", "com.atproto.sync.getHostStatus", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "com.atproto.sync.getHostStatus", params, nil, &out); err != nil { return nil, err } diff --git a/api/atproto/syncgetLatestCommit.go b/api/atproto/syncgetLatestCommit.go index 5ec47591..7a27b6e8 100644 --- a/api/atproto/syncgetLatestCommit.go +++ b/api/atproto/syncgetLatestCommit.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // SyncGetLatestCommit_Output is the output of a com.atproto.sync.getLatestCommit call. @@ -19,12 +19,12 @@ type SyncGetLatestCommit_Output struct { // SyncGetLatestCommit calls the XRPC method "com.atproto.sync.getLatestCommit". // // did: The DID of the repo. -func SyncGetLatestCommit(ctx context.Context, c util.LexClient, did string) (*SyncGetLatestCommit_Output, error) { +func SyncGetLatestCommit(ctx context.Context, c lexutil.LexClient, did string) (*SyncGetLatestCommit_Output, error) { var out SyncGetLatestCommit_Output params := map[string]interface{}{} params["did"] = did - if err := c.LexDo(ctx, util.Query, "", "com.atproto.sync.getLatestCommit", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "com.atproto.sync.getLatestCommit", params, nil, &out); err != nil { return nil, err } diff --git a/api/atproto/syncgetRecord.go b/api/atproto/syncgetRecord.go index 461d72c8..5c037dda 100644 --- a/api/atproto/syncgetRecord.go +++ b/api/atproto/syncgetRecord.go @@ -8,21 +8,21 @@ import ( "bytes" "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // SyncGetRecord calls the XRPC method "com.atproto.sync.getRecord". // // did: The DID of the repo. // rkey: Record Key -func SyncGetRecord(ctx context.Context, c util.LexClient, collection string, did string, rkey string) ([]byte, error) { +func SyncGetRecord(ctx context.Context, c lexutil.LexClient, collection string, did string, rkey string) ([]byte, error) { buf := new(bytes.Buffer) params := map[string]interface{}{} params["collection"] = collection params["did"] = did params["rkey"] = rkey - if err := c.LexDo(ctx, util.Query, "", "com.atproto.sync.getRecord", params, nil, buf); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "com.atproto.sync.getRecord", params, nil, buf); err != nil { return nil, err } diff --git a/api/atproto/syncgetRepo.go b/api/atproto/syncgetRepo.go index ddd18d43..02794aa3 100644 --- a/api/atproto/syncgetRepo.go +++ b/api/atproto/syncgetRepo.go @@ -8,14 +8,14 @@ import ( "bytes" "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // SyncGetRepo calls the XRPC method "com.atproto.sync.getRepo". // // did: The DID of the repo. // since: The revision ('rev') of the repo to create a diff from. -func SyncGetRepo(ctx context.Context, c util.LexClient, did string, since string) ([]byte, error) { +func SyncGetRepo(ctx context.Context, c lexutil.LexClient, did string, since string) ([]byte, error) { buf := new(bytes.Buffer) params := map[string]interface{}{} @@ -23,7 +23,7 @@ func SyncGetRepo(ctx context.Context, c util.LexClient, did string, since string if since != "" { params["since"] = since } - if err := c.LexDo(ctx, util.Query, "", "com.atproto.sync.getRepo", params, nil, buf); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "com.atproto.sync.getRepo", params, nil, buf); err != nil { return nil, err } diff --git a/api/atproto/syncgetRepoStatus.go b/api/atproto/syncgetRepoStatus.go index 64691831..6799ea1d 100644 --- a/api/atproto/syncgetRepoStatus.go +++ b/api/atproto/syncgetRepoStatus.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // SyncGetRepoStatus_Output is the output of a com.atproto.sync.getRepoStatus call. @@ -23,12 +23,12 @@ type SyncGetRepoStatus_Output struct { // SyncGetRepoStatus calls the XRPC method "com.atproto.sync.getRepoStatus". // // did: The DID of the repo. -func SyncGetRepoStatus(ctx context.Context, c util.LexClient, did string) (*SyncGetRepoStatus_Output, error) { +func SyncGetRepoStatus(ctx context.Context, c lexutil.LexClient, did string) (*SyncGetRepoStatus_Output, error) { var out SyncGetRepoStatus_Output params := map[string]interface{}{} params["did"] = did - if err := c.LexDo(ctx, util.Query, "", "com.atproto.sync.getRepoStatus", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "com.atproto.sync.getRepoStatus", params, nil, &out); err != nil { return nil, err } diff --git a/api/atproto/synclistBlobs.go b/api/atproto/synclistBlobs.go index f4049686..df842b55 100644 --- a/api/atproto/synclistBlobs.go +++ b/api/atproto/synclistBlobs.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // SyncListBlobs_Output is the output of a com.atproto.sync.listBlobs call. @@ -20,7 +20,7 @@ type SyncListBlobs_Output struct { // // did: The DID of the repo. // since: Optional revision of the repo to list blobs since. -func SyncListBlobs(ctx context.Context, c util.LexClient, cursor string, did string, limit int64, since string) (*SyncListBlobs_Output, error) { +func SyncListBlobs(ctx context.Context, c lexutil.LexClient, cursor string, did string, limit int64, since string) (*SyncListBlobs_Output, error) { var out SyncListBlobs_Output params := map[string]interface{}{} @@ -34,7 +34,7 @@ func SyncListBlobs(ctx context.Context, c util.LexClient, cursor string, did str if since != "" { params["since"] = since } - if err := c.LexDo(ctx, util.Query, "", "com.atproto.sync.listBlobs", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "com.atproto.sync.listBlobs", params, nil, &out); err != nil { return nil, err } diff --git a/api/atproto/synclistHosts.go b/api/atproto/synclistHosts.go index bf5abc7f..d0cf8f42 100644 --- a/api/atproto/synclistHosts.go +++ b/api/atproto/synclistHosts.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // SyncListHosts_Host is a "host" in the com.atproto.sync.listHosts schema. @@ -28,7 +28,7 @@ type SyncListHosts_Output struct { } // SyncListHosts calls the XRPC method "com.atproto.sync.listHosts". -func SyncListHosts(ctx context.Context, c util.LexClient, cursor string, limit int64) (*SyncListHosts_Output, error) { +func SyncListHosts(ctx context.Context, c lexutil.LexClient, cursor string, limit int64) (*SyncListHosts_Output, error) { var out SyncListHosts_Output params := map[string]interface{}{} @@ -38,7 +38,7 @@ func SyncListHosts(ctx context.Context, c util.LexClient, cursor string, limit i if limit != 0 { params["limit"] = limit } - if err := c.LexDo(ctx, util.Query, "", "com.atproto.sync.listHosts", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "com.atproto.sync.listHosts", params, nil, &out); err != nil { return nil, err } diff --git a/api/atproto/synclistRepos.go b/api/atproto/synclistRepos.go index 0e518a97..8bae81b8 100644 --- a/api/atproto/synclistRepos.go +++ b/api/atproto/synclistRepos.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // SyncListRepos_Output is the output of a com.atproto.sync.listRepos call. @@ -28,7 +28,7 @@ type SyncListRepos_Repo struct { } // SyncListRepos calls the XRPC method "com.atproto.sync.listRepos". -func SyncListRepos(ctx context.Context, c util.LexClient, cursor string, limit int64) (*SyncListRepos_Output, error) { +func SyncListRepos(ctx context.Context, c lexutil.LexClient, cursor string, limit int64) (*SyncListRepos_Output, error) { var out SyncListRepos_Output params := map[string]interface{}{} @@ -38,7 +38,7 @@ func SyncListRepos(ctx context.Context, c util.LexClient, cursor string, limit i if limit != 0 { params["limit"] = limit } - if err := c.LexDo(ctx, util.Query, "", "com.atproto.sync.listRepos", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "com.atproto.sync.listRepos", params, nil, &out); err != nil { return nil, err } diff --git a/api/atproto/synclistReposByCollection.go b/api/atproto/synclistReposByCollection.go index 60678f7a..9df25f53 100644 --- a/api/atproto/synclistReposByCollection.go +++ b/api/atproto/synclistReposByCollection.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // SyncListReposByCollection_Output is the output of a com.atproto.sync.listReposByCollection call. @@ -24,7 +24,7 @@ type SyncListReposByCollection_Repo struct { // SyncListReposByCollection calls the XRPC method "com.atproto.sync.listReposByCollection". // // limit: Maximum size of response set. Recommend setting a large maximum (1000+) when enumerating large DID lists. -func SyncListReposByCollection(ctx context.Context, c util.LexClient, collection string, cursor string, limit int64) (*SyncListReposByCollection_Output, error) { +func SyncListReposByCollection(ctx context.Context, c lexutil.LexClient, collection string, cursor string, limit int64) (*SyncListReposByCollection_Output, error) { var out SyncListReposByCollection_Output params := map[string]interface{}{} @@ -35,7 +35,7 @@ func SyncListReposByCollection(ctx context.Context, c util.LexClient, collection if limit != 0 { params["limit"] = limit } - if err := c.LexDo(ctx, util.Query, "", "com.atproto.sync.listReposByCollection", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "com.atproto.sync.listReposByCollection", params, nil, &out); err != nil { return nil, err } diff --git a/api/atproto/syncnotifyOfUpdate.go b/api/atproto/syncnotifyOfUpdate.go index 20834f75..c79bf899 100644 --- a/api/atproto/syncnotifyOfUpdate.go +++ b/api/atproto/syncnotifyOfUpdate.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // SyncNotifyOfUpdate_Input is the input argument to a com.atproto.sync.notifyOfUpdate call. @@ -17,8 +17,8 @@ type SyncNotifyOfUpdate_Input struct { } // SyncNotifyOfUpdate calls the XRPC method "com.atproto.sync.notifyOfUpdate". -func SyncNotifyOfUpdate(ctx context.Context, c util.LexClient, input *SyncNotifyOfUpdate_Input) error { - if err := c.LexDo(ctx, util.Procedure, "application/json", "com.atproto.sync.notifyOfUpdate", nil, input, nil); err != nil { +func SyncNotifyOfUpdate(ctx context.Context, c lexutil.LexClient, input *SyncNotifyOfUpdate_Input) error { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "com.atproto.sync.notifyOfUpdate", nil, input, nil); err != nil { return err } diff --git a/api/atproto/syncrequestCrawl.go b/api/atproto/syncrequestCrawl.go index 964a4e36..3e0a470b 100644 --- a/api/atproto/syncrequestCrawl.go +++ b/api/atproto/syncrequestCrawl.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // SyncRequestCrawl_Input is the input argument to a com.atproto.sync.requestCrawl call. @@ -17,8 +17,8 @@ type SyncRequestCrawl_Input struct { } // SyncRequestCrawl calls the XRPC method "com.atproto.sync.requestCrawl". -func SyncRequestCrawl(ctx context.Context, c util.LexClient, input *SyncRequestCrawl_Input) error { - if err := c.LexDo(ctx, util.Procedure, "application/json", "com.atproto.sync.requestCrawl", nil, input, nil); err != nil { +func SyncRequestCrawl(ctx context.Context, c lexutil.LexClient, input *SyncRequestCrawl_Input) error { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "com.atproto.sync.requestCrawl", nil, input, nil); err != nil { return err } diff --git a/api/atproto/syncsubscribeRepos.go b/api/atproto/syncsubscribeRepos.go index 9d728217..39d0c7f3 100644 --- a/api/atproto/syncsubscribeRepos.go +++ b/api/atproto/syncsubscribeRepos.go @@ -5,7 +5,7 @@ package atproto import ( - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // SyncSubscribeRepos_Account is a "account" in the com.atproto.sync.subscribeRepos schema. @@ -25,14 +25,14 @@ type SyncSubscribeRepos_Account struct { // // Represents an update of repository state. Note that empty commits are allowed, which include no repo data changes, but an update to rev and signature. type SyncSubscribeRepos_Commit struct { - Blobs []util.LexLink `json:"blobs" cborgen:"blobs"` + Blobs []lexutil.LexLink `json:"blobs" cborgen:"blobs"` // blocks: CAR file containing relevant blocks, as a diff since the previous repo state. The commit must be included as a block, and the commit block CID must be the first entry in the CAR header 'roots' list. - Blocks util.LexBytes `json:"blocks,omitempty" cborgen:"blocks,omitempty"` + Blocks lexutil.LexBytes `json:"blocks,omitempty" cborgen:"blocks,omitempty"` // commit: Repo commit object CID. - Commit util.LexLink `json:"commit" cborgen:"commit"` + Commit lexutil.LexLink `json:"commit" cborgen:"commit"` Ops []*SyncSubscribeRepos_RepoOp `json:"ops" cborgen:"ops"` // prevData: The root CID of the MST tree for the previous commit from this repo (indicated by the 'since' revision field in this message). Corresponds to the 'data' field in the repo commit object. NOTE: this field is effectively required for the 'inductive' version of firehose. - PrevData *util.LexLink `json:"prevData,omitempty" cborgen:"prevData,omitempty"` + PrevData *lexutil.LexLink `json:"prevData,omitempty" cborgen:"prevData,omitempty"` // rebase: DEPRECATED -- unused Rebase bool `json:"rebase" cborgen:"rebase"` // repo: The repo this event comes from. Note that all other message types name this field 'did'. @@ -72,10 +72,10 @@ type SyncSubscribeRepos_Info struct { type SyncSubscribeRepos_RepoOp struct { Action string `json:"action" cborgen:"action"` // cid: For creates and updates, the new record CID. For deletions, null. - Cid *util.LexLink `json:"cid" cborgen:"cid"` - Path string `json:"path" cborgen:"path"` + Cid *lexutil.LexLink `json:"cid" cborgen:"cid"` + Path string `json:"path" cborgen:"path"` // prev: For updates and deletes, the previous record CID (required for inductive firehose). For creations, field should not be defined. - Prev *util.LexLink `json:"prev,omitempty" cborgen:"prev,omitempty"` + Prev *lexutil.LexLink `json:"prev,omitempty" cborgen:"prev,omitempty"` } // SyncSubscribeRepos_Sync is a "sync" in the com.atproto.sync.subscribeRepos schema. @@ -83,7 +83,7 @@ type SyncSubscribeRepos_RepoOp struct { // Updates the repo to a new state, without necessarily including that state on the firehose. Used to recover from broken commit streams, data loss incidents, or in situations where upstream host does not know recent state of the repository. type SyncSubscribeRepos_Sync struct { // blocks: CAR file containing the commit, as a block. The CAR header must include the commit block CID as the first 'root'. - Blocks util.LexBytes `json:"blocks,omitempty" cborgen:"blocks,omitempty"` + Blocks lexutil.LexBytes `json:"blocks,omitempty" cborgen:"blocks,omitempty"` // did: The account this repo event corresponds to. Must match that in the commit object. Did string `json:"did" cborgen:"did"` // rev: The rev of the commit. This value must match that in the commit object. diff --git a/api/atproto/tempaddReservedHandle.go b/api/atproto/tempaddReservedHandle.go index 9568e8a0..a0b36101 100644 --- a/api/atproto/tempaddReservedHandle.go +++ b/api/atproto/tempaddReservedHandle.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // TempAddReservedHandle_Input is the input argument to a com.atproto.temp.addReservedHandle call. @@ -20,9 +20,9 @@ type TempAddReservedHandle_Output struct { } // TempAddReservedHandle calls the XRPC method "com.atproto.temp.addReservedHandle". -func TempAddReservedHandle(ctx context.Context, c util.LexClient, input *TempAddReservedHandle_Input) (*TempAddReservedHandle_Output, error) { +func TempAddReservedHandle(ctx context.Context, c lexutil.LexClient, input *TempAddReservedHandle_Input) (*TempAddReservedHandle_Output, error) { var out TempAddReservedHandle_Output - if err := c.LexDo(ctx, util.Procedure, "application/json", "com.atproto.temp.addReservedHandle", nil, input, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "com.atproto.temp.addReservedHandle", nil, input, &out); err != nil { return nil, err } diff --git a/api/atproto/tempcheckHandleAvailability.go b/api/atproto/tempcheckHandleAvailability.go index d1d978fe..02d9597e 100644 --- a/api/atproto/tempcheckHandleAvailability.go +++ b/api/atproto/tempcheckHandleAvailability.go @@ -9,7 +9,7 @@ import ( "encoding/json" "fmt" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // TempCheckHandleAvailability_Output is the output of a com.atproto.temp.checkHandleAvailability call. @@ -37,7 +37,7 @@ func (t *TempCheckHandleAvailability_Output_Result) MarshalJSON() ([]byte, error } func (t *TempCheckHandleAvailability_Output_Result) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -49,7 +49,6 @@ func (t *TempCheckHandleAvailability_Output_Result) UnmarshalJSON(b []byte) erro case "com.atproto.temp.checkHandleAvailability#resultUnavailable": t.TempCheckHandleAvailability_ResultUnavailable = new(TempCheckHandleAvailability_ResultUnavailable) return json.Unmarshal(b, t.TempCheckHandleAvailability_ResultUnavailable) - default: return nil } @@ -83,7 +82,7 @@ type TempCheckHandleAvailability_Suggestion struct { // birthDate: User-provided birth date. Might be used to build handle suggestions. // email: User-provided email. Might be used to build handle suggestions. // handle: Tentative handle. Will be checked for availability or used to build handle suggestions. -func TempCheckHandleAvailability(ctx context.Context, c util.LexClient, birthDate string, email string, handle string) (*TempCheckHandleAvailability_Output, error) { +func TempCheckHandleAvailability(ctx context.Context, c lexutil.LexClient, birthDate string, email string, handle string) (*TempCheckHandleAvailability_Output, error) { var out TempCheckHandleAvailability_Output params := map[string]interface{}{} @@ -94,7 +93,7 @@ func TempCheckHandleAvailability(ctx context.Context, c util.LexClient, birthDat params["email"] = email } params["handle"] = handle - if err := c.LexDo(ctx, util.Query, "", "com.atproto.temp.checkHandleAvailability", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "com.atproto.temp.checkHandleAvailability", params, nil, &out); err != nil { return nil, err } diff --git a/api/atproto/tempcheckSignupQueue.go b/api/atproto/tempcheckSignupQueue.go index c201a247..1405a7b5 100644 --- a/api/atproto/tempcheckSignupQueue.go +++ b/api/atproto/tempcheckSignupQueue.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // TempCheckSignupQueue_Output is the output of a com.atproto.temp.checkSignupQueue call. @@ -18,9 +18,9 @@ type TempCheckSignupQueue_Output struct { } // TempCheckSignupQueue calls the XRPC method "com.atproto.temp.checkSignupQueue". -func TempCheckSignupQueue(ctx context.Context, c util.LexClient) (*TempCheckSignupQueue_Output, error) { +func TempCheckSignupQueue(ctx context.Context, c lexutil.LexClient) (*TempCheckSignupQueue_Output, error) { var out TempCheckSignupQueue_Output - if err := c.LexDo(ctx, util.Query, "", "com.atproto.temp.checkSignupQueue", nil, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "com.atproto.temp.checkSignupQueue", nil, nil, &out); err != nil { return nil, err } diff --git a/api/atproto/tempdereferenceScope.go b/api/atproto/tempdereferenceScope.go index 9ac5ba08..06c32a71 100644 --- a/api/atproto/tempdereferenceScope.go +++ b/api/atproto/tempdereferenceScope.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // TempDereferenceScope_Output is the output of a com.atproto.temp.dereferenceScope call. @@ -19,12 +19,12 @@ type TempDereferenceScope_Output struct { // TempDereferenceScope calls the XRPC method "com.atproto.temp.dereferenceScope". // // scope: The scope reference (starts with 'ref:') -func TempDereferenceScope(ctx context.Context, c util.LexClient, scope string) (*TempDereferenceScope_Output, error) { +func TempDereferenceScope(ctx context.Context, c lexutil.LexClient, scope string) (*TempDereferenceScope_Output, error) { var out TempDereferenceScope_Output params := map[string]interface{}{} params["scope"] = scope - if err := c.LexDo(ctx, util.Query, "", "com.atproto.temp.dereferenceScope", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "com.atproto.temp.dereferenceScope", params, nil, &out); err != nil { return nil, err } diff --git a/api/atproto/tempfetchLabels.go b/api/atproto/tempfetchLabels.go index e372d6ec..ec62a8d3 100644 --- a/api/atproto/tempfetchLabels.go +++ b/api/atproto/tempfetchLabels.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // TempFetchLabels_Output is the output of a com.atproto.temp.fetchLabels call. @@ -16,7 +16,7 @@ type TempFetchLabels_Output struct { } // TempFetchLabels calls the XRPC method "com.atproto.temp.fetchLabels". -func TempFetchLabels(ctx context.Context, c util.LexClient, limit int64, since int64) (*TempFetchLabels_Output, error) { +func TempFetchLabels(ctx context.Context, c lexutil.LexClient, limit int64, since int64) (*TempFetchLabels_Output, error) { var out TempFetchLabels_Output params := map[string]interface{}{} @@ -26,7 +26,7 @@ func TempFetchLabels(ctx context.Context, c util.LexClient, limit int64, since i if since != 0 { params["since"] = since } - if err := c.LexDo(ctx, util.Query, "", "com.atproto.temp.fetchLabels", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "com.atproto.temp.fetchLabels", params, nil, &out); err != nil { return nil, err } diff --git a/api/atproto/temprequestPhoneVerification.go b/api/atproto/temprequestPhoneVerification.go index d1fa7bc5..a4b27fd6 100644 --- a/api/atproto/temprequestPhoneVerification.go +++ b/api/atproto/temprequestPhoneVerification.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // TempRequestPhoneVerification_Input is the input argument to a com.atproto.temp.requestPhoneVerification call. @@ -16,8 +16,8 @@ type TempRequestPhoneVerification_Input struct { } // TempRequestPhoneVerification calls the XRPC method "com.atproto.temp.requestPhoneVerification". -func TempRequestPhoneVerification(ctx context.Context, c util.LexClient, input *TempRequestPhoneVerification_Input) error { - if err := c.LexDo(ctx, util.Procedure, "application/json", "com.atproto.temp.requestPhoneVerification", nil, input, nil); err != nil { +func TempRequestPhoneVerification(ctx context.Context, c lexutil.LexClient, input *TempRequestPhoneVerification_Input) error { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "com.atproto.temp.requestPhoneVerification", nil, input, nil); err != nil { return err } diff --git a/api/atproto/temprevokeAccountCredentials.go b/api/atproto/temprevokeAccountCredentials.go index 00864e62..6bfdf58b 100644 --- a/api/atproto/temprevokeAccountCredentials.go +++ b/api/atproto/temprevokeAccountCredentials.go @@ -7,7 +7,7 @@ package atproto import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // TempRevokeAccountCredentials_Input is the input argument to a com.atproto.temp.revokeAccountCredentials call. @@ -16,8 +16,8 @@ type TempRevokeAccountCredentials_Input struct { } // TempRevokeAccountCredentials calls the XRPC method "com.atproto.temp.revokeAccountCredentials". -func TempRevokeAccountCredentials(ctx context.Context, c util.LexClient, input *TempRevokeAccountCredentials_Input) error { - if err := c.LexDo(ctx, util.Procedure, "application/json", "com.atproto.temp.revokeAccountCredentials", nil, input, nil); err != nil { +func TempRevokeAccountCredentials(ctx context.Context, c lexutil.LexClient, input *TempRevokeAccountCredentials_Input) error { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "com.atproto.temp.revokeAccountCredentials", nil, input, nil); err != nil { return err } diff --git a/api/bsky/actordefs.go b/api/bsky/actordefs.go index e9e7d5e2..8a582b66 100644 --- a/api/bsky/actordefs.go +++ b/api/bsky/actordefs.go @@ -8,8 +8,8 @@ import ( "encoding/json" "fmt" - comatprototypes "github.com/bluesky-social/indigo/api/atproto" - "github.com/bluesky-social/indigo/lex/util" + comatproto "github.com/bluesky-social/indigo/api/atproto" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ActorDefs_AdultContentPref is a "adultContentPref" in the app.bsky.actor.defs schema. @@ -161,7 +161,7 @@ func (t *ActorDefs_PostInteractionSettingsPref_PostgateEmbeddingRules_Elem) Mars } func (t *ActorDefs_PostInteractionSettingsPref_PostgateEmbeddingRules_Elem) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -170,7 +170,6 @@ func (t *ActorDefs_PostInteractionSettingsPref_PostgateEmbeddingRules_Elem) Unma case "app.bsky.feed.postgate#disableRule": t.FeedPostgate_DisableRule = new(FeedPostgate_DisableRule) return json.Unmarshal(b, t.FeedPostgate_DisableRule) - default: return nil } @@ -204,7 +203,7 @@ func (t *ActorDefs_PostInteractionSettingsPref_ThreadgateAllowRules_Elem) Marsha } func (t *ActorDefs_PostInteractionSettingsPref_ThreadgateAllowRules_Elem) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -222,7 +221,6 @@ func (t *ActorDefs_PostInteractionSettingsPref_ThreadgateAllowRules_Elem) Unmars case "app.bsky.feed.threadgate#listRule": t.FeedThreadgate_ListRule = new(FeedThreadgate_ListRule) return json.Unmarshal(b, t.FeedThreadgate_ListRule) - default: return nil } @@ -306,7 +304,7 @@ func (t *ActorDefs_Preferences_Elem) MarshalJSON() ([]byte, error) { } func (t *ActorDefs_Preferences_Elem) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -354,7 +352,6 @@ func (t *ActorDefs_Preferences_Elem) UnmarshalJSON(b []byte) error { case "app.bsky.actor.defs#verificationPrefs": t.ActorDefs_VerificationPrefs = new(ActorDefs_VerificationPrefs) return json.Unmarshal(b, t.ActorDefs_VerificationPrefs) - default: return nil } @@ -382,58 +379,58 @@ type ActorDefs_ProfileAssociatedChat struct { // ActorDefs_ProfileView is a "profileView" in the app.bsky.actor.defs schema. type ActorDefs_ProfileView struct { - Associated *ActorDefs_ProfileAssociated `json:"associated,omitempty" cborgen:"associated,omitempty"` - Avatar *string `json:"avatar,omitempty" cborgen:"avatar,omitempty"` - CreatedAt *string `json:"createdAt,omitempty" cborgen:"createdAt,omitempty"` - Description *string `json:"description,omitempty" cborgen:"description,omitempty"` - Did string `json:"did" cborgen:"did"` - DisplayName *string `json:"displayName,omitempty" cborgen:"displayName,omitempty"` - Handle string `json:"handle" cborgen:"handle"` - IndexedAt *string `json:"indexedAt,omitempty" cborgen:"indexedAt,omitempty"` - Labels []*comatprototypes.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` - Pronouns *string `json:"pronouns,omitempty" cborgen:"pronouns,omitempty"` - Status *ActorDefs_StatusView `json:"status,omitempty" cborgen:"status,omitempty"` - Verification *ActorDefs_VerificationState `json:"verification,omitempty" cborgen:"verification,omitempty"` - Viewer *ActorDefs_ViewerState `json:"viewer,omitempty" cborgen:"viewer,omitempty"` + Associated *ActorDefs_ProfileAssociated `json:"associated,omitempty" cborgen:"associated,omitempty"` + Avatar *string `json:"avatar,omitempty" cborgen:"avatar,omitempty"` + CreatedAt *string `json:"createdAt,omitempty" cborgen:"createdAt,omitempty"` + Description *string `json:"description,omitempty" cborgen:"description,omitempty"` + Did string `json:"did" cborgen:"did"` + DisplayName *string `json:"displayName,omitempty" cborgen:"displayName,omitempty"` + Handle string `json:"handle" cborgen:"handle"` + IndexedAt *string `json:"indexedAt,omitempty" cborgen:"indexedAt,omitempty"` + Labels []*comatproto.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` + Pronouns *string `json:"pronouns,omitempty" cborgen:"pronouns,omitempty"` + Status *ActorDefs_StatusView `json:"status,omitempty" cborgen:"status,omitempty"` + Verification *ActorDefs_VerificationState `json:"verification,omitempty" cborgen:"verification,omitempty"` + Viewer *ActorDefs_ViewerState `json:"viewer,omitempty" cborgen:"viewer,omitempty"` } // ActorDefs_ProfileViewBasic is a "profileViewBasic" in the app.bsky.actor.defs schema. type ActorDefs_ProfileViewBasic struct { - Associated *ActorDefs_ProfileAssociated `json:"associated,omitempty" cborgen:"associated,omitempty"` - Avatar *string `json:"avatar,omitempty" cborgen:"avatar,omitempty"` - CreatedAt *string `json:"createdAt,omitempty" cborgen:"createdAt,omitempty"` - Did string `json:"did" cborgen:"did"` - DisplayName *string `json:"displayName,omitempty" cborgen:"displayName,omitempty"` - Handle string `json:"handle" cborgen:"handle"` - Labels []*comatprototypes.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` - Pronouns *string `json:"pronouns,omitempty" cborgen:"pronouns,omitempty"` - Status *ActorDefs_StatusView `json:"status,omitempty" cborgen:"status,omitempty"` - Verification *ActorDefs_VerificationState `json:"verification,omitempty" cborgen:"verification,omitempty"` - Viewer *ActorDefs_ViewerState `json:"viewer,omitempty" cborgen:"viewer,omitempty"` + Associated *ActorDefs_ProfileAssociated `json:"associated,omitempty" cborgen:"associated,omitempty"` + Avatar *string `json:"avatar,omitempty" cborgen:"avatar,omitempty"` + CreatedAt *string `json:"createdAt,omitempty" cborgen:"createdAt,omitempty"` + Did string `json:"did" cborgen:"did"` + DisplayName *string `json:"displayName,omitempty" cborgen:"displayName,omitempty"` + Handle string `json:"handle" cborgen:"handle"` + Labels []*comatproto.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` + Pronouns *string `json:"pronouns,omitempty" cborgen:"pronouns,omitempty"` + Status *ActorDefs_StatusView `json:"status,omitempty" cborgen:"status,omitempty"` + Verification *ActorDefs_VerificationState `json:"verification,omitempty" cborgen:"verification,omitempty"` + Viewer *ActorDefs_ViewerState `json:"viewer,omitempty" cborgen:"viewer,omitempty"` } // ActorDefs_ProfileViewDetailed is a "profileViewDetailed" in the app.bsky.actor.defs schema. type ActorDefs_ProfileViewDetailed struct { - Associated *ActorDefs_ProfileAssociated `json:"associated,omitempty" cborgen:"associated,omitempty"` - Avatar *string `json:"avatar,omitempty" cborgen:"avatar,omitempty"` - Banner *string `json:"banner,omitempty" cborgen:"banner,omitempty"` - CreatedAt *string `json:"createdAt,omitempty" cborgen:"createdAt,omitempty"` - Description *string `json:"description,omitempty" cborgen:"description,omitempty"` - Did string `json:"did" cborgen:"did"` - DisplayName *string `json:"displayName,omitempty" cborgen:"displayName,omitempty"` - FollowersCount *int64 `json:"followersCount,omitempty" cborgen:"followersCount,omitempty"` - FollowsCount *int64 `json:"followsCount,omitempty" cborgen:"followsCount,omitempty"` - Handle string `json:"handle" cborgen:"handle"` - IndexedAt *string `json:"indexedAt,omitempty" cborgen:"indexedAt,omitempty"` - JoinedViaStarterPack *GraphDefs_StarterPackViewBasic `json:"joinedViaStarterPack,omitempty" cborgen:"joinedViaStarterPack,omitempty"` - Labels []*comatprototypes.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` - PinnedPost *comatprototypes.RepoStrongRef `json:"pinnedPost,omitempty" cborgen:"pinnedPost,omitempty"` - PostsCount *int64 `json:"postsCount,omitempty" cborgen:"postsCount,omitempty"` - Pronouns *string `json:"pronouns,omitempty" cborgen:"pronouns,omitempty"` - Status *ActorDefs_StatusView `json:"status,omitempty" cborgen:"status,omitempty"` - Verification *ActorDefs_VerificationState `json:"verification,omitempty" cborgen:"verification,omitempty"` - Viewer *ActorDefs_ViewerState `json:"viewer,omitempty" cborgen:"viewer,omitempty"` - Website *string `json:"website,omitempty" cborgen:"website,omitempty"` + Associated *ActorDefs_ProfileAssociated `json:"associated,omitempty" cborgen:"associated,omitempty"` + Avatar *string `json:"avatar,omitempty" cborgen:"avatar,omitempty"` + Banner *string `json:"banner,omitempty" cborgen:"banner,omitempty"` + CreatedAt *string `json:"createdAt,omitempty" cborgen:"createdAt,omitempty"` + Description *string `json:"description,omitempty" cborgen:"description,omitempty"` + Did string `json:"did" cborgen:"did"` + DisplayName *string `json:"displayName,omitempty" cborgen:"displayName,omitempty"` + FollowersCount *int64 `json:"followersCount,omitempty" cborgen:"followersCount,omitempty"` + FollowsCount *int64 `json:"followsCount,omitempty" cborgen:"followsCount,omitempty"` + Handle string `json:"handle" cborgen:"handle"` + IndexedAt *string `json:"indexedAt,omitempty" cborgen:"indexedAt,omitempty"` + JoinedViaStarterPack *GraphDefs_StarterPackViewBasic `json:"joinedViaStarterPack,omitempty" cborgen:"joinedViaStarterPack,omitempty"` + Labels []*comatproto.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` + PinnedPost *comatproto.RepoStrongRef `json:"pinnedPost,omitempty" cborgen:"pinnedPost,omitempty"` + PostsCount *int64 `json:"postsCount,omitempty" cborgen:"postsCount,omitempty"` + Pronouns *string `json:"pronouns,omitempty" cborgen:"pronouns,omitempty"` + Status *ActorDefs_StatusView `json:"status,omitempty" cborgen:"status,omitempty"` + Verification *ActorDefs_VerificationState `json:"verification,omitempty" cborgen:"verification,omitempty"` + Viewer *ActorDefs_ViewerState `json:"viewer,omitempty" cborgen:"viewer,omitempty"` + Website *string `json:"website,omitempty" cborgen:"website,omitempty"` } // ActorDefs_SavedFeed is a "savedFeed" in the app.bsky.actor.defs schema. @@ -465,8 +462,8 @@ type ActorDefs_StatusView struct { // expiresAt: The date when this status will expire. The application might choose to no longer return the status after expiration. ExpiresAt *string `json:"expiresAt,omitempty" cborgen:"expiresAt,omitempty"` // isActive: True if the status is not expired, false if it is expired. Only present if expiration was set. - IsActive *bool `json:"isActive,omitempty" cborgen:"isActive,omitempty"` - Record *util.LexiconTypeDecoder `json:"record" cborgen:"record"` + IsActive *bool `json:"isActive,omitempty" cborgen:"isActive,omitempty"` + Record *lexutil.LexiconTypeDecoder `json:"record" cborgen:"record"` // status: The status for the account. Status string `json:"status" cborgen:"status"` } @@ -485,7 +482,7 @@ func (t *ActorDefs_StatusView_Embed) MarshalJSON() ([]byte, error) { } func (t *ActorDefs_StatusView_Embed) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -494,7 +491,6 @@ func (t *ActorDefs_StatusView_Embed) UnmarshalJSON(b []byte) error { case "app.bsky.embed.external#view": t.EmbedExternal_View = new(EmbedExternal_View) return json.Unmarshal(b, t.EmbedExternal_View) - default: return nil } diff --git a/api/bsky/actorgetPreferences.go b/api/bsky/actorgetPreferences.go index 1c1faa3b..55fc30ee 100644 --- a/api/bsky/actorgetPreferences.go +++ b/api/bsky/actorgetPreferences.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ActorGetPreferences_Output is the output of a app.bsky.actor.getPreferences call. @@ -16,11 +16,11 @@ type ActorGetPreferences_Output struct { } // ActorGetPreferences calls the XRPC method "app.bsky.actor.getPreferences". -func ActorGetPreferences(ctx context.Context, c util.LexClient) (*ActorGetPreferences_Output, error) { +func ActorGetPreferences(ctx context.Context, c lexutil.LexClient) (*ActorGetPreferences_Output, error) { var out ActorGetPreferences_Output params := map[string]interface{}{} - if err := c.LexDo(ctx, util.Query, "", "app.bsky.actor.getPreferences", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.actor.getPreferences", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/actorgetProfile.go b/api/bsky/actorgetProfile.go index 9adbc693..7550af1f 100644 --- a/api/bsky/actorgetProfile.go +++ b/api/bsky/actorgetProfile.go @@ -7,18 +7,18 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ActorGetProfile calls the XRPC method "app.bsky.actor.getProfile". // // actor: Handle or DID of account to fetch profile of. -func ActorGetProfile(ctx context.Context, c util.LexClient, actor string) (*ActorDefs_ProfileViewDetailed, error) { +func ActorGetProfile(ctx context.Context, c lexutil.LexClient, actor string) (*ActorDefs_ProfileViewDetailed, error) { var out ActorDefs_ProfileViewDetailed params := map[string]interface{}{} params["actor"] = actor - if err := c.LexDo(ctx, util.Query, "", "app.bsky.actor.getProfile", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.actor.getProfile", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/actorgetProfiles.go b/api/bsky/actorgetProfiles.go index b85e286e..9fbcd060 100644 --- a/api/bsky/actorgetProfiles.go +++ b/api/bsky/actorgetProfiles.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ActorGetProfiles_Output is the output of a app.bsky.actor.getProfiles call. @@ -16,12 +16,12 @@ type ActorGetProfiles_Output struct { } // ActorGetProfiles calls the XRPC method "app.bsky.actor.getProfiles". -func ActorGetProfiles(ctx context.Context, c util.LexClient, actors []string) (*ActorGetProfiles_Output, error) { +func ActorGetProfiles(ctx context.Context, c lexutil.LexClient, actors []string) (*ActorGetProfiles_Output, error) { var out ActorGetProfiles_Output params := map[string]interface{}{} params["actors"] = actors - if err := c.LexDo(ctx, util.Query, "", "app.bsky.actor.getProfiles", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.actor.getProfiles", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/actorgetSuggestions.go b/api/bsky/actorgetSuggestions.go index d9d284ad..1647cdb0 100644 --- a/api/bsky/actorgetSuggestions.go +++ b/api/bsky/actorgetSuggestions.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ActorGetSuggestions_Output is the output of a app.bsky.actor.getSuggestions call. @@ -19,7 +19,7 @@ type ActorGetSuggestions_Output struct { } // ActorGetSuggestions calls the XRPC method "app.bsky.actor.getSuggestions". -func ActorGetSuggestions(ctx context.Context, c util.LexClient, cursor string, limit int64) (*ActorGetSuggestions_Output, error) { +func ActorGetSuggestions(ctx context.Context, c lexutil.LexClient, cursor string, limit int64) (*ActorGetSuggestions_Output, error) { var out ActorGetSuggestions_Output params := map[string]interface{}{} @@ -29,7 +29,7 @@ func ActorGetSuggestions(ctx context.Context, c util.LexClient, cursor string, l if limit != 0 { params["limit"] = limit } - if err := c.LexDo(ctx, util.Query, "", "app.bsky.actor.getSuggestions", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.actor.getSuggestions", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/actorprofile.go b/api/bsky/actorprofile.go index 5a34392e..db649985 100644 --- a/api/bsky/actorprofile.go +++ b/api/bsky/actorprofile.go @@ -10,29 +10,29 @@ import ( "fmt" "io" - comatprototypes "github.com/bluesky-social/indigo/api/atproto" - "github.com/bluesky-social/indigo/lex/util" + comatproto "github.com/bluesky-social/indigo/api/atproto" + lexutil "github.com/bluesky-social/indigo/lex/util" cbg "github.com/whyrusleeping/cbor-gen" ) func init() { - util.RegisterType("app.bsky.actor.profile", &ActorProfile{}) + lexutil.RegisterType("app.bsky.actor.profile", &ActorProfile{}) } type ActorProfile struct { LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.actor.profile"` // avatar: Small image to be displayed next to posts from account. AKA, 'profile picture' - Avatar *util.LexBlob `json:"avatar,omitempty" cborgen:"avatar,omitempty"` + Avatar *lexutil.LexBlob `json:"avatar,omitempty" cborgen:"avatar,omitempty"` // banner: Larger horizontal image to display behind profile view. - Banner *util.LexBlob `json:"banner,omitempty" cborgen:"banner,omitempty"` - CreatedAt *string `json:"createdAt,omitempty" cborgen:"createdAt,omitempty"` + Banner *lexutil.LexBlob `json:"banner,omitempty" cborgen:"banner,omitempty"` + CreatedAt *string `json:"createdAt,omitempty" cborgen:"createdAt,omitempty"` // description: Free-form profile description text. - Description *string `json:"description,omitempty" cborgen:"description,omitempty"` - DisplayName *string `json:"displayName,omitempty" cborgen:"displayName,omitempty"` - JoinedViaStarterPack *comatprototypes.RepoStrongRef `json:"joinedViaStarterPack,omitempty" cborgen:"joinedViaStarterPack,omitempty"` + Description *string `json:"description,omitempty" cborgen:"description,omitempty"` + DisplayName *string `json:"displayName,omitempty" cborgen:"displayName,omitempty"` + JoinedViaStarterPack *comatproto.RepoStrongRef `json:"joinedViaStarterPack,omitempty" cborgen:"joinedViaStarterPack,omitempty"` // labels: Self-label values, specific to the Bluesky application, on the overall account. - Labels *ActorProfile_Labels `json:"labels,omitempty" cborgen:"labels,omitempty"` - PinnedPost *comatprototypes.RepoStrongRef `json:"pinnedPost,omitempty" cborgen:"pinnedPost,omitempty"` + Labels *ActorProfile_Labels `json:"labels,omitempty" cborgen:"labels,omitempty"` + PinnedPost *comatproto.RepoStrongRef `json:"pinnedPost,omitempty" cborgen:"pinnedPost,omitempty"` // pronouns: Free-form pronouns text. Pronouns *string `json:"pronouns,omitempty" cborgen:"pronouns,omitempty"` Website *string `json:"website,omitempty" cborgen:"website,omitempty"` @@ -40,7 +40,7 @@ type ActorProfile struct { // Self-label values, specific to the Bluesky application, on the overall account. type ActorProfile_Labels struct { - LabelDefs_SelfLabels *comatprototypes.LabelDefs_SelfLabels + LabelDefs_SelfLabels *comatproto.LabelDefs_SelfLabels } func (t *ActorProfile_Labels) MarshalJSON() ([]byte, error) { @@ -52,16 +52,15 @@ func (t *ActorProfile_Labels) MarshalJSON() ([]byte, error) { } func (t *ActorProfile_Labels) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } switch typ { case "com.atproto.label.defs#selfLabels": - t.LabelDefs_SelfLabels = new(comatprototypes.LabelDefs_SelfLabels) + t.LabelDefs_SelfLabels = new(comatproto.LabelDefs_SelfLabels) return json.Unmarshal(b, t.LabelDefs_SelfLabels) - default: return nil } @@ -78,17 +77,17 @@ func (t *ActorProfile_Labels) MarshalCBOR(w io.Writer) error { } return fmt.Errorf("can not marshal empty union as CBOR") } + func (t *ActorProfile_Labels) UnmarshalCBOR(r io.Reader) error { - typ, b, err := util.CborTypeExtractReader(r) + typ, b, err := lexutil.CborTypeExtractReader(r) if err != nil { return err } switch typ { case "com.atproto.label.defs#selfLabels": - t.LabelDefs_SelfLabels = new(comatprototypes.LabelDefs_SelfLabels) + t.LabelDefs_SelfLabels = new(comatproto.LabelDefs_SelfLabels) return t.LabelDefs_SelfLabels.UnmarshalCBOR(bytes.NewReader(b)) - default: return nil } diff --git a/api/bsky/actorputPreferences.go b/api/bsky/actorputPreferences.go index 4a780b46..27fc1cb1 100644 --- a/api/bsky/actorputPreferences.go +++ b/api/bsky/actorputPreferences.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ActorPutPreferences_Input is the input argument to a app.bsky.actor.putPreferences call. @@ -16,8 +16,8 @@ type ActorPutPreferences_Input struct { } // ActorPutPreferences calls the XRPC method "app.bsky.actor.putPreferences". -func ActorPutPreferences(ctx context.Context, c util.LexClient, input *ActorPutPreferences_Input) error { - if err := c.LexDo(ctx, util.Procedure, "application/json", "app.bsky.actor.putPreferences", nil, input, nil); err != nil { +func ActorPutPreferences(ctx context.Context, c lexutil.LexClient, input *ActorPutPreferences_Input) error { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "app.bsky.actor.putPreferences", nil, input, nil); err != nil { return err } diff --git a/api/bsky/actorsearchActors.go b/api/bsky/actorsearchActors.go index bdb7ac47..6673c5e4 100644 --- a/api/bsky/actorsearchActors.go +++ b/api/bsky/actorsearchActors.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ActorSearchActors_Output is the output of a app.bsky.actor.searchActors call. @@ -20,7 +20,7 @@ type ActorSearchActors_Output struct { // // q: Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. // term: DEPRECATED: use 'q' instead. -func ActorSearchActors(ctx context.Context, c util.LexClient, cursor string, limit int64, q string, term string) (*ActorSearchActors_Output, error) { +func ActorSearchActors(ctx context.Context, c lexutil.LexClient, cursor string, limit int64, q string, term string) (*ActorSearchActors_Output, error) { var out ActorSearchActors_Output params := map[string]interface{}{} @@ -36,7 +36,7 @@ func ActorSearchActors(ctx context.Context, c util.LexClient, cursor string, lim if term != "" { params["term"] = term } - if err := c.LexDo(ctx, util.Query, "", "app.bsky.actor.searchActors", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.actor.searchActors", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/actorsearchActorsTypeahead.go b/api/bsky/actorsearchActorsTypeahead.go index 719ed7e6..7b7bea03 100644 --- a/api/bsky/actorsearchActorsTypeahead.go +++ b/api/bsky/actorsearchActorsTypeahead.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ActorSearchActorsTypeahead_Output is the output of a app.bsky.actor.searchActorsTypeahead call. @@ -19,7 +19,7 @@ type ActorSearchActorsTypeahead_Output struct { // // q: Search query prefix; not a full query string. // term: DEPRECATED: use 'q' instead. -func ActorSearchActorsTypeahead(ctx context.Context, c util.LexClient, limit int64, q string, term string) (*ActorSearchActorsTypeahead_Output, error) { +func ActorSearchActorsTypeahead(ctx context.Context, c lexutil.LexClient, limit int64, q string, term string) (*ActorSearchActorsTypeahead_Output, error) { var out ActorSearchActorsTypeahead_Output params := map[string]interface{}{} @@ -32,7 +32,7 @@ func ActorSearchActorsTypeahead(ctx context.Context, c util.LexClient, limit int if term != "" { params["term"] = term } - if err := c.LexDo(ctx, util.Query, "", "app.bsky.actor.searchActorsTypeahead", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.actor.searchActorsTypeahead", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/actorstatus.go b/api/bsky/actorstatus.go index df0f8eff..414d00c0 100644 --- a/api/bsky/actorstatus.go +++ b/api/bsky/actorstatus.go @@ -10,12 +10,12 @@ import ( "fmt" "io" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" cbg "github.com/whyrusleeping/cbor-gen" ) func init() { - util.RegisterType("app.bsky.actor.status", &ActorStatus{}) + lexutil.RegisterType("app.bsky.actor.status", &ActorStatus{}) } type ActorStatus struct { @@ -43,7 +43,7 @@ func (t *ActorStatus_Embed) MarshalJSON() ([]byte, error) { } func (t *ActorStatus_Embed) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -52,7 +52,6 @@ func (t *ActorStatus_Embed) UnmarshalJSON(b []byte) error { case "app.bsky.embed.external": t.EmbedExternal = new(EmbedExternal) return json.Unmarshal(b, t.EmbedExternal) - default: return nil } @@ -69,8 +68,9 @@ func (t *ActorStatus_Embed) MarshalCBOR(w io.Writer) error { } return fmt.Errorf("can not marshal empty union as CBOR") } + func (t *ActorStatus_Embed) UnmarshalCBOR(r io.Reader) error { - typ, b, err := util.CborTypeExtractReader(r) + typ, b, err := lexutil.CborTypeExtractReader(r) if err != nil { return err } @@ -79,7 +79,6 @@ func (t *ActorStatus_Embed) UnmarshalCBOR(r io.Reader) error { case "app.bsky.embed.external": t.EmbedExternal = new(EmbedExternal) return t.EmbedExternal.UnmarshalCBOR(bytes.NewReader(b)) - default: return nil } diff --git a/api/bsky/bookmarkcreateBookmark.go b/api/bsky/bookmarkcreateBookmark.go index 99b9dfee..5be7cb31 100644 --- a/api/bsky/bookmarkcreateBookmark.go +++ b/api/bsky/bookmarkcreateBookmark.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // BookmarkCreateBookmark_Input is the input argument to a app.bsky.bookmark.createBookmark call. @@ -17,8 +17,8 @@ type BookmarkCreateBookmark_Input struct { } // BookmarkCreateBookmark calls the XRPC method "app.bsky.bookmark.createBookmark". -func BookmarkCreateBookmark(ctx context.Context, c util.LexClient, input *BookmarkCreateBookmark_Input) error { - if err := c.LexDo(ctx, util.Procedure, "application/json", "app.bsky.bookmark.createBookmark", nil, input, nil); err != nil { +func BookmarkCreateBookmark(ctx context.Context, c lexutil.LexClient, input *BookmarkCreateBookmark_Input) error { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "app.bsky.bookmark.createBookmark", nil, input, nil); err != nil { return err } diff --git a/api/bsky/bookmarkdefs.go b/api/bsky/bookmarkdefs.go index 091ddbac..5cb29cfb 100644 --- a/api/bsky/bookmarkdefs.go +++ b/api/bsky/bookmarkdefs.go @@ -8,8 +8,8 @@ import ( "encoding/json" "fmt" - comatprototypes "github.com/bluesky-social/indigo/api/atproto" - "github.com/bluesky-social/indigo/lex/util" + comatproto "github.com/bluesky-social/indigo/api/atproto" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // BookmarkDefs_Bookmark is a "bookmark" in the app.bsky.bookmark.defs schema. @@ -17,7 +17,7 @@ import ( // Object used to store bookmark data in stash. type BookmarkDefs_Bookmark struct { // subject: A strong ref to the record to be bookmarked. Currently, only `app.bsky.feed.post` records are supported. - Subject *comatprototypes.RepoStrongRef `json:"subject" cborgen:"subject"` + Subject *comatproto.RepoStrongRef `json:"subject" cborgen:"subject"` } // BookmarkDefs_BookmarkView is a "bookmarkView" in the app.bsky.bookmark.defs schema. @@ -25,7 +25,7 @@ type BookmarkDefs_BookmarkView struct { CreatedAt *string `json:"createdAt,omitempty" cborgen:"createdAt,omitempty"` Item *BookmarkDefs_BookmarkView_Item `json:"item" cborgen:"item"` // subject: A strong ref to the bookmarked record. - Subject *comatprototypes.RepoStrongRef `json:"subject" cborgen:"subject"` + Subject *comatproto.RepoStrongRef `json:"subject" cborgen:"subject"` } type BookmarkDefs_BookmarkView_Item struct { @@ -51,7 +51,7 @@ func (t *BookmarkDefs_BookmarkView_Item) MarshalJSON() ([]byte, error) { } func (t *BookmarkDefs_BookmarkView_Item) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -66,7 +66,6 @@ func (t *BookmarkDefs_BookmarkView_Item) UnmarshalJSON(b []byte) error { case "app.bsky.feed.defs#postView": t.FeedDefs_PostView = new(FeedDefs_PostView) return json.Unmarshal(b, t.FeedDefs_PostView) - default: return nil } diff --git a/api/bsky/bookmarkdeleteBookmark.go b/api/bsky/bookmarkdeleteBookmark.go index f9342c32..3074cca0 100644 --- a/api/bsky/bookmarkdeleteBookmark.go +++ b/api/bsky/bookmarkdeleteBookmark.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // BookmarkDeleteBookmark_Input is the input argument to a app.bsky.bookmark.deleteBookmark call. @@ -16,8 +16,8 @@ type BookmarkDeleteBookmark_Input struct { } // BookmarkDeleteBookmark calls the XRPC method "app.bsky.bookmark.deleteBookmark". -func BookmarkDeleteBookmark(ctx context.Context, c util.LexClient, input *BookmarkDeleteBookmark_Input) error { - if err := c.LexDo(ctx, util.Procedure, "application/json", "app.bsky.bookmark.deleteBookmark", nil, input, nil); err != nil { +func BookmarkDeleteBookmark(ctx context.Context, c lexutil.LexClient, input *BookmarkDeleteBookmark_Input) error { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "app.bsky.bookmark.deleteBookmark", nil, input, nil); err != nil { return err } diff --git a/api/bsky/bookmarkgetBookmarks.go b/api/bsky/bookmarkgetBookmarks.go index 88d1ad6f..6dd05c7c 100644 --- a/api/bsky/bookmarkgetBookmarks.go +++ b/api/bsky/bookmarkgetBookmarks.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // BookmarkGetBookmarks_Output is the output of a app.bsky.bookmark.getBookmarks call. @@ -17,7 +17,7 @@ type BookmarkGetBookmarks_Output struct { } // BookmarkGetBookmarks calls the XRPC method "app.bsky.bookmark.getBookmarks". -func BookmarkGetBookmarks(ctx context.Context, c util.LexClient, cursor string, limit int64) (*BookmarkGetBookmarks_Output, error) { +func BookmarkGetBookmarks(ctx context.Context, c lexutil.LexClient, cursor string, limit int64) (*BookmarkGetBookmarks_Output, error) { var out BookmarkGetBookmarks_Output params := map[string]interface{}{} @@ -27,7 +27,7 @@ func BookmarkGetBookmarks(ctx context.Context, c util.LexClient, cursor string, if limit != 0 { params["limit"] = limit } - if err := c.LexDo(ctx, util.Query, "", "app.bsky.bookmark.getBookmarks", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.bookmark.getBookmarks", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/embedexternal.go b/api/bsky/embedexternal.go index f7b72534..e894be5b 100644 --- a/api/bsky/embedexternal.go +++ b/api/bsky/embedexternal.go @@ -5,11 +5,11 @@ package bsky import ( - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) func init() { - util.RegisterType("app.bsky.embed.external#main", &EmbedExternal{}) + lexutil.RegisterType("app.bsky.embed.external#main", &EmbedExternal{}) } // EmbedExternal is a "main" in the app.bsky.embed.external schema. @@ -22,10 +22,10 @@ type EmbedExternal struct { // EmbedExternal_External is a "external" in the app.bsky.embed.external schema. type EmbedExternal_External struct { - Description string `json:"description" cborgen:"description"` - Thumb *util.LexBlob `json:"thumb,omitempty" cborgen:"thumb,omitempty"` - Title string `json:"title" cborgen:"title"` - Uri string `json:"uri" cborgen:"uri"` + Description string `json:"description" cborgen:"description"` + Thumb *lexutil.LexBlob `json:"thumb,omitempty" cborgen:"thumb,omitempty"` + Title string `json:"title" cborgen:"title"` + Uri string `json:"uri" cborgen:"uri"` } // EmbedExternal_View is a "view" in the app.bsky.embed.external schema. diff --git a/api/bsky/embedimages.go b/api/bsky/embedimages.go index 7f4236b7..ebc98512 100644 --- a/api/bsky/embedimages.go +++ b/api/bsky/embedimages.go @@ -5,11 +5,11 @@ package bsky import ( - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) func init() { - util.RegisterType("app.bsky.embed.images#main", &EmbedImages{}) + lexutil.RegisterType("app.bsky.embed.images#main", &EmbedImages{}) } // EmbedImages is a "main" in the app.bsky.embed.images schema. @@ -23,7 +23,7 @@ type EmbedImages_Image struct { // alt: Alt text description of the image, for accessibility. Alt string `json:"alt" cborgen:"alt"` AspectRatio *EmbedDefs_AspectRatio `json:"aspectRatio,omitempty" cborgen:"aspectRatio,omitempty"` - Image *util.LexBlob `json:"image" cborgen:"image"` + Image *lexutil.LexBlob `json:"image" cborgen:"image"` } // EmbedImages_View is a "view" in the app.bsky.embed.images schema. diff --git a/api/bsky/embedrecord.go b/api/bsky/embedrecord.go index e9656535..4a7d6f43 100644 --- a/api/bsky/embedrecord.go +++ b/api/bsky/embedrecord.go @@ -8,18 +8,18 @@ import ( "encoding/json" "fmt" - comatprototypes "github.com/bluesky-social/indigo/api/atproto" - "github.com/bluesky-social/indigo/lex/util" + comatproto "github.com/bluesky-social/indigo/api/atproto" + lexutil "github.com/bluesky-social/indigo/lex/util" ) func init() { - util.RegisterType("app.bsky.embed.record#main", &EmbedRecord{}) + lexutil.RegisterType("app.bsky.embed.record#main", &EmbedRecord{}) } // EmbedRecord is a "main" in the app.bsky.embed.record schema. type EmbedRecord struct { - LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.embed.record"` - Record *comatprototypes.RepoStrongRef `json:"record" cborgen:"record"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.embed.record"` + Record *comatproto.RepoStrongRef `json:"record" cborgen:"record"` } // EmbedRecord_View is a "view" in the app.bsky.embed.record schema. @@ -57,14 +57,14 @@ type EmbedRecord_ViewRecord struct { Cid string `json:"cid" cborgen:"cid"` Embeds []*EmbedRecord_ViewRecord_Embeds_Elem `json:"embeds,omitempty" cborgen:"embeds,omitempty"` IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` - Labels []*comatprototypes.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` + Labels []*comatproto.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` LikeCount *int64 `json:"likeCount,omitempty" cborgen:"likeCount,omitempty"` QuoteCount *int64 `json:"quoteCount,omitempty" cborgen:"quoteCount,omitempty"` ReplyCount *int64 `json:"replyCount,omitempty" cborgen:"replyCount,omitempty"` RepostCount *int64 `json:"repostCount,omitempty" cborgen:"repostCount,omitempty"` Uri string `json:"uri" cborgen:"uri"` // value: The record data itself. - Value *util.LexiconTypeDecoder `json:"value" cborgen:"value"` + Value *lexutil.LexiconTypeDecoder `json:"value" cborgen:"value"` } type EmbedRecord_ViewRecord_Embeds_Elem struct { @@ -100,7 +100,7 @@ func (t *EmbedRecord_ViewRecord_Embeds_Elem) MarshalJSON() ([]byte, error) { } func (t *EmbedRecord_ViewRecord_Embeds_Elem) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -121,7 +121,6 @@ func (t *EmbedRecord_ViewRecord_Embeds_Elem) UnmarshalJSON(b []byte) error { case "app.bsky.embed.recordWithMedia#view": t.EmbedRecordWithMedia_View = new(EmbedRecordWithMedia_View) return json.Unmarshal(b, t.EmbedRecordWithMedia_View) - default: return nil } @@ -175,7 +174,7 @@ func (t *EmbedRecord_View_Record) MarshalJSON() ([]byte, error) { } func (t *EmbedRecord_View_Record) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -205,7 +204,6 @@ func (t *EmbedRecord_View_Record) UnmarshalJSON(b []byte) error { case "app.bsky.graph.defs#starterPackViewBasic": t.GraphDefs_StarterPackViewBasic = new(GraphDefs_StarterPackViewBasic) return json.Unmarshal(b, t.GraphDefs_StarterPackViewBasic) - default: return nil } diff --git a/api/bsky/embedrecordWithMedia.go b/api/bsky/embedrecordWithMedia.go index bfefac13..74157b1e 100644 --- a/api/bsky/embedrecordWithMedia.go +++ b/api/bsky/embedrecordWithMedia.go @@ -10,12 +10,12 @@ import ( "fmt" "io" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" cbg "github.com/whyrusleeping/cbor-gen" ) func init() { - util.RegisterType("app.bsky.embed.recordWithMedia#main", &EmbedRecordWithMedia{}) + lexutil.RegisterType("app.bsky.embed.recordWithMedia#main", &EmbedRecordWithMedia{}) } // EmbedRecordWithMedia is a "main" in the app.bsky.embed.recordWithMedia schema. @@ -48,7 +48,7 @@ func (t *EmbedRecordWithMedia_Media) MarshalJSON() ([]byte, error) { } func (t *EmbedRecordWithMedia_Media) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -63,7 +63,6 @@ func (t *EmbedRecordWithMedia_Media) UnmarshalJSON(b []byte) error { case "app.bsky.embed.external": t.EmbedExternal = new(EmbedExternal) return json.Unmarshal(b, t.EmbedExternal) - default: return nil } @@ -86,8 +85,9 @@ func (t *EmbedRecordWithMedia_Media) MarshalCBOR(w io.Writer) error { } return fmt.Errorf("can not marshal empty union as CBOR") } + func (t *EmbedRecordWithMedia_Media) UnmarshalCBOR(r io.Reader) error { - typ, b, err := util.CborTypeExtractReader(r) + typ, b, err := lexutil.CborTypeExtractReader(r) if err != nil { return err } @@ -102,7 +102,6 @@ func (t *EmbedRecordWithMedia_Media) UnmarshalCBOR(r io.Reader) error { case "app.bsky.embed.external": t.EmbedExternal = new(EmbedExternal) return t.EmbedExternal.UnmarshalCBOR(bytes.NewReader(b)) - default: return nil } @@ -138,7 +137,7 @@ func (t *EmbedRecordWithMedia_View_Media) MarshalJSON() ([]byte, error) { } func (t *EmbedRecordWithMedia_View_Media) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -153,7 +152,6 @@ func (t *EmbedRecordWithMedia_View_Media) UnmarshalJSON(b []byte) error { case "app.bsky.embed.external#view": t.EmbedExternal_View = new(EmbedExternal_View) return json.Unmarshal(b, t.EmbedExternal_View) - default: return nil } diff --git a/api/bsky/embedvideo.go b/api/bsky/embedvideo.go index a6ca352b..77af759d 100644 --- a/api/bsky/embedvideo.go +++ b/api/bsky/embedvideo.go @@ -5,11 +5,11 @@ package bsky import ( - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) func init() { - util.RegisterType("app.bsky.embed.video#main", &EmbedVideo{}) + lexutil.RegisterType("app.bsky.embed.video#main", &EmbedVideo{}) } // EmbedVideo is a "main" in the app.bsky.embed.video schema. @@ -20,13 +20,13 @@ type EmbedVideo struct { AspectRatio *EmbedDefs_AspectRatio `json:"aspectRatio,omitempty" cborgen:"aspectRatio,omitempty"` Captions []*EmbedVideo_Caption `json:"captions,omitempty" cborgen:"captions,omitempty"` // video: The mp4 video file. May be up to 100mb, formerly limited to 50mb. - Video *util.LexBlob `json:"video" cborgen:"video"` + Video *lexutil.LexBlob `json:"video" cborgen:"video"` } // EmbedVideo_Caption is a "caption" in the app.bsky.embed.video schema. type EmbedVideo_Caption struct { - File *util.LexBlob `json:"file" cborgen:"file"` - Lang string `json:"lang" cborgen:"lang"` + File *lexutil.LexBlob `json:"file" cborgen:"file"` + Lang string `json:"lang" cborgen:"lang"` } // EmbedVideo_View is a "view" in the app.bsky.embed.video schema. diff --git a/api/bsky/feeddefs.go b/api/bsky/feeddefs.go index 3fe43a5b..49989309 100644 --- a/api/bsky/feeddefs.go +++ b/api/bsky/feeddefs.go @@ -8,8 +8,8 @@ import ( "encoding/json" "fmt" - comatprototypes "github.com/bluesky-social/indigo/api/atproto" - "github.com/bluesky-social/indigo/lex/util" + comatproto "github.com/bluesky-social/indigo/api/atproto" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // FeedDefs_BlockedAuthor is a "blockedAuthor" in the app.bsky.feed.defs schema. @@ -55,7 +55,7 @@ func (t *FeedDefs_FeedViewPost_Reason) MarshalJSON() ([]byte, error) { } func (t *FeedDefs_FeedViewPost_Reason) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -67,7 +67,6 @@ func (t *FeedDefs_FeedViewPost_Reason) UnmarshalJSON(b []byte) error { case "app.bsky.feed.defs#reasonPin": t.FeedDefs_ReasonPin = new(FeedDefs_ReasonPin) return json.Unmarshal(b, t.FeedDefs_ReasonPin) - default: return nil } @@ -75,21 +74,21 @@ func (t *FeedDefs_FeedViewPost_Reason) UnmarshalJSON(b []byte) error { // FeedDefs_GeneratorView is a "generatorView" in the app.bsky.feed.defs schema. type FeedDefs_GeneratorView struct { - LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.feed.defs#generatorView"` - AcceptsInteractions *bool `json:"acceptsInteractions,omitempty" cborgen:"acceptsInteractions,omitempty"` - Avatar *string `json:"avatar,omitempty" cborgen:"avatar,omitempty"` - Cid string `json:"cid" cborgen:"cid"` - ContentMode *string `json:"contentMode,omitempty" cborgen:"contentMode,omitempty"` - Creator *ActorDefs_ProfileView `json:"creator" cborgen:"creator"` - Description *string `json:"description,omitempty" cborgen:"description,omitempty"` - DescriptionFacets []*RichtextFacet `json:"descriptionFacets,omitempty" cborgen:"descriptionFacets,omitempty"` - Did string `json:"did" cborgen:"did"` - DisplayName string `json:"displayName" cborgen:"displayName"` - IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` - Labels []*comatprototypes.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` - LikeCount *int64 `json:"likeCount,omitempty" cborgen:"likeCount,omitempty"` - Uri string `json:"uri" cborgen:"uri"` - Viewer *FeedDefs_GeneratorViewerState `json:"viewer,omitempty" cborgen:"viewer,omitempty"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.feed.defs#generatorView"` + AcceptsInteractions *bool `json:"acceptsInteractions,omitempty" cborgen:"acceptsInteractions,omitempty"` + Avatar *string `json:"avatar,omitempty" cborgen:"avatar,omitempty"` + Cid string `json:"cid" cborgen:"cid"` + ContentMode *string `json:"contentMode,omitempty" cborgen:"contentMode,omitempty"` + Creator *ActorDefs_ProfileView `json:"creator" cborgen:"creator"` + Description *string `json:"description,omitempty" cborgen:"description,omitempty"` + DescriptionFacets []*RichtextFacet `json:"descriptionFacets,omitempty" cborgen:"descriptionFacets,omitempty"` + Did string `json:"did" cborgen:"did"` + DisplayName string `json:"displayName" cborgen:"displayName"` + IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` + Labels []*comatproto.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` + LikeCount *int64 `json:"likeCount,omitempty" cborgen:"likeCount,omitempty"` + Uri string `json:"uri" cborgen:"uri"` + Viewer *FeedDefs_GeneratorViewerState `json:"viewer,omitempty" cborgen:"viewer,omitempty"` } // FeedDefs_GeneratorViewerState is a "generatorViewerState" in the app.bsky.feed.defs schema. @@ -116,21 +115,21 @@ type FeedDefs_NotFoundPost struct { // FeedDefs_PostView is a "postView" in the app.bsky.feed.defs schema. type FeedDefs_PostView struct { - LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.feed.defs#postView"` - Author *ActorDefs_ProfileViewBasic `json:"author" cborgen:"author"` - BookmarkCount *int64 `json:"bookmarkCount,omitempty" cborgen:"bookmarkCount,omitempty"` - Cid string `json:"cid" cborgen:"cid"` - Embed *FeedDefs_PostView_Embed `json:"embed,omitempty" cborgen:"embed,omitempty"` - IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` - Labels []*comatprototypes.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` - LikeCount *int64 `json:"likeCount,omitempty" cborgen:"likeCount,omitempty"` - QuoteCount *int64 `json:"quoteCount,omitempty" cborgen:"quoteCount,omitempty"` - Record *util.LexiconTypeDecoder `json:"record" cborgen:"record"` - ReplyCount *int64 `json:"replyCount,omitempty" cborgen:"replyCount,omitempty"` - RepostCount *int64 `json:"repostCount,omitempty" cborgen:"repostCount,omitempty"` - Threadgate *FeedDefs_ThreadgateView `json:"threadgate,omitempty" cborgen:"threadgate,omitempty"` - Uri string `json:"uri" cborgen:"uri"` - Viewer *FeedDefs_ViewerState `json:"viewer,omitempty" cborgen:"viewer,omitempty"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.feed.defs#postView"` + Author *ActorDefs_ProfileViewBasic `json:"author" cborgen:"author"` + BookmarkCount *int64 `json:"bookmarkCount,omitempty" cborgen:"bookmarkCount,omitempty"` + Cid string `json:"cid" cborgen:"cid"` + Embed *FeedDefs_PostView_Embed `json:"embed,omitempty" cborgen:"embed,omitempty"` + IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` + Labels []*comatproto.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` + LikeCount *int64 `json:"likeCount,omitempty" cborgen:"likeCount,omitempty"` + QuoteCount *int64 `json:"quoteCount,omitempty" cborgen:"quoteCount,omitempty"` + Record *lexutil.LexiconTypeDecoder `json:"record" cborgen:"record"` + ReplyCount *int64 `json:"replyCount,omitempty" cborgen:"replyCount,omitempty"` + RepostCount *int64 `json:"repostCount,omitempty" cborgen:"repostCount,omitempty"` + Threadgate *FeedDefs_ThreadgateView `json:"threadgate,omitempty" cborgen:"threadgate,omitempty"` + Uri string `json:"uri" cborgen:"uri"` + Viewer *FeedDefs_ViewerState `json:"viewer,omitempty" cborgen:"viewer,omitempty"` } type FeedDefs_PostView_Embed struct { @@ -166,7 +165,7 @@ func (t *FeedDefs_PostView_Embed) MarshalJSON() ([]byte, error) { } func (t *FeedDefs_PostView_Embed) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -187,7 +186,6 @@ func (t *FeedDefs_PostView_Embed) UnmarshalJSON(b []byte) error { case "app.bsky.embed.recordWithMedia#view": t.EmbedRecordWithMedia_View = new(EmbedRecordWithMedia_View) return json.Unmarshal(b, t.EmbedRecordWithMedia_View) - default: return nil } @@ -238,7 +236,7 @@ func (t *FeedDefs_ReplyRef_Parent) MarshalJSON() ([]byte, error) { } func (t *FeedDefs_ReplyRef_Parent) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -253,7 +251,6 @@ func (t *FeedDefs_ReplyRef_Parent) UnmarshalJSON(b []byte) error { case "app.bsky.feed.defs#blockedPost": t.FeedDefs_BlockedPost = new(FeedDefs_BlockedPost) return json.Unmarshal(b, t.FeedDefs_BlockedPost) - default: return nil } @@ -282,7 +279,7 @@ func (t *FeedDefs_ReplyRef_Root) MarshalJSON() ([]byte, error) { } func (t *FeedDefs_ReplyRef_Root) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -297,7 +294,6 @@ func (t *FeedDefs_ReplyRef_Root) UnmarshalJSON(b []byte) error { case "app.bsky.feed.defs#blockedPost": t.FeedDefs_BlockedPost = new(FeedDefs_BlockedPost) return json.Unmarshal(b, t.FeedDefs_BlockedPost) - default: return nil } @@ -329,7 +325,7 @@ func (t *FeedDefs_SkeletonFeedPost_Reason) MarshalJSON() ([]byte, error) { } func (t *FeedDefs_SkeletonFeedPost_Reason) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -341,7 +337,6 @@ func (t *FeedDefs_SkeletonFeedPost_Reason) UnmarshalJSON(b []byte) error { case "app.bsky.feed.defs#skeletonReasonPin": t.FeedDefs_SkeletonReasonPin = new(FeedDefs_SkeletonReasonPin) return json.Unmarshal(b, t.FeedDefs_SkeletonReasonPin) - default: return nil } @@ -397,7 +392,7 @@ func (t *FeedDefs_ThreadViewPost_Parent) MarshalJSON() ([]byte, error) { } func (t *FeedDefs_ThreadViewPost_Parent) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -412,7 +407,6 @@ func (t *FeedDefs_ThreadViewPost_Parent) UnmarshalJSON(b []byte) error { case "app.bsky.feed.defs#blockedPost": t.FeedDefs_BlockedPost = new(FeedDefs_BlockedPost) return json.Unmarshal(b, t.FeedDefs_BlockedPost) - default: return nil } @@ -441,7 +435,7 @@ func (t *FeedDefs_ThreadViewPost_Replies_Elem) MarshalJSON() ([]byte, error) { } func (t *FeedDefs_ThreadViewPost_Replies_Elem) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -456,7 +450,6 @@ func (t *FeedDefs_ThreadViewPost_Replies_Elem) UnmarshalJSON(b []byte) error { case "app.bsky.feed.defs#blockedPost": t.FeedDefs_BlockedPost = new(FeedDefs_BlockedPost) return json.Unmarshal(b, t.FeedDefs_BlockedPost) - default: return nil } @@ -464,10 +457,10 @@ func (t *FeedDefs_ThreadViewPost_Replies_Elem) UnmarshalJSON(b []byte) error { // FeedDefs_ThreadgateView is a "threadgateView" in the app.bsky.feed.defs schema. type FeedDefs_ThreadgateView struct { - Cid *string `json:"cid,omitempty" cborgen:"cid,omitempty"` - Lists []*GraphDefs_ListViewBasic `json:"lists,omitempty" cborgen:"lists,omitempty"` - Record *util.LexiconTypeDecoder `json:"record,omitempty" cborgen:"record,omitempty"` - Uri *string `json:"uri,omitempty" cborgen:"uri,omitempty"` + Cid *string `json:"cid,omitempty" cborgen:"cid,omitempty"` + Lists []*GraphDefs_ListViewBasic `json:"lists,omitempty" cborgen:"lists,omitempty"` + Record *lexutil.LexiconTypeDecoder `json:"record,omitempty" cborgen:"record,omitempty"` + Uri *string `json:"uri,omitempty" cborgen:"uri,omitempty"` } // FeedDefs_ViewerState is a "viewerState" in the app.bsky.feed.defs schema. diff --git a/api/bsky/feeddescribeFeedGenerator.go b/api/bsky/feeddescribeFeedGenerator.go index 4cac747a..c638781e 100644 --- a/api/bsky/feeddescribeFeedGenerator.go +++ b/api/bsky/feeddescribeFeedGenerator.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // FeedDescribeFeedGenerator_Feed is a "feed" in the app.bsky.feed.describeFeedGenerator schema. @@ -29,9 +29,9 @@ type FeedDescribeFeedGenerator_Output struct { } // FeedDescribeFeedGenerator calls the XRPC method "app.bsky.feed.describeFeedGenerator". -func FeedDescribeFeedGenerator(ctx context.Context, c util.LexClient) (*FeedDescribeFeedGenerator_Output, error) { +func FeedDescribeFeedGenerator(ctx context.Context, c lexutil.LexClient) (*FeedDescribeFeedGenerator_Output, error) { var out FeedDescribeFeedGenerator_Output - if err := c.LexDo(ctx, util.Query, "", "app.bsky.feed.describeFeedGenerator", nil, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.feed.describeFeedGenerator", nil, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/feedgenerator.go b/api/bsky/feedgenerator.go index 6ae594c8..e8dc150d 100644 --- a/api/bsky/feedgenerator.go +++ b/api/bsky/feedgenerator.go @@ -10,20 +10,20 @@ import ( "fmt" "io" - comatprototypes "github.com/bluesky-social/indigo/api/atproto" - "github.com/bluesky-social/indigo/lex/util" + comatproto "github.com/bluesky-social/indigo/api/atproto" + lexutil "github.com/bluesky-social/indigo/lex/util" cbg "github.com/whyrusleeping/cbor-gen" ) func init() { - util.RegisterType("app.bsky.feed.generator", &FeedGenerator{}) + lexutil.RegisterType("app.bsky.feed.generator", &FeedGenerator{}) } type FeedGenerator struct { LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.feed.generator"` // acceptsInteractions: Declaration that a feed accepts feedback interactions from a client through app.bsky.feed.sendInteractions AcceptsInteractions *bool `json:"acceptsInteractions,omitempty" cborgen:"acceptsInteractions,omitempty"` - Avatar *util.LexBlob `json:"avatar,omitempty" cborgen:"avatar,omitempty"` + Avatar *lexutil.LexBlob `json:"avatar,omitempty" cborgen:"avatar,omitempty"` ContentMode *string `json:"contentMode,omitempty" cborgen:"contentMode,omitempty"` CreatedAt string `json:"createdAt" cborgen:"createdAt"` Description *string `json:"description,omitempty" cborgen:"description,omitempty"` @@ -36,7 +36,7 @@ type FeedGenerator struct { // Self-label values type FeedGenerator_Labels struct { - LabelDefs_SelfLabels *comatprototypes.LabelDefs_SelfLabels + LabelDefs_SelfLabels *comatproto.LabelDefs_SelfLabels } func (t *FeedGenerator_Labels) MarshalJSON() ([]byte, error) { @@ -48,16 +48,15 @@ func (t *FeedGenerator_Labels) MarshalJSON() ([]byte, error) { } func (t *FeedGenerator_Labels) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } switch typ { case "com.atproto.label.defs#selfLabels": - t.LabelDefs_SelfLabels = new(comatprototypes.LabelDefs_SelfLabels) + t.LabelDefs_SelfLabels = new(comatproto.LabelDefs_SelfLabels) return json.Unmarshal(b, t.LabelDefs_SelfLabels) - default: return nil } @@ -74,17 +73,17 @@ func (t *FeedGenerator_Labels) MarshalCBOR(w io.Writer) error { } return fmt.Errorf("can not marshal empty union as CBOR") } + func (t *FeedGenerator_Labels) UnmarshalCBOR(r io.Reader) error { - typ, b, err := util.CborTypeExtractReader(r) + typ, b, err := lexutil.CborTypeExtractReader(r) if err != nil { return err } switch typ { case "com.atproto.label.defs#selfLabels": - t.LabelDefs_SelfLabels = new(comatprototypes.LabelDefs_SelfLabels) + t.LabelDefs_SelfLabels = new(comatproto.LabelDefs_SelfLabels) return t.LabelDefs_SelfLabels.UnmarshalCBOR(bytes.NewReader(b)) - default: return nil } diff --git a/api/bsky/feedgetActorFeeds.go b/api/bsky/feedgetActorFeeds.go index 9545e226..f5bf7786 100644 --- a/api/bsky/feedgetActorFeeds.go +++ b/api/bsky/feedgetActorFeeds.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // FeedGetActorFeeds_Output is the output of a app.bsky.feed.getActorFeeds call. @@ -17,7 +17,7 @@ type FeedGetActorFeeds_Output struct { } // FeedGetActorFeeds calls the XRPC method "app.bsky.feed.getActorFeeds". -func FeedGetActorFeeds(ctx context.Context, c util.LexClient, actor string, cursor string, limit int64) (*FeedGetActorFeeds_Output, error) { +func FeedGetActorFeeds(ctx context.Context, c lexutil.LexClient, actor string, cursor string, limit int64) (*FeedGetActorFeeds_Output, error) { var out FeedGetActorFeeds_Output params := map[string]interface{}{} @@ -28,7 +28,7 @@ func FeedGetActorFeeds(ctx context.Context, c util.LexClient, actor string, curs if limit != 0 { params["limit"] = limit } - if err := c.LexDo(ctx, util.Query, "", "app.bsky.feed.getActorFeeds", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.feed.getActorFeeds", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/feedgetActorLikes.go b/api/bsky/feedgetActorLikes.go index 9b06f2e5..8ae0fc09 100644 --- a/api/bsky/feedgetActorLikes.go +++ b/api/bsky/feedgetActorLikes.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // FeedGetActorLikes_Output is the output of a app.bsky.feed.getActorLikes call. @@ -17,7 +17,7 @@ type FeedGetActorLikes_Output struct { } // FeedGetActorLikes calls the XRPC method "app.bsky.feed.getActorLikes". -func FeedGetActorLikes(ctx context.Context, c util.LexClient, actor string, cursor string, limit int64) (*FeedGetActorLikes_Output, error) { +func FeedGetActorLikes(ctx context.Context, c lexutil.LexClient, actor string, cursor string, limit int64) (*FeedGetActorLikes_Output, error) { var out FeedGetActorLikes_Output params := map[string]interface{}{} @@ -28,7 +28,7 @@ func FeedGetActorLikes(ctx context.Context, c util.LexClient, actor string, curs if limit != 0 { params["limit"] = limit } - if err := c.LexDo(ctx, util.Query, "", "app.bsky.feed.getActorLikes", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.feed.getActorLikes", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/feedgetAuthorFeed.go b/api/bsky/feedgetAuthorFeed.go index 454f6dbe..f22b48a9 100644 --- a/api/bsky/feedgetAuthorFeed.go +++ b/api/bsky/feedgetAuthorFeed.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // FeedGetAuthorFeed_Output is the output of a app.bsky.feed.getAuthorFeed call. @@ -19,7 +19,7 @@ type FeedGetAuthorFeed_Output struct { // FeedGetAuthorFeed calls the XRPC method "app.bsky.feed.getAuthorFeed". // // filter: Combinations of post/repost types to include in response. -func FeedGetAuthorFeed(ctx context.Context, c util.LexClient, actor string, cursor string, filter string, includePins bool, limit int64) (*FeedGetAuthorFeed_Output, error) { +func FeedGetAuthorFeed(ctx context.Context, c lexutil.LexClient, actor string, cursor string, filter string, includePins bool, limit int64) (*FeedGetAuthorFeed_Output, error) { var out FeedGetAuthorFeed_Output params := map[string]interface{}{} @@ -36,7 +36,7 @@ func FeedGetAuthorFeed(ctx context.Context, c util.LexClient, actor string, curs if limit != 0 { params["limit"] = limit } - if err := c.LexDo(ctx, util.Query, "", "app.bsky.feed.getAuthorFeed", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.feed.getAuthorFeed", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/feedgetFeed.go b/api/bsky/feedgetFeed.go index ad607873..a7f30906 100644 --- a/api/bsky/feedgetFeed.go +++ b/api/bsky/feedgetFeed.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // FeedGetFeed_Output is the output of a app.bsky.feed.getFeed call. @@ -17,7 +17,7 @@ type FeedGetFeed_Output struct { } // FeedGetFeed calls the XRPC method "app.bsky.feed.getFeed". -func FeedGetFeed(ctx context.Context, c util.LexClient, cursor string, feed string, limit int64) (*FeedGetFeed_Output, error) { +func FeedGetFeed(ctx context.Context, c lexutil.LexClient, cursor string, feed string, limit int64) (*FeedGetFeed_Output, error) { var out FeedGetFeed_Output params := map[string]interface{}{} @@ -28,7 +28,7 @@ func FeedGetFeed(ctx context.Context, c util.LexClient, cursor string, feed stri if limit != 0 { params["limit"] = limit } - if err := c.LexDo(ctx, util.Query, "", "app.bsky.feed.getFeed", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.feed.getFeed", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/feedgetFeedGenerator.go b/api/bsky/feedgetFeedGenerator.go index 189f5138..d11ab55b 100644 --- a/api/bsky/feedgetFeedGenerator.go +++ b/api/bsky/feedgetFeedGenerator.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // FeedGetFeedGenerator_Output is the output of a app.bsky.feed.getFeedGenerator call. @@ -22,12 +22,12 @@ type FeedGetFeedGenerator_Output struct { // FeedGetFeedGenerator calls the XRPC method "app.bsky.feed.getFeedGenerator". // // feed: AT-URI of the feed generator record. -func FeedGetFeedGenerator(ctx context.Context, c util.LexClient, feed string) (*FeedGetFeedGenerator_Output, error) { +func FeedGetFeedGenerator(ctx context.Context, c lexutil.LexClient, feed string) (*FeedGetFeedGenerator_Output, error) { var out FeedGetFeedGenerator_Output params := map[string]interface{}{} params["feed"] = feed - if err := c.LexDo(ctx, util.Query, "", "app.bsky.feed.getFeedGenerator", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.feed.getFeedGenerator", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/feedgetFeedGenerators.go b/api/bsky/feedgetFeedGenerators.go index 6b45ca93..b1d05365 100644 --- a/api/bsky/feedgetFeedGenerators.go +++ b/api/bsky/feedgetFeedGenerators.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // FeedGetFeedGenerators_Output is the output of a app.bsky.feed.getFeedGenerators call. @@ -16,12 +16,12 @@ type FeedGetFeedGenerators_Output struct { } // FeedGetFeedGenerators calls the XRPC method "app.bsky.feed.getFeedGenerators". -func FeedGetFeedGenerators(ctx context.Context, c util.LexClient, feeds []string) (*FeedGetFeedGenerators_Output, error) { +func FeedGetFeedGenerators(ctx context.Context, c lexutil.LexClient, feeds []string) (*FeedGetFeedGenerators_Output, error) { var out FeedGetFeedGenerators_Output params := map[string]interface{}{} params["feeds"] = feeds - if err := c.LexDo(ctx, util.Query, "", "app.bsky.feed.getFeedGenerators", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.feed.getFeedGenerators", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/feedgetFeedSkeleton.go b/api/bsky/feedgetFeedSkeleton.go index eb5f0f1e..d8f2ecb7 100644 --- a/api/bsky/feedgetFeedSkeleton.go +++ b/api/bsky/feedgetFeedSkeleton.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // FeedGetFeedSkeleton_Output is the output of a app.bsky.feed.getFeedSkeleton call. @@ -21,7 +21,7 @@ type FeedGetFeedSkeleton_Output struct { // FeedGetFeedSkeleton calls the XRPC method "app.bsky.feed.getFeedSkeleton". // // feed: Reference to feed generator record describing the specific feed being requested. -func FeedGetFeedSkeleton(ctx context.Context, c util.LexClient, cursor string, feed string, limit int64) (*FeedGetFeedSkeleton_Output, error) { +func FeedGetFeedSkeleton(ctx context.Context, c lexutil.LexClient, cursor string, feed string, limit int64) (*FeedGetFeedSkeleton_Output, error) { var out FeedGetFeedSkeleton_Output params := map[string]interface{}{} @@ -32,7 +32,7 @@ func FeedGetFeedSkeleton(ctx context.Context, c util.LexClient, cursor string, f if limit != 0 { params["limit"] = limit } - if err := c.LexDo(ctx, util.Query, "", "app.bsky.feed.getFeedSkeleton", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.feed.getFeedSkeleton", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/feedgetLikes.go b/api/bsky/feedgetLikes.go index 0db2e078..1dcab734 100644 --- a/api/bsky/feedgetLikes.go +++ b/api/bsky/feedgetLikes.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // FeedGetLikes_Like is a "like" in the app.bsky.feed.getLikes schema. @@ -29,7 +29,7 @@ type FeedGetLikes_Output struct { // // cid: CID of the subject record (aka, specific version of record), to filter likes. // uri: AT-URI of the subject (eg, a post record). -func FeedGetLikes(ctx context.Context, c util.LexClient, cid string, cursor string, limit int64, uri string) (*FeedGetLikes_Output, error) { +func FeedGetLikes(ctx context.Context, c lexutil.LexClient, cid string, cursor string, limit int64, uri string) (*FeedGetLikes_Output, error) { var out FeedGetLikes_Output params := map[string]interface{}{} @@ -43,7 +43,7 @@ func FeedGetLikes(ctx context.Context, c util.LexClient, cid string, cursor stri params["limit"] = limit } params["uri"] = uri - if err := c.LexDo(ctx, util.Query, "", "app.bsky.feed.getLikes", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.feed.getLikes", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/feedgetListFeed.go b/api/bsky/feedgetListFeed.go index 68a3eefa..bd1273a5 100644 --- a/api/bsky/feedgetListFeed.go +++ b/api/bsky/feedgetListFeed.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // FeedGetListFeed_Output is the output of a app.bsky.feed.getListFeed call. @@ -19,7 +19,7 @@ type FeedGetListFeed_Output struct { // FeedGetListFeed calls the XRPC method "app.bsky.feed.getListFeed". // // list: Reference (AT-URI) to the list record. -func FeedGetListFeed(ctx context.Context, c util.LexClient, cursor string, limit int64, list string) (*FeedGetListFeed_Output, error) { +func FeedGetListFeed(ctx context.Context, c lexutil.LexClient, cursor string, limit int64, list string) (*FeedGetListFeed_Output, error) { var out FeedGetListFeed_Output params := map[string]interface{}{} @@ -30,7 +30,7 @@ func FeedGetListFeed(ctx context.Context, c util.LexClient, cursor string, limit params["limit"] = limit } params["list"] = list - if err := c.LexDo(ctx, util.Query, "", "app.bsky.feed.getListFeed", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.feed.getListFeed", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/feedgetPostThread.go b/api/bsky/feedgetPostThread.go index ea860c49..f702fe41 100644 --- a/api/bsky/feedgetPostThread.go +++ b/api/bsky/feedgetPostThread.go @@ -9,7 +9,7 @@ import ( "encoding/json" "fmt" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // FeedGetPostThread_Output is the output of a app.bsky.feed.getPostThread call. @@ -41,7 +41,7 @@ func (t *FeedGetPostThread_Output_Thread) MarshalJSON() ([]byte, error) { } func (t *FeedGetPostThread_Output_Thread) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -56,7 +56,6 @@ func (t *FeedGetPostThread_Output_Thread) UnmarshalJSON(b []byte) error { case "app.bsky.feed.defs#blockedPost": t.FeedDefs_BlockedPost = new(FeedDefs_BlockedPost) return json.Unmarshal(b, t.FeedDefs_BlockedPost) - default: return nil } @@ -67,7 +66,7 @@ func (t *FeedGetPostThread_Output_Thread) UnmarshalJSON(b []byte) error { // depth: How many levels of reply depth should be included in response. // parentHeight: How many levels of parent (and grandparent, etc) post to include. // uri: Reference (AT-URI) to post record. -func FeedGetPostThread(ctx context.Context, c util.LexClient, depth int64, parentHeight int64, uri string) (*FeedGetPostThread_Output, error) { +func FeedGetPostThread(ctx context.Context, c lexutil.LexClient, depth int64, parentHeight int64, uri string) (*FeedGetPostThread_Output, error) { var out FeedGetPostThread_Output params := map[string]interface{}{} @@ -78,7 +77,7 @@ func FeedGetPostThread(ctx context.Context, c util.LexClient, depth int64, paren params["parentHeight"] = parentHeight } params["uri"] = uri - if err := c.LexDo(ctx, util.Query, "", "app.bsky.feed.getPostThread", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.feed.getPostThread", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/feedgetPosts.go b/api/bsky/feedgetPosts.go index be4fc145..8d5a3e5e 100644 --- a/api/bsky/feedgetPosts.go +++ b/api/bsky/feedgetPosts.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // FeedGetPosts_Output is the output of a app.bsky.feed.getPosts call. @@ -18,12 +18,12 @@ type FeedGetPosts_Output struct { // FeedGetPosts calls the XRPC method "app.bsky.feed.getPosts". // // uris: List of post AT-URIs to return hydrated views for. -func FeedGetPosts(ctx context.Context, c util.LexClient, uris []string) (*FeedGetPosts_Output, error) { +func FeedGetPosts(ctx context.Context, c lexutil.LexClient, uris []string) (*FeedGetPosts_Output, error) { var out FeedGetPosts_Output params := map[string]interface{}{} params["uris"] = uris - if err := c.LexDo(ctx, util.Query, "", "app.bsky.feed.getPosts", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.feed.getPosts", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/feedgetQuotes.go b/api/bsky/feedgetQuotes.go index f43dc84c..002b4127 100644 --- a/api/bsky/feedgetQuotes.go +++ b/api/bsky/feedgetQuotes.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // FeedGetQuotes_Output is the output of a app.bsky.feed.getQuotes call. @@ -22,7 +22,7 @@ type FeedGetQuotes_Output struct { // // cid: If supplied, filters to quotes of specific version (by CID) of the post record. // uri: Reference (AT-URI) of post record -func FeedGetQuotes(ctx context.Context, c util.LexClient, cid string, cursor string, limit int64, uri string) (*FeedGetQuotes_Output, error) { +func FeedGetQuotes(ctx context.Context, c lexutil.LexClient, cid string, cursor string, limit int64, uri string) (*FeedGetQuotes_Output, error) { var out FeedGetQuotes_Output params := map[string]interface{}{} @@ -36,7 +36,7 @@ func FeedGetQuotes(ctx context.Context, c util.LexClient, cid string, cursor str params["limit"] = limit } params["uri"] = uri - if err := c.LexDo(ctx, util.Query, "", "app.bsky.feed.getQuotes", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.feed.getQuotes", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/feedgetRepostedBy.go b/api/bsky/feedgetRepostedBy.go index 585ef99b..7559fca2 100644 --- a/api/bsky/feedgetRepostedBy.go +++ b/api/bsky/feedgetRepostedBy.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // FeedGetRepostedBy_Output is the output of a app.bsky.feed.getRepostedBy call. @@ -22,7 +22,7 @@ type FeedGetRepostedBy_Output struct { // // cid: If supplied, filters to reposts of specific version (by CID) of the post record. // uri: Reference (AT-URI) of post record -func FeedGetRepostedBy(ctx context.Context, c util.LexClient, cid string, cursor string, limit int64, uri string) (*FeedGetRepostedBy_Output, error) { +func FeedGetRepostedBy(ctx context.Context, c lexutil.LexClient, cid string, cursor string, limit int64, uri string) (*FeedGetRepostedBy_Output, error) { var out FeedGetRepostedBy_Output params := map[string]interface{}{} @@ -36,7 +36,7 @@ func FeedGetRepostedBy(ctx context.Context, c util.LexClient, cid string, cursor params["limit"] = limit } params["uri"] = uri - if err := c.LexDo(ctx, util.Query, "", "app.bsky.feed.getRepostedBy", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.feed.getRepostedBy", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/feedgetSuggestedFeeds.go b/api/bsky/feedgetSuggestedFeeds.go index 97977b3c..2a17f0ad 100644 --- a/api/bsky/feedgetSuggestedFeeds.go +++ b/api/bsky/feedgetSuggestedFeeds.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // FeedGetSuggestedFeeds_Output is the output of a app.bsky.feed.getSuggestedFeeds call. @@ -17,7 +17,7 @@ type FeedGetSuggestedFeeds_Output struct { } // FeedGetSuggestedFeeds calls the XRPC method "app.bsky.feed.getSuggestedFeeds". -func FeedGetSuggestedFeeds(ctx context.Context, c util.LexClient, cursor string, limit int64) (*FeedGetSuggestedFeeds_Output, error) { +func FeedGetSuggestedFeeds(ctx context.Context, c lexutil.LexClient, cursor string, limit int64) (*FeedGetSuggestedFeeds_Output, error) { var out FeedGetSuggestedFeeds_Output params := map[string]interface{}{} @@ -27,7 +27,7 @@ func FeedGetSuggestedFeeds(ctx context.Context, c util.LexClient, cursor string, if limit != 0 { params["limit"] = limit } - if err := c.LexDo(ctx, util.Query, "", "app.bsky.feed.getSuggestedFeeds", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.feed.getSuggestedFeeds", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/feedgetTimeline.go b/api/bsky/feedgetTimeline.go index d163d6a5..637ea7a0 100644 --- a/api/bsky/feedgetTimeline.go +++ b/api/bsky/feedgetTimeline.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // FeedGetTimeline_Output is the output of a app.bsky.feed.getTimeline call. @@ -19,7 +19,7 @@ type FeedGetTimeline_Output struct { // FeedGetTimeline calls the XRPC method "app.bsky.feed.getTimeline". // // algorithm: Variant 'algorithm' for timeline. Implementation-specific. NOTE: most feed flexibility has been moved to feed generator mechanism. -func FeedGetTimeline(ctx context.Context, c util.LexClient, algorithm string, cursor string, limit int64) (*FeedGetTimeline_Output, error) { +func FeedGetTimeline(ctx context.Context, c lexutil.LexClient, algorithm string, cursor string, limit int64) (*FeedGetTimeline_Output, error) { var out FeedGetTimeline_Output params := map[string]interface{}{} @@ -32,7 +32,7 @@ func FeedGetTimeline(ctx context.Context, c util.LexClient, algorithm string, cu if limit != 0 { params["limit"] = limit } - if err := c.LexDo(ctx, util.Query, "", "app.bsky.feed.getTimeline", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.feed.getTimeline", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/feedlike.go b/api/bsky/feedlike.go index 27463955..774b092e 100644 --- a/api/bsky/feedlike.go +++ b/api/bsky/feedlike.go @@ -5,17 +5,17 @@ package bsky import ( - comatprototypes "github.com/bluesky-social/indigo/api/atproto" - "github.com/bluesky-social/indigo/lex/util" + comatproto "github.com/bluesky-social/indigo/api/atproto" + lexutil "github.com/bluesky-social/indigo/lex/util" ) func init() { - util.RegisterType("app.bsky.feed.like", &FeedLike{}) + lexutil.RegisterType("app.bsky.feed.like", &FeedLike{}) } type FeedLike struct { - LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.feed.like"` - CreatedAt string `json:"createdAt" cborgen:"createdAt"` - Subject *comatprototypes.RepoStrongRef `json:"subject" cborgen:"subject"` - Via *comatprototypes.RepoStrongRef `json:"via,omitempty" cborgen:"via,omitempty"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.feed.like"` + CreatedAt string `json:"createdAt" cborgen:"createdAt"` + Subject *comatproto.RepoStrongRef `json:"subject" cborgen:"subject"` + Via *comatproto.RepoStrongRef `json:"via,omitempty" cborgen:"via,omitempty"` } diff --git a/api/bsky/feedpost.go b/api/bsky/feedpost.go index ad075ac5..f3004f25 100644 --- a/api/bsky/feedpost.go +++ b/api/bsky/feedpost.go @@ -10,13 +10,13 @@ import ( "fmt" "io" - comatprototypes "github.com/bluesky-social/indigo/api/atproto" - "github.com/bluesky-social/indigo/lex/util" + comatproto "github.com/bluesky-social/indigo/api/atproto" + lexutil "github.com/bluesky-social/indigo/lex/util" cbg "github.com/whyrusleeping/cbor-gen" ) func init() { - util.RegisterType("app.bsky.feed.post", &FeedPost{}) + lexutil.RegisterType("app.bsky.feed.post", &FeedPost{}) } type FeedPost struct { @@ -72,7 +72,7 @@ func (t *FeedPost_Embed) MarshalJSON() ([]byte, error) { } func (t *FeedPost_Embed) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -93,7 +93,6 @@ func (t *FeedPost_Embed) UnmarshalJSON(b []byte) error { case "app.bsky.embed.recordWithMedia": t.EmbedRecordWithMedia = new(EmbedRecordWithMedia) return json.Unmarshal(b, t.EmbedRecordWithMedia) - default: return nil } @@ -122,8 +121,9 @@ func (t *FeedPost_Embed) MarshalCBOR(w io.Writer) error { } return fmt.Errorf("can not marshal empty union as CBOR") } + func (t *FeedPost_Embed) UnmarshalCBOR(r io.Reader) error { - typ, b, err := util.CborTypeExtractReader(r) + typ, b, err := lexutil.CborTypeExtractReader(r) if err != nil { return err } @@ -144,7 +144,6 @@ func (t *FeedPost_Embed) UnmarshalCBOR(r io.Reader) error { case "app.bsky.embed.recordWithMedia": t.EmbedRecordWithMedia = new(EmbedRecordWithMedia) return t.EmbedRecordWithMedia.UnmarshalCBOR(bytes.NewReader(b)) - default: return nil } @@ -162,7 +161,7 @@ type FeedPost_Entity struct { // Self-label values for this post. Effectively content warnings. type FeedPost_Labels struct { - LabelDefs_SelfLabels *comatprototypes.LabelDefs_SelfLabels + LabelDefs_SelfLabels *comatproto.LabelDefs_SelfLabels } func (t *FeedPost_Labels) MarshalJSON() ([]byte, error) { @@ -174,16 +173,15 @@ func (t *FeedPost_Labels) MarshalJSON() ([]byte, error) { } func (t *FeedPost_Labels) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } switch typ { case "com.atproto.label.defs#selfLabels": - t.LabelDefs_SelfLabels = new(comatprototypes.LabelDefs_SelfLabels) + t.LabelDefs_SelfLabels = new(comatproto.LabelDefs_SelfLabels) return json.Unmarshal(b, t.LabelDefs_SelfLabels) - default: return nil } @@ -200,17 +198,17 @@ func (t *FeedPost_Labels) MarshalCBOR(w io.Writer) error { } return fmt.Errorf("can not marshal empty union as CBOR") } + func (t *FeedPost_Labels) UnmarshalCBOR(r io.Reader) error { - typ, b, err := util.CborTypeExtractReader(r) + typ, b, err := lexutil.CborTypeExtractReader(r) if err != nil { return err } switch typ { case "com.atproto.label.defs#selfLabels": - t.LabelDefs_SelfLabels = new(comatprototypes.LabelDefs_SelfLabels) + t.LabelDefs_SelfLabels = new(comatproto.LabelDefs_SelfLabels) return t.LabelDefs_SelfLabels.UnmarshalCBOR(bytes.NewReader(b)) - default: return nil } @@ -218,8 +216,8 @@ func (t *FeedPost_Labels) UnmarshalCBOR(r io.Reader) error { // FeedPost_ReplyRef is a "replyRef" in the app.bsky.feed.post schema. type FeedPost_ReplyRef struct { - Parent *comatprototypes.RepoStrongRef `json:"parent" cborgen:"parent"` - Root *comatprototypes.RepoStrongRef `json:"root" cborgen:"root"` + Parent *comatproto.RepoStrongRef `json:"parent" cborgen:"parent"` + Root *comatproto.RepoStrongRef `json:"root" cborgen:"root"` } // FeedPost_TextSlice is a "textSlice" in the app.bsky.feed.post schema. diff --git a/api/bsky/feedpostgate.go b/api/bsky/feedpostgate.go index 47d85f89..1bed4443 100644 --- a/api/bsky/feedpostgate.go +++ b/api/bsky/feedpostgate.go @@ -10,12 +10,12 @@ import ( "fmt" "io" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" cbg "github.com/whyrusleeping/cbor-gen" ) func init() { - util.RegisterType("app.bsky.feed.postgate", &FeedPostgate{}) + lexutil.RegisterType("app.bsky.feed.postgate", &FeedPostgate{}) } type FeedPostgate struct { @@ -49,7 +49,7 @@ func (t *FeedPostgate_EmbeddingRules_Elem) MarshalJSON() ([]byte, error) { } func (t *FeedPostgate_EmbeddingRules_Elem) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -58,7 +58,6 @@ func (t *FeedPostgate_EmbeddingRules_Elem) UnmarshalJSON(b []byte) error { case "app.bsky.feed.postgate#disableRule": t.FeedPostgate_DisableRule = new(FeedPostgate_DisableRule) return json.Unmarshal(b, t.FeedPostgate_DisableRule) - default: return nil } @@ -75,8 +74,9 @@ func (t *FeedPostgate_EmbeddingRules_Elem) MarshalCBOR(w io.Writer) error { } return fmt.Errorf("can not marshal empty union as CBOR") } + func (t *FeedPostgate_EmbeddingRules_Elem) UnmarshalCBOR(r io.Reader) error { - typ, b, err := util.CborTypeExtractReader(r) + typ, b, err := lexutil.CborTypeExtractReader(r) if err != nil { return err } @@ -85,7 +85,6 @@ func (t *FeedPostgate_EmbeddingRules_Elem) UnmarshalCBOR(r io.Reader) error { case "app.bsky.feed.postgate#disableRule": t.FeedPostgate_DisableRule = new(FeedPostgate_DisableRule) return t.FeedPostgate_DisableRule.UnmarshalCBOR(bytes.NewReader(b)) - default: return nil } diff --git a/api/bsky/feedrepost.go b/api/bsky/feedrepost.go index 600b789a..485eaace 100644 --- a/api/bsky/feedrepost.go +++ b/api/bsky/feedrepost.go @@ -5,17 +5,17 @@ package bsky import ( - comatprototypes "github.com/bluesky-social/indigo/api/atproto" - "github.com/bluesky-social/indigo/lex/util" + comatproto "github.com/bluesky-social/indigo/api/atproto" + lexutil "github.com/bluesky-social/indigo/lex/util" ) func init() { - util.RegisterType("app.bsky.feed.repost", &FeedRepost{}) + lexutil.RegisterType("app.bsky.feed.repost", &FeedRepost{}) } type FeedRepost struct { - LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.feed.repost"` - CreatedAt string `json:"createdAt" cborgen:"createdAt"` - Subject *comatprototypes.RepoStrongRef `json:"subject" cborgen:"subject"` - Via *comatprototypes.RepoStrongRef `json:"via,omitempty" cborgen:"via,omitempty"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.feed.repost"` + CreatedAt string `json:"createdAt" cborgen:"createdAt"` + Subject *comatproto.RepoStrongRef `json:"subject" cborgen:"subject"` + Via *comatproto.RepoStrongRef `json:"via,omitempty" cborgen:"via,omitempty"` } diff --git a/api/bsky/feedsearchPosts.go b/api/bsky/feedsearchPosts.go index 48f29c57..3777557d 100644 --- a/api/bsky/feedsearchPosts.go +++ b/api/bsky/feedsearchPosts.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // FeedSearchPosts_Output is the output of a app.bsky.feed.searchPosts call. @@ -31,7 +31,7 @@ type FeedSearchPosts_Output struct { // tag: Filter to posts with the given tag (hashtag), based on rich-text facet or tag field. Do not include the hash (#) prefix. Multiple tags can be specified, with 'AND' matching. // until: Filter results for posts before the indicated datetime (not inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYY-MM-DD). // url: Filter to posts with links (facet links or embeds) pointing to this URL. Server may apply URL normalization or fuzzy matching. -func FeedSearchPosts(ctx context.Context, c util.LexClient, author string, cursor string, domain string, lang string, limit int64, mentions string, q string, since string, sort string, tag []string, until string, url string) (*FeedSearchPosts_Output, error) { +func FeedSearchPosts(ctx context.Context, c lexutil.LexClient, author string, cursor string, domain string, lang string, limit int64, mentions string, q string, since string, sort string, tag []string, until string, url string) (*FeedSearchPosts_Output, error) { var out FeedSearchPosts_Output params := map[string]interface{}{} @@ -69,7 +69,7 @@ func FeedSearchPosts(ctx context.Context, c util.LexClient, author string, curso if url != "" { params["url"] = url } - if err := c.LexDo(ctx, util.Query, "", "app.bsky.feed.searchPosts", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.feed.searchPosts", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/feedsendInteractions.go b/api/bsky/feedsendInteractions.go index 4f99759b..d011cb65 100644 --- a/api/bsky/feedsendInteractions.go +++ b/api/bsky/feedsendInteractions.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // FeedSendInteractions_Input is the input argument to a app.bsky.feed.sendInteractions call. @@ -20,9 +20,9 @@ type FeedSendInteractions_Output struct { } // FeedSendInteractions calls the XRPC method "app.bsky.feed.sendInteractions". -func FeedSendInteractions(ctx context.Context, c util.LexClient, input *FeedSendInteractions_Input) (*FeedSendInteractions_Output, error) { +func FeedSendInteractions(ctx context.Context, c lexutil.LexClient, input *FeedSendInteractions_Input) (*FeedSendInteractions_Output, error) { var out FeedSendInteractions_Output - if err := c.LexDo(ctx, util.Procedure, "application/json", "app.bsky.feed.sendInteractions", nil, input, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "app.bsky.feed.sendInteractions", nil, input, &out); err != nil { return nil, err } diff --git a/api/bsky/feedthreadgate.go b/api/bsky/feedthreadgate.go index a5bd43b9..064e0428 100644 --- a/api/bsky/feedthreadgate.go +++ b/api/bsky/feedthreadgate.go @@ -10,12 +10,12 @@ import ( "fmt" "io" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" cbg "github.com/whyrusleeping/cbor-gen" ) func init() { - util.RegisterType("app.bsky.feed.threadgate", &FeedThreadgate{}) + lexutil.RegisterType("app.bsky.feed.threadgate", &FeedThreadgate{}) } type FeedThreadgate struct { @@ -57,7 +57,7 @@ func (t *FeedThreadgate_Allow_Elem) MarshalJSON() ([]byte, error) { } func (t *FeedThreadgate_Allow_Elem) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -75,7 +75,6 @@ func (t *FeedThreadgate_Allow_Elem) UnmarshalJSON(b []byte) error { case "app.bsky.feed.threadgate#listRule": t.FeedThreadgate_ListRule = new(FeedThreadgate_ListRule) return json.Unmarshal(b, t.FeedThreadgate_ListRule) - default: return nil } @@ -101,8 +100,9 @@ func (t *FeedThreadgate_Allow_Elem) MarshalCBOR(w io.Writer) error { } return fmt.Errorf("can not marshal empty union as CBOR") } + func (t *FeedThreadgate_Allow_Elem) UnmarshalCBOR(r io.Reader) error { - typ, b, err := util.CborTypeExtractReader(r) + typ, b, err := lexutil.CborTypeExtractReader(r) if err != nil { return err } @@ -120,7 +120,6 @@ func (t *FeedThreadgate_Allow_Elem) UnmarshalCBOR(r io.Reader) error { case "app.bsky.feed.threadgate#listRule": t.FeedThreadgate_ListRule = new(FeedThreadgate_ListRule) return t.FeedThreadgate_ListRule.UnmarshalCBOR(bytes.NewReader(b)) - default: return nil } diff --git a/api/bsky/graphblock.go b/api/bsky/graphblock.go index 8dc7b8a9..ddd4a7d2 100644 --- a/api/bsky/graphblock.go +++ b/api/bsky/graphblock.go @@ -5,11 +5,11 @@ package bsky import ( - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) func init() { - util.RegisterType("app.bsky.graph.block", &GraphBlock{}) + lexutil.RegisterType("app.bsky.graph.block", &GraphBlock{}) } type GraphBlock struct { diff --git a/api/bsky/graphdefs.go b/api/bsky/graphdefs.go index 56db9759..80dcec7f 100644 --- a/api/bsky/graphdefs.go +++ b/api/bsky/graphdefs.go @@ -5,8 +5,8 @@ package bsky import ( - comatprototypes "github.com/bluesky-social/indigo/api/atproto" - "github.com/bluesky-social/indigo/lex/util" + comatproto "github.com/bluesky-social/indigo/api/atproto" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // GraphDefs_ListItemView is a "listItemView" in the app.bsky.graph.defs schema. @@ -17,32 +17,32 @@ type GraphDefs_ListItemView struct { // GraphDefs_ListView is a "listView" in the app.bsky.graph.defs schema. type GraphDefs_ListView struct { - LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.graph.defs#listView"` - Avatar *string `json:"avatar,omitempty" cborgen:"avatar,omitempty"` - Cid string `json:"cid" cborgen:"cid"` - Creator *ActorDefs_ProfileView `json:"creator" cborgen:"creator"` - Description *string `json:"description,omitempty" cborgen:"description,omitempty"` - DescriptionFacets []*RichtextFacet `json:"descriptionFacets,omitempty" cborgen:"descriptionFacets,omitempty"` - IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` - Labels []*comatprototypes.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` - ListItemCount *int64 `json:"listItemCount,omitempty" cborgen:"listItemCount,omitempty"` - Name string `json:"name" cborgen:"name"` - Purpose *string `json:"purpose" cborgen:"purpose"` - Uri string `json:"uri" cborgen:"uri"` - Viewer *GraphDefs_ListViewerState `json:"viewer,omitempty" cborgen:"viewer,omitempty"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.graph.defs#listView"` + Avatar *string `json:"avatar,omitempty" cborgen:"avatar,omitempty"` + Cid string `json:"cid" cborgen:"cid"` + Creator *ActorDefs_ProfileView `json:"creator" cborgen:"creator"` + Description *string `json:"description,omitempty" cborgen:"description,omitempty"` + DescriptionFacets []*RichtextFacet `json:"descriptionFacets,omitempty" cborgen:"descriptionFacets,omitempty"` + IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` + Labels []*comatproto.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` + ListItemCount *int64 `json:"listItemCount,omitempty" cborgen:"listItemCount,omitempty"` + Name string `json:"name" cborgen:"name"` + Purpose *string `json:"purpose" cborgen:"purpose"` + Uri string `json:"uri" cborgen:"uri"` + Viewer *GraphDefs_ListViewerState `json:"viewer,omitempty" cborgen:"viewer,omitempty"` } // GraphDefs_ListViewBasic is a "listViewBasic" in the app.bsky.graph.defs schema. type GraphDefs_ListViewBasic struct { - Avatar *string `json:"avatar,omitempty" cborgen:"avatar,omitempty"` - Cid string `json:"cid" cborgen:"cid"` - IndexedAt *string `json:"indexedAt,omitempty" cborgen:"indexedAt,omitempty"` - Labels []*comatprototypes.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` - ListItemCount *int64 `json:"listItemCount,omitempty" cborgen:"listItemCount,omitempty"` - Name string `json:"name" cborgen:"name"` - Purpose *string `json:"purpose" cborgen:"purpose"` - Uri string `json:"uri" cborgen:"uri"` - Viewer *GraphDefs_ListViewerState `json:"viewer,omitempty" cborgen:"viewer,omitempty"` + Avatar *string `json:"avatar,omitempty" cborgen:"avatar,omitempty"` + Cid string `json:"cid" cborgen:"cid"` + IndexedAt *string `json:"indexedAt,omitempty" cborgen:"indexedAt,omitempty"` + Labels []*comatproto.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` + ListItemCount *int64 `json:"listItemCount,omitempty" cborgen:"listItemCount,omitempty"` + Name string `json:"name" cborgen:"name"` + Purpose *string `json:"purpose" cborgen:"purpose"` + Uri string `json:"uri" cborgen:"uri"` + Viewer *GraphDefs_ListViewerState `json:"viewer,omitempty" cborgen:"viewer,omitempty"` } // GraphDefs_ListViewerState is a "listViewerState" in the app.bsky.graph.defs schema. @@ -74,29 +74,29 @@ type GraphDefs_Relationship struct { // GraphDefs_StarterPackView is a "starterPackView" in the app.bsky.graph.defs schema. type GraphDefs_StarterPackView struct { - Cid string `json:"cid" cborgen:"cid"` - Creator *ActorDefs_ProfileViewBasic `json:"creator" cborgen:"creator"` - Feeds []*FeedDefs_GeneratorView `json:"feeds,omitempty" cborgen:"feeds,omitempty"` - IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` - JoinedAllTimeCount *int64 `json:"joinedAllTimeCount,omitempty" cborgen:"joinedAllTimeCount,omitempty"` - JoinedWeekCount *int64 `json:"joinedWeekCount,omitempty" cborgen:"joinedWeekCount,omitempty"` - Labels []*comatprototypes.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` - List *GraphDefs_ListViewBasic `json:"list,omitempty" cborgen:"list,omitempty"` - ListItemsSample []*GraphDefs_ListItemView `json:"listItemsSample,omitempty" cborgen:"listItemsSample,omitempty"` - Record *util.LexiconTypeDecoder `json:"record" cborgen:"record"` - Uri string `json:"uri" cborgen:"uri"` + Cid string `json:"cid" cborgen:"cid"` + Creator *ActorDefs_ProfileViewBasic `json:"creator" cborgen:"creator"` + Feeds []*FeedDefs_GeneratorView `json:"feeds,omitempty" cborgen:"feeds,omitempty"` + IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` + JoinedAllTimeCount *int64 `json:"joinedAllTimeCount,omitempty" cborgen:"joinedAllTimeCount,omitempty"` + JoinedWeekCount *int64 `json:"joinedWeekCount,omitempty" cborgen:"joinedWeekCount,omitempty"` + Labels []*comatproto.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` + List *GraphDefs_ListViewBasic `json:"list,omitempty" cborgen:"list,omitempty"` + ListItemsSample []*GraphDefs_ListItemView `json:"listItemsSample,omitempty" cborgen:"listItemsSample,omitempty"` + Record *lexutil.LexiconTypeDecoder `json:"record" cborgen:"record"` + Uri string `json:"uri" cborgen:"uri"` } // GraphDefs_StarterPackViewBasic is a "starterPackViewBasic" in the app.bsky.graph.defs schema. type GraphDefs_StarterPackViewBasic struct { - LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.graph.defs#starterPackViewBasic"` - Cid string `json:"cid" cborgen:"cid"` - Creator *ActorDefs_ProfileViewBasic `json:"creator" cborgen:"creator"` - IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` - JoinedAllTimeCount *int64 `json:"joinedAllTimeCount,omitempty" cborgen:"joinedAllTimeCount,omitempty"` - JoinedWeekCount *int64 `json:"joinedWeekCount,omitempty" cborgen:"joinedWeekCount,omitempty"` - Labels []*comatprototypes.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` - ListItemCount *int64 `json:"listItemCount,omitempty" cborgen:"listItemCount,omitempty"` - Record *util.LexiconTypeDecoder `json:"record" cborgen:"record"` - Uri string `json:"uri" cborgen:"uri"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.graph.defs#starterPackViewBasic"` + Cid string `json:"cid" cborgen:"cid"` + Creator *ActorDefs_ProfileViewBasic `json:"creator" cborgen:"creator"` + IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` + JoinedAllTimeCount *int64 `json:"joinedAllTimeCount,omitempty" cborgen:"joinedAllTimeCount,omitempty"` + JoinedWeekCount *int64 `json:"joinedWeekCount,omitempty" cborgen:"joinedWeekCount,omitempty"` + Labels []*comatproto.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` + ListItemCount *int64 `json:"listItemCount,omitempty" cborgen:"listItemCount,omitempty"` + Record *lexutil.LexiconTypeDecoder `json:"record" cborgen:"record"` + Uri string `json:"uri" cborgen:"uri"` } diff --git a/api/bsky/graphfollow.go b/api/bsky/graphfollow.go index bbbb2864..37bca6e4 100644 --- a/api/bsky/graphfollow.go +++ b/api/bsky/graphfollow.go @@ -5,11 +5,11 @@ package bsky import ( - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) func init() { - util.RegisterType("app.bsky.graph.follow", &GraphFollow{}) + lexutil.RegisterType("app.bsky.graph.follow", &GraphFollow{}) } type GraphFollow struct { diff --git a/api/bsky/graphgetActorStarterPacks.go b/api/bsky/graphgetActorStarterPacks.go index e564ca39..e1bd6575 100644 --- a/api/bsky/graphgetActorStarterPacks.go +++ b/api/bsky/graphgetActorStarterPacks.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // GraphGetActorStarterPacks_Output is the output of a app.bsky.graph.getActorStarterPacks call. @@ -17,7 +17,7 @@ type GraphGetActorStarterPacks_Output struct { } // GraphGetActorStarterPacks calls the XRPC method "app.bsky.graph.getActorStarterPacks". -func GraphGetActorStarterPacks(ctx context.Context, c util.LexClient, actor string, cursor string, limit int64) (*GraphGetActorStarterPacks_Output, error) { +func GraphGetActorStarterPacks(ctx context.Context, c lexutil.LexClient, actor string, cursor string, limit int64) (*GraphGetActorStarterPacks_Output, error) { var out GraphGetActorStarterPacks_Output params := map[string]interface{}{} @@ -28,7 +28,7 @@ func GraphGetActorStarterPacks(ctx context.Context, c util.LexClient, actor stri if limit != 0 { params["limit"] = limit } - if err := c.LexDo(ctx, util.Query, "", "app.bsky.graph.getActorStarterPacks", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.graph.getActorStarterPacks", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/graphgetBlocks.go b/api/bsky/graphgetBlocks.go index e31c0414..d1f70929 100644 --- a/api/bsky/graphgetBlocks.go +++ b/api/bsky/graphgetBlocks.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // GraphGetBlocks_Output is the output of a app.bsky.graph.getBlocks call. @@ -17,7 +17,7 @@ type GraphGetBlocks_Output struct { } // GraphGetBlocks calls the XRPC method "app.bsky.graph.getBlocks". -func GraphGetBlocks(ctx context.Context, c util.LexClient, cursor string, limit int64) (*GraphGetBlocks_Output, error) { +func GraphGetBlocks(ctx context.Context, c lexutil.LexClient, cursor string, limit int64) (*GraphGetBlocks_Output, error) { var out GraphGetBlocks_Output params := map[string]interface{}{} @@ -27,7 +27,7 @@ func GraphGetBlocks(ctx context.Context, c util.LexClient, cursor string, limit if limit != 0 { params["limit"] = limit } - if err := c.LexDo(ctx, util.Query, "", "app.bsky.graph.getBlocks", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.graph.getBlocks", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/graphgetFollowers.go b/api/bsky/graphgetFollowers.go index fb7e6634..24545908 100644 --- a/api/bsky/graphgetFollowers.go +++ b/api/bsky/graphgetFollowers.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // GraphGetFollowers_Output is the output of a app.bsky.graph.getFollowers call. @@ -18,7 +18,7 @@ type GraphGetFollowers_Output struct { } // GraphGetFollowers calls the XRPC method "app.bsky.graph.getFollowers". -func GraphGetFollowers(ctx context.Context, c util.LexClient, actor string, cursor string, limit int64) (*GraphGetFollowers_Output, error) { +func GraphGetFollowers(ctx context.Context, c lexutil.LexClient, actor string, cursor string, limit int64) (*GraphGetFollowers_Output, error) { var out GraphGetFollowers_Output params := map[string]interface{}{} @@ -29,7 +29,7 @@ func GraphGetFollowers(ctx context.Context, c util.LexClient, actor string, curs if limit != 0 { params["limit"] = limit } - if err := c.LexDo(ctx, util.Query, "", "app.bsky.graph.getFollowers", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.graph.getFollowers", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/graphgetFollows.go b/api/bsky/graphgetFollows.go index 7406ec29..2ab0fb3e 100644 --- a/api/bsky/graphgetFollows.go +++ b/api/bsky/graphgetFollows.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // GraphGetFollows_Output is the output of a app.bsky.graph.getFollows call. @@ -18,7 +18,7 @@ type GraphGetFollows_Output struct { } // GraphGetFollows calls the XRPC method "app.bsky.graph.getFollows". -func GraphGetFollows(ctx context.Context, c util.LexClient, actor string, cursor string, limit int64) (*GraphGetFollows_Output, error) { +func GraphGetFollows(ctx context.Context, c lexutil.LexClient, actor string, cursor string, limit int64) (*GraphGetFollows_Output, error) { var out GraphGetFollows_Output params := map[string]interface{}{} @@ -29,7 +29,7 @@ func GraphGetFollows(ctx context.Context, c util.LexClient, actor string, cursor if limit != 0 { params["limit"] = limit } - if err := c.LexDo(ctx, util.Query, "", "app.bsky.graph.getFollows", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.graph.getFollows", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/graphgetKnownFollowers.go b/api/bsky/graphgetKnownFollowers.go index a0e09799..7c4c9db9 100644 --- a/api/bsky/graphgetKnownFollowers.go +++ b/api/bsky/graphgetKnownFollowers.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // GraphGetKnownFollowers_Output is the output of a app.bsky.graph.getKnownFollowers call. @@ -18,7 +18,7 @@ type GraphGetKnownFollowers_Output struct { } // GraphGetKnownFollowers calls the XRPC method "app.bsky.graph.getKnownFollowers". -func GraphGetKnownFollowers(ctx context.Context, c util.LexClient, actor string, cursor string, limit int64) (*GraphGetKnownFollowers_Output, error) { +func GraphGetKnownFollowers(ctx context.Context, c lexutil.LexClient, actor string, cursor string, limit int64) (*GraphGetKnownFollowers_Output, error) { var out GraphGetKnownFollowers_Output params := map[string]interface{}{} @@ -29,7 +29,7 @@ func GraphGetKnownFollowers(ctx context.Context, c util.LexClient, actor string, if limit != 0 { params["limit"] = limit } - if err := c.LexDo(ctx, util.Query, "", "app.bsky.graph.getKnownFollowers", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.graph.getKnownFollowers", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/graphgetList.go b/api/bsky/graphgetList.go index c4c62519..69d9891b 100644 --- a/api/bsky/graphgetList.go +++ b/api/bsky/graphgetList.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // GraphGetList_Output is the output of a app.bsky.graph.getList call. @@ -20,7 +20,7 @@ type GraphGetList_Output struct { // GraphGetList calls the XRPC method "app.bsky.graph.getList". // // list: Reference (AT-URI) of the list record to hydrate. -func GraphGetList(ctx context.Context, c util.LexClient, cursor string, limit int64, list string) (*GraphGetList_Output, error) { +func GraphGetList(ctx context.Context, c lexutil.LexClient, cursor string, limit int64, list string) (*GraphGetList_Output, error) { var out GraphGetList_Output params := map[string]interface{}{} @@ -31,7 +31,7 @@ func GraphGetList(ctx context.Context, c util.LexClient, cursor string, limit in params["limit"] = limit } params["list"] = list - if err := c.LexDo(ctx, util.Query, "", "app.bsky.graph.getList", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.graph.getList", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/graphgetListBlocks.go b/api/bsky/graphgetListBlocks.go index a5ebc98a..edf1423b 100644 --- a/api/bsky/graphgetListBlocks.go +++ b/api/bsky/graphgetListBlocks.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // GraphGetListBlocks_Output is the output of a app.bsky.graph.getListBlocks call. @@ -17,7 +17,7 @@ type GraphGetListBlocks_Output struct { } // GraphGetListBlocks calls the XRPC method "app.bsky.graph.getListBlocks". -func GraphGetListBlocks(ctx context.Context, c util.LexClient, cursor string, limit int64) (*GraphGetListBlocks_Output, error) { +func GraphGetListBlocks(ctx context.Context, c lexutil.LexClient, cursor string, limit int64) (*GraphGetListBlocks_Output, error) { var out GraphGetListBlocks_Output params := map[string]interface{}{} @@ -27,7 +27,7 @@ func GraphGetListBlocks(ctx context.Context, c util.LexClient, cursor string, li if limit != 0 { params["limit"] = limit } - if err := c.LexDo(ctx, util.Query, "", "app.bsky.graph.getListBlocks", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.graph.getListBlocks", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/graphgetListMutes.go b/api/bsky/graphgetListMutes.go index 750fb41a..03eb976f 100644 --- a/api/bsky/graphgetListMutes.go +++ b/api/bsky/graphgetListMutes.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // GraphGetListMutes_Output is the output of a app.bsky.graph.getListMutes call. @@ -17,7 +17,7 @@ type GraphGetListMutes_Output struct { } // GraphGetListMutes calls the XRPC method "app.bsky.graph.getListMutes". -func GraphGetListMutes(ctx context.Context, c util.LexClient, cursor string, limit int64) (*GraphGetListMutes_Output, error) { +func GraphGetListMutes(ctx context.Context, c lexutil.LexClient, cursor string, limit int64) (*GraphGetListMutes_Output, error) { var out GraphGetListMutes_Output params := map[string]interface{}{} @@ -27,7 +27,7 @@ func GraphGetListMutes(ctx context.Context, c util.LexClient, cursor string, lim if limit != 0 { params["limit"] = limit } - if err := c.LexDo(ctx, util.Query, "", "app.bsky.graph.getListMutes", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.graph.getListMutes", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/graphgetLists.go b/api/bsky/graphgetLists.go index 69a8eaed..1ca8df35 100644 --- a/api/bsky/graphgetLists.go +++ b/api/bsky/graphgetLists.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // GraphGetLists_Output is the output of a app.bsky.graph.getLists call. @@ -20,7 +20,7 @@ type GraphGetLists_Output struct { // // actor: The account (actor) to enumerate lists from. // purposes: Optional filter by list purpose. If not specified, all supported types are returned. -func GraphGetLists(ctx context.Context, c util.LexClient, actor string, cursor string, limit int64, purposes []string) (*GraphGetLists_Output, error) { +func GraphGetLists(ctx context.Context, c lexutil.LexClient, actor string, cursor string, limit int64, purposes []string) (*GraphGetLists_Output, error) { var out GraphGetLists_Output params := map[string]interface{}{} @@ -34,7 +34,7 @@ func GraphGetLists(ctx context.Context, c util.LexClient, actor string, cursor s if len(purposes) != 0 { params["purposes"] = purposes } - if err := c.LexDo(ctx, util.Query, "", "app.bsky.graph.getLists", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.graph.getLists", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/graphgetListsWithMembership.go b/api/bsky/graphgetListsWithMembership.go index c967d288..4b829752 100644 --- a/api/bsky/graphgetListsWithMembership.go +++ b/api/bsky/graphgetListsWithMembership.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // GraphGetListsWithMembership_ListWithMembership is a "listWithMembership" in the app.bsky.graph.getListsWithMembership schema. @@ -28,7 +28,7 @@ type GraphGetListsWithMembership_Output struct { // // actor: The account (actor) to check for membership. // purposes: Optional filter by list purpose. If not specified, all supported types are returned. -func GraphGetListsWithMembership(ctx context.Context, c util.LexClient, actor string, cursor string, limit int64, purposes []string) (*GraphGetListsWithMembership_Output, error) { +func GraphGetListsWithMembership(ctx context.Context, c lexutil.LexClient, actor string, cursor string, limit int64, purposes []string) (*GraphGetListsWithMembership_Output, error) { var out GraphGetListsWithMembership_Output params := map[string]interface{}{} @@ -42,7 +42,7 @@ func GraphGetListsWithMembership(ctx context.Context, c util.LexClient, actor st if len(purposes) != 0 { params["purposes"] = purposes } - if err := c.LexDo(ctx, util.Query, "", "app.bsky.graph.getListsWithMembership", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.graph.getListsWithMembership", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/graphgetMutes.go b/api/bsky/graphgetMutes.go index cf38e20e..32f4e629 100644 --- a/api/bsky/graphgetMutes.go +++ b/api/bsky/graphgetMutes.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // GraphGetMutes_Output is the output of a app.bsky.graph.getMutes call. @@ -17,7 +17,7 @@ type GraphGetMutes_Output struct { } // GraphGetMutes calls the XRPC method "app.bsky.graph.getMutes". -func GraphGetMutes(ctx context.Context, c util.LexClient, cursor string, limit int64) (*GraphGetMutes_Output, error) { +func GraphGetMutes(ctx context.Context, c lexutil.LexClient, cursor string, limit int64) (*GraphGetMutes_Output, error) { var out GraphGetMutes_Output params := map[string]interface{}{} @@ -27,7 +27,7 @@ func GraphGetMutes(ctx context.Context, c util.LexClient, cursor string, limit i if limit != 0 { params["limit"] = limit } - if err := c.LexDo(ctx, util.Query, "", "app.bsky.graph.getMutes", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.graph.getMutes", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/graphgetRelationships.go b/api/bsky/graphgetRelationships.go index 96492071..2cc6edc6 100644 --- a/api/bsky/graphgetRelationships.go +++ b/api/bsky/graphgetRelationships.go @@ -9,7 +9,7 @@ import ( "encoding/json" "fmt" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // GraphGetRelationships_Output is the output of a app.bsky.graph.getRelationships call. @@ -36,7 +36,7 @@ func (t *GraphGetRelationships_Output_Relationships_Elem) MarshalJSON() ([]byte, } func (t *GraphGetRelationships_Output_Relationships_Elem) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -48,7 +48,6 @@ func (t *GraphGetRelationships_Output_Relationships_Elem) UnmarshalJSON(b []byte case "app.bsky.graph.defs#notFoundActor": t.GraphDefs_NotFoundActor = new(GraphDefs_NotFoundActor) return json.Unmarshal(b, t.GraphDefs_NotFoundActor) - default: return nil } @@ -58,7 +57,7 @@ func (t *GraphGetRelationships_Output_Relationships_Elem) UnmarshalJSON(b []byte // // actor: Primary account requesting relationships for. // others: List of 'other' accounts to be related back to the primary. -func GraphGetRelationships(ctx context.Context, c util.LexClient, actor string, others []string) (*GraphGetRelationships_Output, error) { +func GraphGetRelationships(ctx context.Context, c lexutil.LexClient, actor string, others []string) (*GraphGetRelationships_Output, error) { var out GraphGetRelationships_Output params := map[string]interface{}{} @@ -66,7 +65,7 @@ func GraphGetRelationships(ctx context.Context, c util.LexClient, actor string, if len(others) != 0 { params["others"] = others } - if err := c.LexDo(ctx, util.Query, "", "app.bsky.graph.getRelationships", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.graph.getRelationships", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/graphgetStarterPack.go b/api/bsky/graphgetStarterPack.go index 82e826c9..6652ef12 100644 --- a/api/bsky/graphgetStarterPack.go +++ b/api/bsky/graphgetStarterPack.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // GraphGetStarterPack_Output is the output of a app.bsky.graph.getStarterPack call. @@ -18,12 +18,12 @@ type GraphGetStarterPack_Output struct { // GraphGetStarterPack calls the XRPC method "app.bsky.graph.getStarterPack". // // starterPack: Reference (AT-URI) of the starter pack record. -func GraphGetStarterPack(ctx context.Context, c util.LexClient, starterPack string) (*GraphGetStarterPack_Output, error) { +func GraphGetStarterPack(ctx context.Context, c lexutil.LexClient, starterPack string) (*GraphGetStarterPack_Output, error) { var out GraphGetStarterPack_Output params := map[string]interface{}{} params["starterPack"] = starterPack - if err := c.LexDo(ctx, util.Query, "", "app.bsky.graph.getStarterPack", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.graph.getStarterPack", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/graphgetStarterPacks.go b/api/bsky/graphgetStarterPacks.go index 9efedc53..c4475776 100644 --- a/api/bsky/graphgetStarterPacks.go +++ b/api/bsky/graphgetStarterPacks.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // GraphGetStarterPacks_Output is the output of a app.bsky.graph.getStarterPacks call. @@ -16,12 +16,12 @@ type GraphGetStarterPacks_Output struct { } // GraphGetStarterPacks calls the XRPC method "app.bsky.graph.getStarterPacks". -func GraphGetStarterPacks(ctx context.Context, c util.LexClient, uris []string) (*GraphGetStarterPacks_Output, error) { +func GraphGetStarterPacks(ctx context.Context, c lexutil.LexClient, uris []string) (*GraphGetStarterPacks_Output, error) { var out GraphGetStarterPacks_Output params := map[string]interface{}{} params["uris"] = uris - if err := c.LexDo(ctx, util.Query, "", "app.bsky.graph.getStarterPacks", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.graph.getStarterPacks", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/graphgetStarterPacksWithMembership.go b/api/bsky/graphgetStarterPacksWithMembership.go index 4586ae94..a738b460 100644 --- a/api/bsky/graphgetStarterPacksWithMembership.go +++ b/api/bsky/graphgetStarterPacksWithMembership.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // GraphGetStarterPacksWithMembership_Output is the output of a app.bsky.graph.getStarterPacksWithMembership call. @@ -27,7 +27,7 @@ type GraphGetStarterPacksWithMembership_StarterPackWithMembership struct { // GraphGetStarterPacksWithMembership calls the XRPC method "app.bsky.graph.getStarterPacksWithMembership". // // actor: The account (actor) to check for membership. -func GraphGetStarterPacksWithMembership(ctx context.Context, c util.LexClient, actor string, cursor string, limit int64) (*GraphGetStarterPacksWithMembership_Output, error) { +func GraphGetStarterPacksWithMembership(ctx context.Context, c lexutil.LexClient, actor string, cursor string, limit int64) (*GraphGetStarterPacksWithMembership_Output, error) { var out GraphGetStarterPacksWithMembership_Output params := map[string]interface{}{} @@ -38,7 +38,7 @@ func GraphGetStarterPacksWithMembership(ctx context.Context, c util.LexClient, a if limit != 0 { params["limit"] = limit } - if err := c.LexDo(ctx, util.Query, "", "app.bsky.graph.getStarterPacksWithMembership", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.graph.getStarterPacksWithMembership", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/graphgetSuggestedFollowsByActor.go b/api/bsky/graphgetSuggestedFollowsByActor.go index 19e52699..ec1b8269 100644 --- a/api/bsky/graphgetSuggestedFollowsByActor.go +++ b/api/bsky/graphgetSuggestedFollowsByActor.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // GraphGetSuggestedFollowsByActor_Output is the output of a app.bsky.graph.getSuggestedFollowsByActor call. @@ -20,12 +20,12 @@ type GraphGetSuggestedFollowsByActor_Output struct { } // GraphGetSuggestedFollowsByActor calls the XRPC method "app.bsky.graph.getSuggestedFollowsByActor". -func GraphGetSuggestedFollowsByActor(ctx context.Context, c util.LexClient, actor string) (*GraphGetSuggestedFollowsByActor_Output, error) { +func GraphGetSuggestedFollowsByActor(ctx context.Context, c lexutil.LexClient, actor string) (*GraphGetSuggestedFollowsByActor_Output, error) { var out GraphGetSuggestedFollowsByActor_Output params := map[string]interface{}{} params["actor"] = actor - if err := c.LexDo(ctx, util.Query, "", "app.bsky.graph.getSuggestedFollowsByActor", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.graph.getSuggestedFollowsByActor", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/graphlist.go b/api/bsky/graphlist.go index ae5cd351..d5dd1ea2 100644 --- a/api/bsky/graphlist.go +++ b/api/bsky/graphlist.go @@ -10,18 +10,18 @@ import ( "fmt" "io" - comatprototypes "github.com/bluesky-social/indigo/api/atproto" - "github.com/bluesky-social/indigo/lex/util" + comatproto "github.com/bluesky-social/indigo/api/atproto" + lexutil "github.com/bluesky-social/indigo/lex/util" cbg "github.com/whyrusleeping/cbor-gen" ) func init() { - util.RegisterType("app.bsky.graph.list", &GraphList{}) + lexutil.RegisterType("app.bsky.graph.list", &GraphList{}) } type GraphList struct { LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.graph.list"` - Avatar *util.LexBlob `json:"avatar,omitempty" cborgen:"avatar,omitempty"` + Avatar *lexutil.LexBlob `json:"avatar,omitempty" cborgen:"avatar,omitempty"` CreatedAt string `json:"createdAt" cborgen:"createdAt"` Description *string `json:"description,omitempty" cborgen:"description,omitempty"` DescriptionFacets []*RichtextFacet `json:"descriptionFacets,omitempty" cborgen:"descriptionFacets,omitempty"` @@ -33,7 +33,7 @@ type GraphList struct { } type GraphList_Labels struct { - LabelDefs_SelfLabels *comatprototypes.LabelDefs_SelfLabels + LabelDefs_SelfLabels *comatproto.LabelDefs_SelfLabels } func (t *GraphList_Labels) MarshalJSON() ([]byte, error) { @@ -45,16 +45,15 @@ func (t *GraphList_Labels) MarshalJSON() ([]byte, error) { } func (t *GraphList_Labels) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } switch typ { case "com.atproto.label.defs#selfLabels": - t.LabelDefs_SelfLabels = new(comatprototypes.LabelDefs_SelfLabels) + t.LabelDefs_SelfLabels = new(comatproto.LabelDefs_SelfLabels) return json.Unmarshal(b, t.LabelDefs_SelfLabels) - default: return nil } @@ -71,17 +70,17 @@ func (t *GraphList_Labels) MarshalCBOR(w io.Writer) error { } return fmt.Errorf("can not marshal empty union as CBOR") } + func (t *GraphList_Labels) UnmarshalCBOR(r io.Reader) error { - typ, b, err := util.CborTypeExtractReader(r) + typ, b, err := lexutil.CborTypeExtractReader(r) if err != nil { return err } switch typ { case "com.atproto.label.defs#selfLabels": - t.LabelDefs_SelfLabels = new(comatprototypes.LabelDefs_SelfLabels) + t.LabelDefs_SelfLabels = new(comatproto.LabelDefs_SelfLabels) return t.LabelDefs_SelfLabels.UnmarshalCBOR(bytes.NewReader(b)) - default: return nil } diff --git a/api/bsky/graphlistblock.go b/api/bsky/graphlistblock.go index bc6c5de7..1971a18f 100644 --- a/api/bsky/graphlistblock.go +++ b/api/bsky/graphlistblock.go @@ -5,11 +5,11 @@ package bsky import ( - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) func init() { - util.RegisterType("app.bsky.graph.listblock", &GraphListblock{}) + lexutil.RegisterType("app.bsky.graph.listblock", &GraphListblock{}) } type GraphListblock struct { diff --git a/api/bsky/graphlistitem.go b/api/bsky/graphlistitem.go index 63bb1903..18e487f5 100644 --- a/api/bsky/graphlistitem.go +++ b/api/bsky/graphlistitem.go @@ -5,11 +5,11 @@ package bsky import ( - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) func init() { - util.RegisterType("app.bsky.graph.listitem", &GraphListitem{}) + lexutil.RegisterType("app.bsky.graph.listitem", &GraphListitem{}) } type GraphListitem struct { diff --git a/api/bsky/graphmuteActor.go b/api/bsky/graphmuteActor.go index e29ce7ac..ef1e6a24 100644 --- a/api/bsky/graphmuteActor.go +++ b/api/bsky/graphmuteActor.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // GraphMuteActor_Input is the input argument to a app.bsky.graph.muteActor call. @@ -16,8 +16,8 @@ type GraphMuteActor_Input struct { } // GraphMuteActor calls the XRPC method "app.bsky.graph.muteActor". -func GraphMuteActor(ctx context.Context, c util.LexClient, input *GraphMuteActor_Input) error { - if err := c.LexDo(ctx, util.Procedure, "application/json", "app.bsky.graph.muteActor", nil, input, nil); err != nil { +func GraphMuteActor(ctx context.Context, c lexutil.LexClient, input *GraphMuteActor_Input) error { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "app.bsky.graph.muteActor", nil, input, nil); err != nil { return err } diff --git a/api/bsky/graphmuteActorList.go b/api/bsky/graphmuteActorList.go index 3dc5f767..df3e9fd5 100644 --- a/api/bsky/graphmuteActorList.go +++ b/api/bsky/graphmuteActorList.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // GraphMuteActorList_Input is the input argument to a app.bsky.graph.muteActorList call. @@ -16,8 +16,8 @@ type GraphMuteActorList_Input struct { } // GraphMuteActorList calls the XRPC method "app.bsky.graph.muteActorList". -func GraphMuteActorList(ctx context.Context, c util.LexClient, input *GraphMuteActorList_Input) error { - if err := c.LexDo(ctx, util.Procedure, "application/json", "app.bsky.graph.muteActorList", nil, input, nil); err != nil { +func GraphMuteActorList(ctx context.Context, c lexutil.LexClient, input *GraphMuteActorList_Input) error { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "app.bsky.graph.muteActorList", nil, input, nil); err != nil { return err } diff --git a/api/bsky/graphmuteThread.go b/api/bsky/graphmuteThread.go index 672b5417..9f841a9c 100644 --- a/api/bsky/graphmuteThread.go +++ b/api/bsky/graphmuteThread.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // GraphMuteThread_Input is the input argument to a app.bsky.graph.muteThread call. @@ -16,8 +16,8 @@ type GraphMuteThread_Input struct { } // GraphMuteThread calls the XRPC method "app.bsky.graph.muteThread". -func GraphMuteThread(ctx context.Context, c util.LexClient, input *GraphMuteThread_Input) error { - if err := c.LexDo(ctx, util.Procedure, "application/json", "app.bsky.graph.muteThread", nil, input, nil); err != nil { +func GraphMuteThread(ctx context.Context, c lexutil.LexClient, input *GraphMuteThread_Input) error { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "app.bsky.graph.muteThread", nil, input, nil); err != nil { return err } diff --git a/api/bsky/graphsearchStarterPacks.go b/api/bsky/graphsearchStarterPacks.go index ca8e6bf5..4a38491e 100644 --- a/api/bsky/graphsearchStarterPacks.go +++ b/api/bsky/graphsearchStarterPacks.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // GraphSearchStarterPacks_Output is the output of a app.bsky.graph.searchStarterPacks call. @@ -19,7 +19,7 @@ type GraphSearchStarterPacks_Output struct { // GraphSearchStarterPacks calls the XRPC method "app.bsky.graph.searchStarterPacks". // // q: Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. -func GraphSearchStarterPacks(ctx context.Context, c util.LexClient, cursor string, limit int64, q string) (*GraphSearchStarterPacks_Output, error) { +func GraphSearchStarterPacks(ctx context.Context, c lexutil.LexClient, cursor string, limit int64, q string) (*GraphSearchStarterPacks_Output, error) { var out GraphSearchStarterPacks_Output params := map[string]interface{}{} @@ -30,7 +30,7 @@ func GraphSearchStarterPacks(ctx context.Context, c util.LexClient, cursor strin params["limit"] = limit } params["q"] = q - if err := c.LexDo(ctx, util.Query, "", "app.bsky.graph.searchStarterPacks", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.graph.searchStarterPacks", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/graphstarterpack.go b/api/bsky/graphstarterpack.go index 9cbce888..d31b3f42 100644 --- a/api/bsky/graphstarterpack.go +++ b/api/bsky/graphstarterpack.go @@ -5,11 +5,11 @@ package bsky import ( - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) func init() { - util.RegisterType("app.bsky.graph.starterpack", &GraphStarterpack{}) + lexutil.RegisterType("app.bsky.graph.starterpack", &GraphStarterpack{}) } type GraphStarterpack struct { diff --git a/api/bsky/graphunmuteActor.go b/api/bsky/graphunmuteActor.go index 3e0ea87a..13849844 100644 --- a/api/bsky/graphunmuteActor.go +++ b/api/bsky/graphunmuteActor.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // GraphUnmuteActor_Input is the input argument to a app.bsky.graph.unmuteActor call. @@ -16,8 +16,8 @@ type GraphUnmuteActor_Input struct { } // GraphUnmuteActor calls the XRPC method "app.bsky.graph.unmuteActor". -func GraphUnmuteActor(ctx context.Context, c util.LexClient, input *GraphUnmuteActor_Input) error { - if err := c.LexDo(ctx, util.Procedure, "application/json", "app.bsky.graph.unmuteActor", nil, input, nil); err != nil { +func GraphUnmuteActor(ctx context.Context, c lexutil.LexClient, input *GraphUnmuteActor_Input) error { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "app.bsky.graph.unmuteActor", nil, input, nil); err != nil { return err } diff --git a/api/bsky/graphunmuteActorList.go b/api/bsky/graphunmuteActorList.go index 006748fc..6fbf1463 100644 --- a/api/bsky/graphunmuteActorList.go +++ b/api/bsky/graphunmuteActorList.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // GraphUnmuteActorList_Input is the input argument to a app.bsky.graph.unmuteActorList call. @@ -16,8 +16,8 @@ type GraphUnmuteActorList_Input struct { } // GraphUnmuteActorList calls the XRPC method "app.bsky.graph.unmuteActorList". -func GraphUnmuteActorList(ctx context.Context, c util.LexClient, input *GraphUnmuteActorList_Input) error { - if err := c.LexDo(ctx, util.Procedure, "application/json", "app.bsky.graph.unmuteActorList", nil, input, nil); err != nil { +func GraphUnmuteActorList(ctx context.Context, c lexutil.LexClient, input *GraphUnmuteActorList_Input) error { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "app.bsky.graph.unmuteActorList", nil, input, nil); err != nil { return err } diff --git a/api/bsky/graphunmuteThread.go b/api/bsky/graphunmuteThread.go index 921053de..81f6e4bf 100644 --- a/api/bsky/graphunmuteThread.go +++ b/api/bsky/graphunmuteThread.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // GraphUnmuteThread_Input is the input argument to a app.bsky.graph.unmuteThread call. @@ -16,8 +16,8 @@ type GraphUnmuteThread_Input struct { } // GraphUnmuteThread calls the XRPC method "app.bsky.graph.unmuteThread". -func GraphUnmuteThread(ctx context.Context, c util.LexClient, input *GraphUnmuteThread_Input) error { - if err := c.LexDo(ctx, util.Procedure, "application/json", "app.bsky.graph.unmuteThread", nil, input, nil); err != nil { +func GraphUnmuteThread(ctx context.Context, c lexutil.LexClient, input *GraphUnmuteThread_Input) error { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "app.bsky.graph.unmuteThread", nil, input, nil); err != nil { return err } diff --git a/api/bsky/graphverification.go b/api/bsky/graphverification.go index f61b3da4..144ee2e6 100644 --- a/api/bsky/graphverification.go +++ b/api/bsky/graphverification.go @@ -5,11 +5,11 @@ package bsky import ( - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) func init() { - util.RegisterType("app.bsky.graph.verification", &GraphVerification{}) + lexutil.RegisterType("app.bsky.graph.verification", &GraphVerification{}) } type GraphVerification struct { diff --git a/api/bsky/labelerdefs.go b/api/bsky/labelerdefs.go index f1495ba5..b9dbb38d 100644 --- a/api/bsky/labelerdefs.go +++ b/api/bsky/labelerdefs.go @@ -5,38 +5,38 @@ package bsky import ( - comatprototypes "github.com/bluesky-social/indigo/api/atproto" + comatproto "github.com/bluesky-social/indigo/api/atproto" ) // LabelerDefs_LabelerPolicies is a "labelerPolicies" in the app.bsky.labeler.defs schema. type LabelerDefs_LabelerPolicies struct { // labelValueDefinitions: Label values created by this labeler and scoped exclusively to it. Labels defined here will override global label definitions for this labeler. - LabelValueDefinitions []*comatprototypes.LabelDefs_LabelValueDefinition `json:"labelValueDefinitions,omitempty" cborgen:"labelValueDefinitions,omitempty"` + LabelValueDefinitions []*comatproto.LabelDefs_LabelValueDefinition `json:"labelValueDefinitions,omitempty" cborgen:"labelValueDefinitions,omitempty"` // labelValues: The label values which this labeler publishes. May include global or custom labels. LabelValues []*string `json:"labelValues" cborgen:"labelValues"` } // LabelerDefs_LabelerView is a "labelerView" in the app.bsky.labeler.defs schema. type LabelerDefs_LabelerView struct { - LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.labeler.defs#labelerView"` - Cid string `json:"cid" cborgen:"cid"` - Creator *ActorDefs_ProfileView `json:"creator" cborgen:"creator"` - IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` - Labels []*comatprototypes.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` - LikeCount *int64 `json:"likeCount,omitempty" cborgen:"likeCount,omitempty"` - Uri string `json:"uri" cborgen:"uri"` - Viewer *LabelerDefs_LabelerViewerState `json:"viewer,omitempty" cborgen:"viewer,omitempty"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.labeler.defs#labelerView"` + Cid string `json:"cid" cborgen:"cid"` + Creator *ActorDefs_ProfileView `json:"creator" cborgen:"creator"` + IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` + Labels []*comatproto.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` + LikeCount *int64 `json:"likeCount,omitempty" cborgen:"likeCount,omitempty"` + Uri string `json:"uri" cborgen:"uri"` + Viewer *LabelerDefs_LabelerViewerState `json:"viewer,omitempty" cborgen:"viewer,omitempty"` } // LabelerDefs_LabelerViewDetailed is a "labelerViewDetailed" in the app.bsky.labeler.defs schema. type LabelerDefs_LabelerViewDetailed struct { - LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.labeler.defs#labelerViewDetailed"` - Cid string `json:"cid" cborgen:"cid"` - Creator *ActorDefs_ProfileView `json:"creator" cborgen:"creator"` - IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` - Labels []*comatprototypes.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` - LikeCount *int64 `json:"likeCount,omitempty" cborgen:"likeCount,omitempty"` - Policies *LabelerDefs_LabelerPolicies `json:"policies" cborgen:"policies"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.labeler.defs#labelerViewDetailed"` + Cid string `json:"cid" cborgen:"cid"` + Creator *ActorDefs_ProfileView `json:"creator" cborgen:"creator"` + IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` + Labels []*comatproto.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` + LikeCount *int64 `json:"likeCount,omitempty" cborgen:"likeCount,omitempty"` + Policies *LabelerDefs_LabelerPolicies `json:"policies" cborgen:"policies"` // reasonTypes: The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed. ReasonTypes []*string `json:"reasonTypes,omitempty" cborgen:"reasonTypes,omitempty"` // subjectCollections: Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type. diff --git a/api/bsky/labelergetServices.go b/api/bsky/labelergetServices.go index f29f8a88..1b3a73af 100644 --- a/api/bsky/labelergetServices.go +++ b/api/bsky/labelergetServices.go @@ -9,7 +9,7 @@ import ( "encoding/json" "fmt" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // LabelerGetServices_Output is the output of a app.bsky.labeler.getServices call. @@ -35,7 +35,7 @@ func (t *LabelerGetServices_Output_Views_Elem) MarshalJSON() ([]byte, error) { } func (t *LabelerGetServices_Output_Views_Elem) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -47,14 +47,13 @@ func (t *LabelerGetServices_Output_Views_Elem) UnmarshalJSON(b []byte) error { case "app.bsky.labeler.defs#labelerViewDetailed": t.LabelerDefs_LabelerViewDetailed = new(LabelerDefs_LabelerViewDetailed) return json.Unmarshal(b, t.LabelerDefs_LabelerViewDetailed) - default: return nil } } // LabelerGetServices calls the XRPC method "app.bsky.labeler.getServices". -func LabelerGetServices(ctx context.Context, c util.LexClient, detailed bool, dids []string) (*LabelerGetServices_Output, error) { +func LabelerGetServices(ctx context.Context, c lexutil.LexClient, detailed bool, dids []string) (*LabelerGetServices_Output, error) { var out LabelerGetServices_Output params := map[string]interface{}{} @@ -62,7 +61,7 @@ func LabelerGetServices(ctx context.Context, c util.LexClient, detailed bool, di params["detailed"] = detailed } params["dids"] = dids - if err := c.LexDo(ctx, util.Query, "", "app.bsky.labeler.getServices", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.labeler.getServices", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/labelerservice.go b/api/bsky/labelerservice.go index 3b408e1d..93337775 100644 --- a/api/bsky/labelerservice.go +++ b/api/bsky/labelerservice.go @@ -10,13 +10,13 @@ import ( "fmt" "io" - comatprototypes "github.com/bluesky-social/indigo/api/atproto" - "github.com/bluesky-social/indigo/lex/util" + comatproto "github.com/bluesky-social/indigo/api/atproto" + lexutil "github.com/bluesky-social/indigo/lex/util" cbg "github.com/whyrusleeping/cbor-gen" ) func init() { - util.RegisterType("app.bsky.labeler.service", &LabelerService{}) + lexutil.RegisterType("app.bsky.labeler.service", &LabelerService{}) } type LabelerService struct { @@ -33,7 +33,7 @@ type LabelerService struct { } type LabelerService_Labels struct { - LabelDefs_SelfLabels *comatprototypes.LabelDefs_SelfLabels + LabelDefs_SelfLabels *comatproto.LabelDefs_SelfLabels } func (t *LabelerService_Labels) MarshalJSON() ([]byte, error) { @@ -45,16 +45,15 @@ func (t *LabelerService_Labels) MarshalJSON() ([]byte, error) { } func (t *LabelerService_Labels) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } switch typ { case "com.atproto.label.defs#selfLabels": - t.LabelDefs_SelfLabels = new(comatprototypes.LabelDefs_SelfLabels) + t.LabelDefs_SelfLabels = new(comatproto.LabelDefs_SelfLabels) return json.Unmarshal(b, t.LabelDefs_SelfLabels) - default: return nil } @@ -71,17 +70,17 @@ func (t *LabelerService_Labels) MarshalCBOR(w io.Writer) error { } return fmt.Errorf("can not marshal empty union as CBOR") } + func (t *LabelerService_Labels) UnmarshalCBOR(r io.Reader) error { - typ, b, err := util.CborTypeExtractReader(r) + typ, b, err := lexutil.CborTypeExtractReader(r) if err != nil { return err } switch typ { case "com.atproto.label.defs#selfLabels": - t.LabelDefs_SelfLabels = new(comatprototypes.LabelDefs_SelfLabels) + t.LabelDefs_SelfLabels = new(comatproto.LabelDefs_SelfLabels) return t.LabelDefs_SelfLabels.UnmarshalCBOR(bytes.NewReader(b)) - default: return nil } diff --git a/api/bsky/notificationdeclaration.go b/api/bsky/notificationdeclaration.go index daf01e12..f7fcc8da 100644 --- a/api/bsky/notificationdeclaration.go +++ b/api/bsky/notificationdeclaration.go @@ -5,11 +5,11 @@ package bsky import ( - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) func init() { - util.RegisterType("app.bsky.notification.declaration", &NotificationDeclaration{}) + lexutil.RegisterType("app.bsky.notification.declaration", &NotificationDeclaration{}) } type NotificationDeclaration struct { diff --git a/api/bsky/notificationgetPreferences.go b/api/bsky/notificationgetPreferences.go index aaf7b777..3a325fd4 100644 --- a/api/bsky/notificationgetPreferences.go +++ b/api/bsky/notificationgetPreferences.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // NotificationGetPreferences_Output is the output of a app.bsky.notification.getPreferences call. @@ -16,11 +16,11 @@ type NotificationGetPreferences_Output struct { } // NotificationGetPreferences calls the XRPC method "app.bsky.notification.getPreferences". -func NotificationGetPreferences(ctx context.Context, c util.LexClient) (*NotificationGetPreferences_Output, error) { +func NotificationGetPreferences(ctx context.Context, c lexutil.LexClient) (*NotificationGetPreferences_Output, error) { var out NotificationGetPreferences_Output params := map[string]interface{}{} - if err := c.LexDo(ctx, util.Query, "", "app.bsky.notification.getPreferences", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.notification.getPreferences", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/notificationgetUnreadCount.go b/api/bsky/notificationgetUnreadCount.go index f5ba2e7b..4bd7cbf7 100644 --- a/api/bsky/notificationgetUnreadCount.go +++ b/api/bsky/notificationgetUnreadCount.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // NotificationGetUnreadCount_Output is the output of a app.bsky.notification.getUnreadCount call. @@ -16,7 +16,7 @@ type NotificationGetUnreadCount_Output struct { } // NotificationGetUnreadCount calls the XRPC method "app.bsky.notification.getUnreadCount". -func NotificationGetUnreadCount(ctx context.Context, c util.LexClient, priority bool, seenAt string) (*NotificationGetUnreadCount_Output, error) { +func NotificationGetUnreadCount(ctx context.Context, c lexutil.LexClient, priority bool, seenAt string) (*NotificationGetUnreadCount_Output, error) { var out NotificationGetUnreadCount_Output params := map[string]interface{}{} @@ -26,7 +26,7 @@ func NotificationGetUnreadCount(ctx context.Context, c util.LexClient, priority if seenAt != "" { params["seenAt"] = seenAt } - if err := c.LexDo(ctx, util.Query, "", "app.bsky.notification.getUnreadCount", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.notification.getUnreadCount", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/notificationlistActivitySubscriptions.go b/api/bsky/notificationlistActivitySubscriptions.go index a08fb5fd..0c6451a0 100644 --- a/api/bsky/notificationlistActivitySubscriptions.go +++ b/api/bsky/notificationlistActivitySubscriptions.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // NotificationListActivitySubscriptions_Output is the output of a app.bsky.notification.listActivitySubscriptions call. @@ -17,7 +17,7 @@ type NotificationListActivitySubscriptions_Output struct { } // NotificationListActivitySubscriptions calls the XRPC method "app.bsky.notification.listActivitySubscriptions". -func NotificationListActivitySubscriptions(ctx context.Context, c util.LexClient, cursor string, limit int64) (*NotificationListActivitySubscriptions_Output, error) { +func NotificationListActivitySubscriptions(ctx context.Context, c lexutil.LexClient, cursor string, limit int64) (*NotificationListActivitySubscriptions_Output, error) { var out NotificationListActivitySubscriptions_Output params := map[string]interface{}{} @@ -27,7 +27,7 @@ func NotificationListActivitySubscriptions(ctx context.Context, c util.LexClient if limit != 0 { params["limit"] = limit } - if err := c.LexDo(ctx, util.Query, "", "app.bsky.notification.listActivitySubscriptions", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.notification.listActivitySubscriptions", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/notificationlistNotifications.go b/api/bsky/notificationlistNotifications.go index 5bec9c55..1310c187 100644 --- a/api/bsky/notificationlistNotifications.go +++ b/api/bsky/notificationlistNotifications.go @@ -7,22 +7,22 @@ package bsky import ( "context" - comatprototypes "github.com/bluesky-social/indigo/api/atproto" - "github.com/bluesky-social/indigo/lex/util" + comatproto "github.com/bluesky-social/indigo/api/atproto" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // NotificationListNotifications_Notification is a "notification" in the app.bsky.notification.listNotifications schema. type NotificationListNotifications_Notification struct { - Author *ActorDefs_ProfileView `json:"author" cborgen:"author"` - Cid string `json:"cid" cborgen:"cid"` - IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` - IsRead bool `json:"isRead" cborgen:"isRead"` - Labels []*comatprototypes.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` + Author *ActorDefs_ProfileView `json:"author" cborgen:"author"` + Cid string `json:"cid" cborgen:"cid"` + IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` + IsRead bool `json:"isRead" cborgen:"isRead"` + Labels []*comatproto.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` // reason: The reason why this notification was delivered - e.g. your post was liked, or you received a new follower. - Reason string `json:"reason" cborgen:"reason"` - ReasonSubject *string `json:"reasonSubject,omitempty" cborgen:"reasonSubject,omitempty"` - Record *util.LexiconTypeDecoder `json:"record" cborgen:"record"` - Uri string `json:"uri" cborgen:"uri"` + Reason string `json:"reason" cborgen:"reason"` + ReasonSubject *string `json:"reasonSubject,omitempty" cborgen:"reasonSubject,omitempty"` + Record *lexutil.LexiconTypeDecoder `json:"record" cborgen:"record"` + Uri string `json:"uri" cborgen:"uri"` } // NotificationListNotifications_Output is the output of a app.bsky.notification.listNotifications call. @@ -36,7 +36,7 @@ type NotificationListNotifications_Output struct { // NotificationListNotifications calls the XRPC method "app.bsky.notification.listNotifications". // // reasons: Notification reasons to include in response. -func NotificationListNotifications(ctx context.Context, c util.LexClient, cursor string, limit int64, priority bool, reasons []string, seenAt string) (*NotificationListNotifications_Output, error) { +func NotificationListNotifications(ctx context.Context, c lexutil.LexClient, cursor string, limit int64, priority bool, reasons []string, seenAt string) (*NotificationListNotifications_Output, error) { var out NotificationListNotifications_Output params := map[string]interface{}{} @@ -55,7 +55,7 @@ func NotificationListNotifications(ctx context.Context, c util.LexClient, cursor if seenAt != "" { params["seenAt"] = seenAt } - if err := c.LexDo(ctx, util.Query, "", "app.bsky.notification.listNotifications", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.notification.listNotifications", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/notificationputActivitySubscription.go b/api/bsky/notificationputActivitySubscription.go index 3eb927ba..49619c0d 100644 --- a/api/bsky/notificationputActivitySubscription.go +++ b/api/bsky/notificationputActivitySubscription.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // NotificationPutActivitySubscription_Input is the input argument to a app.bsky.notification.putActivitySubscription call. @@ -23,9 +23,9 @@ type NotificationPutActivitySubscription_Output struct { } // NotificationPutActivitySubscription calls the XRPC method "app.bsky.notification.putActivitySubscription". -func NotificationPutActivitySubscription(ctx context.Context, c util.LexClient, input *NotificationPutActivitySubscription_Input) (*NotificationPutActivitySubscription_Output, error) { +func NotificationPutActivitySubscription(ctx context.Context, c lexutil.LexClient, input *NotificationPutActivitySubscription_Input) (*NotificationPutActivitySubscription_Output, error) { var out NotificationPutActivitySubscription_Output - if err := c.LexDo(ctx, util.Procedure, "application/json", "app.bsky.notification.putActivitySubscription", nil, input, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "app.bsky.notification.putActivitySubscription", nil, input, &out); err != nil { return nil, err } diff --git a/api/bsky/notificationputPreferences.go b/api/bsky/notificationputPreferences.go index 51d9d978..bf8f5640 100644 --- a/api/bsky/notificationputPreferences.go +++ b/api/bsky/notificationputPreferences.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // NotificationPutPreferences_Input is the input argument to a app.bsky.notification.putPreferences call. @@ -16,8 +16,8 @@ type NotificationPutPreferences_Input struct { } // NotificationPutPreferences calls the XRPC method "app.bsky.notification.putPreferences". -func NotificationPutPreferences(ctx context.Context, c util.LexClient, input *NotificationPutPreferences_Input) error { - if err := c.LexDo(ctx, util.Procedure, "application/json", "app.bsky.notification.putPreferences", nil, input, nil); err != nil { +func NotificationPutPreferences(ctx context.Context, c lexutil.LexClient, input *NotificationPutPreferences_Input) error { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "app.bsky.notification.putPreferences", nil, input, nil); err != nil { return err } diff --git a/api/bsky/notificationputPreferencesV2.go b/api/bsky/notificationputPreferencesV2.go index da17f2be..19a65eb9 100644 --- a/api/bsky/notificationputPreferencesV2.go +++ b/api/bsky/notificationputPreferencesV2.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // NotificationPutPreferencesV2_Input is the input argument to a app.bsky.notification.putPreferencesV2 call. @@ -33,9 +33,9 @@ type NotificationPutPreferencesV2_Output struct { } // NotificationPutPreferencesV2 calls the XRPC method "app.bsky.notification.putPreferencesV2". -func NotificationPutPreferencesV2(ctx context.Context, c util.LexClient, input *NotificationPutPreferencesV2_Input) (*NotificationPutPreferencesV2_Output, error) { +func NotificationPutPreferencesV2(ctx context.Context, c lexutil.LexClient, input *NotificationPutPreferencesV2_Input) (*NotificationPutPreferencesV2_Output, error) { var out NotificationPutPreferencesV2_Output - if err := c.LexDo(ctx, util.Procedure, "application/json", "app.bsky.notification.putPreferencesV2", nil, input, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "app.bsky.notification.putPreferencesV2", nil, input, &out); err != nil { return nil, err } diff --git a/api/bsky/notificationregisterPush.go b/api/bsky/notificationregisterPush.go index 55015353..4de00e05 100644 --- a/api/bsky/notificationregisterPush.go +++ b/api/bsky/notificationregisterPush.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // NotificationRegisterPush_Input is the input argument to a app.bsky.notification.registerPush call. @@ -21,8 +21,8 @@ type NotificationRegisterPush_Input struct { } // NotificationRegisterPush calls the XRPC method "app.bsky.notification.registerPush". -func NotificationRegisterPush(ctx context.Context, c util.LexClient, input *NotificationRegisterPush_Input) error { - if err := c.LexDo(ctx, util.Procedure, "application/json", "app.bsky.notification.registerPush", nil, input, nil); err != nil { +func NotificationRegisterPush(ctx context.Context, c lexutil.LexClient, input *NotificationRegisterPush_Input) error { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "app.bsky.notification.registerPush", nil, input, nil); err != nil { return err } diff --git a/api/bsky/notificationunregisterPush.go b/api/bsky/notificationunregisterPush.go index ea752a3b..f1e8e0f4 100644 --- a/api/bsky/notificationunregisterPush.go +++ b/api/bsky/notificationunregisterPush.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // NotificationUnregisterPush_Input is the input argument to a app.bsky.notification.unregisterPush call. @@ -19,8 +19,8 @@ type NotificationUnregisterPush_Input struct { } // NotificationUnregisterPush calls the XRPC method "app.bsky.notification.unregisterPush". -func NotificationUnregisterPush(ctx context.Context, c util.LexClient, input *NotificationUnregisterPush_Input) error { - if err := c.LexDo(ctx, util.Procedure, "application/json", "app.bsky.notification.unregisterPush", nil, input, nil); err != nil { +func NotificationUnregisterPush(ctx context.Context, c lexutil.LexClient, input *NotificationUnregisterPush_Input) error { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "app.bsky.notification.unregisterPush", nil, input, nil); err != nil { return err } diff --git a/api/bsky/notificationupdateSeen.go b/api/bsky/notificationupdateSeen.go index 78594ad3..c29410e4 100644 --- a/api/bsky/notificationupdateSeen.go +++ b/api/bsky/notificationupdateSeen.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // NotificationUpdateSeen_Input is the input argument to a app.bsky.notification.updateSeen call. @@ -16,8 +16,8 @@ type NotificationUpdateSeen_Input struct { } // NotificationUpdateSeen calls the XRPC method "app.bsky.notification.updateSeen". -func NotificationUpdateSeen(ctx context.Context, c util.LexClient, input *NotificationUpdateSeen_Input) error { - if err := c.LexDo(ctx, util.Procedure, "application/json", "app.bsky.notification.updateSeen", nil, input, nil); err != nil { +func NotificationUpdateSeen(ctx context.Context, c lexutil.LexClient, input *NotificationUpdateSeen_Input) error { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "app.bsky.notification.updateSeen", nil, input, nil); err != nil { return err } diff --git a/api/bsky/richtextfacet.go b/api/bsky/richtextfacet.go index 9fb7d58f..a1c808e3 100644 --- a/api/bsky/richtextfacet.go +++ b/api/bsky/richtextfacet.go @@ -10,7 +10,7 @@ import ( "fmt" "io" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" cbg "github.com/whyrusleeping/cbor-gen" ) @@ -53,7 +53,7 @@ func (t *RichtextFacet_Features_Elem) MarshalJSON() ([]byte, error) { } func (t *RichtextFacet_Features_Elem) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -68,7 +68,6 @@ func (t *RichtextFacet_Features_Elem) UnmarshalJSON(b []byte) error { case "app.bsky.richtext.facet#tag": t.RichtextFacet_Tag = new(RichtextFacet_Tag) return json.Unmarshal(b, t.RichtextFacet_Tag) - default: return nil } @@ -91,8 +90,9 @@ func (t *RichtextFacet_Features_Elem) MarshalCBOR(w io.Writer) error { } return fmt.Errorf("can not marshal empty union as CBOR") } + func (t *RichtextFacet_Features_Elem) UnmarshalCBOR(r io.Reader) error { - typ, b, err := util.CborTypeExtractReader(r) + typ, b, err := lexutil.CborTypeExtractReader(r) if err != nil { return err } @@ -107,7 +107,6 @@ func (t *RichtextFacet_Features_Elem) UnmarshalCBOR(r io.Reader) error { case "app.bsky.richtext.facet#tag": t.RichtextFacet_Tag = new(RichtextFacet_Tag) return t.RichtextFacet_Tag.UnmarshalCBOR(bytes.NewReader(b)) - default: return nil } diff --git a/api/bsky/unspeccedgetAgeAssuranceState.go b/api/bsky/unspeccedgetAgeAssuranceState.go index 33c85c2c..1f7159e2 100644 --- a/api/bsky/unspeccedgetAgeAssuranceState.go +++ b/api/bsky/unspeccedgetAgeAssuranceState.go @@ -7,13 +7,13 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // UnspeccedGetAgeAssuranceState calls the XRPC method "app.bsky.unspecced.getAgeAssuranceState". -func UnspeccedGetAgeAssuranceState(ctx context.Context, c util.LexClient) (*UnspeccedDefs_AgeAssuranceState, error) { +func UnspeccedGetAgeAssuranceState(ctx context.Context, c lexutil.LexClient) (*UnspeccedDefs_AgeAssuranceState, error) { var out UnspeccedDefs_AgeAssuranceState - if err := c.LexDo(ctx, util.Query, "", "app.bsky.unspecced.getAgeAssuranceState", nil, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.unspecced.getAgeAssuranceState", nil, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/unspeccedgetConfig.go b/api/bsky/unspeccedgetConfig.go index 13811d60..2fc6f8dd 100644 --- a/api/bsky/unspeccedgetConfig.go +++ b/api/bsky/unspeccedgetConfig.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // UnspeccedGetConfig_LiveNowConfig is a "liveNowConfig" in the app.bsky.unspecced.getConfig schema. @@ -23,9 +23,9 @@ type UnspeccedGetConfig_Output struct { } // UnspeccedGetConfig calls the XRPC method "app.bsky.unspecced.getConfig". -func UnspeccedGetConfig(ctx context.Context, c util.LexClient) (*UnspeccedGetConfig_Output, error) { +func UnspeccedGetConfig(ctx context.Context, c lexutil.LexClient) (*UnspeccedGetConfig_Output, error) { var out UnspeccedGetConfig_Output - if err := c.LexDo(ctx, util.Query, "", "app.bsky.unspecced.getConfig", nil, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.unspecced.getConfig", nil, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/unspeccedgetOnboardingSuggestedStarterPacks.go b/api/bsky/unspeccedgetOnboardingSuggestedStarterPacks.go index 207e1f1a..372aba2b 100644 --- a/api/bsky/unspeccedgetOnboardingSuggestedStarterPacks.go +++ b/api/bsky/unspeccedgetOnboardingSuggestedStarterPacks.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // UnspeccedGetOnboardingSuggestedStarterPacks_Output is the output of a app.bsky.unspecced.getOnboardingSuggestedStarterPacks call. @@ -16,14 +16,14 @@ type UnspeccedGetOnboardingSuggestedStarterPacks_Output struct { } // UnspeccedGetOnboardingSuggestedStarterPacks calls the XRPC method "app.bsky.unspecced.getOnboardingSuggestedStarterPacks". -func UnspeccedGetOnboardingSuggestedStarterPacks(ctx context.Context, c util.LexClient, limit int64) (*UnspeccedGetOnboardingSuggestedStarterPacks_Output, error) { +func UnspeccedGetOnboardingSuggestedStarterPacks(ctx context.Context, c lexutil.LexClient, limit int64) (*UnspeccedGetOnboardingSuggestedStarterPacks_Output, error) { var out UnspeccedGetOnboardingSuggestedStarterPacks_Output params := map[string]interface{}{} if limit != 0 { params["limit"] = limit } - if err := c.LexDo(ctx, util.Query, "", "app.bsky.unspecced.getOnboardingSuggestedStarterPacks", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.unspecced.getOnboardingSuggestedStarterPacks", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/unspeccedgetOnboardingSuggestedStarterPacksSkeleton.go b/api/bsky/unspeccedgetOnboardingSuggestedStarterPacksSkeleton.go index 9e67db85..7033059c 100644 --- a/api/bsky/unspeccedgetOnboardingSuggestedStarterPacksSkeleton.go +++ b/api/bsky/unspeccedgetOnboardingSuggestedStarterPacksSkeleton.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // UnspeccedGetOnboardingSuggestedStarterPacksSkeleton_Output is the output of a app.bsky.unspecced.getOnboardingSuggestedStarterPacksSkeleton call. @@ -18,7 +18,7 @@ type UnspeccedGetOnboardingSuggestedStarterPacksSkeleton_Output struct { // UnspeccedGetOnboardingSuggestedStarterPacksSkeleton calls the XRPC method "app.bsky.unspecced.getOnboardingSuggestedStarterPacksSkeleton". // // viewer: DID of the account making the request (not included for public/unauthenticated queries). -func UnspeccedGetOnboardingSuggestedStarterPacksSkeleton(ctx context.Context, c util.LexClient, limit int64, viewer string) (*UnspeccedGetOnboardingSuggestedStarterPacksSkeleton_Output, error) { +func UnspeccedGetOnboardingSuggestedStarterPacksSkeleton(ctx context.Context, c lexutil.LexClient, limit int64, viewer string) (*UnspeccedGetOnboardingSuggestedStarterPacksSkeleton_Output, error) { var out UnspeccedGetOnboardingSuggestedStarterPacksSkeleton_Output params := map[string]interface{}{} @@ -28,7 +28,7 @@ func UnspeccedGetOnboardingSuggestedStarterPacksSkeleton(ctx context.Context, c if viewer != "" { params["viewer"] = viewer } - if err := c.LexDo(ctx, util.Query, "", "app.bsky.unspecced.getOnboardingSuggestedStarterPacksSkeleton", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.unspecced.getOnboardingSuggestedStarterPacksSkeleton", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/unspeccedgetPopularFeedGenerators.go b/api/bsky/unspeccedgetPopularFeedGenerators.go index a1e7b509..8feaf827 100644 --- a/api/bsky/unspeccedgetPopularFeedGenerators.go +++ b/api/bsky/unspeccedgetPopularFeedGenerators.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // UnspeccedGetPopularFeedGenerators_Output is the output of a app.bsky.unspecced.getPopularFeedGenerators call. @@ -17,7 +17,7 @@ type UnspeccedGetPopularFeedGenerators_Output struct { } // UnspeccedGetPopularFeedGenerators calls the XRPC method "app.bsky.unspecced.getPopularFeedGenerators". -func UnspeccedGetPopularFeedGenerators(ctx context.Context, c util.LexClient, cursor string, limit int64, query string) (*UnspeccedGetPopularFeedGenerators_Output, error) { +func UnspeccedGetPopularFeedGenerators(ctx context.Context, c lexutil.LexClient, cursor string, limit int64, query string) (*UnspeccedGetPopularFeedGenerators_Output, error) { var out UnspeccedGetPopularFeedGenerators_Output params := map[string]interface{}{} @@ -30,7 +30,7 @@ func UnspeccedGetPopularFeedGenerators(ctx context.Context, c util.LexClient, cu if query != "" { params["query"] = query } - if err := c.LexDo(ctx, util.Query, "", "app.bsky.unspecced.getPopularFeedGenerators", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.unspecced.getPopularFeedGenerators", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/unspeccedgetPostThreadOtherV2.go b/api/bsky/unspeccedgetPostThreadOtherV2.go index ad462e01..5a61a4ef 100644 --- a/api/bsky/unspeccedgetPostThreadOtherV2.go +++ b/api/bsky/unspeccedgetPostThreadOtherV2.go @@ -9,7 +9,7 @@ import ( "encoding/json" "fmt" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // UnspeccedGetPostThreadOtherV2_Output is the output of a app.bsky.unspecced.getPostThreadOtherV2 call. @@ -39,7 +39,7 @@ func (t *UnspeccedGetPostThreadOtherV2_ThreadItem_Value) MarshalJSON() ([]byte, } func (t *UnspeccedGetPostThreadOtherV2_ThreadItem_Value) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -48,7 +48,6 @@ func (t *UnspeccedGetPostThreadOtherV2_ThreadItem_Value) UnmarshalJSON(b []byte) case "app.bsky.unspecced.defs#threadItemPost": t.UnspeccedDefs_ThreadItemPost = new(UnspeccedDefs_ThreadItemPost) return json.Unmarshal(b, t.UnspeccedDefs_ThreadItemPost) - default: return nil } @@ -58,7 +57,7 @@ func (t *UnspeccedGetPostThreadOtherV2_ThreadItem_Value) UnmarshalJSON(b []byte) // // anchor: Reference (AT-URI) to post record. This is the anchor post. // prioritizeFollowedUsers: Whether to prioritize posts from followed users. It only has effect when the user is authenticated. -func UnspeccedGetPostThreadOtherV2(ctx context.Context, c util.LexClient, anchor string, prioritizeFollowedUsers bool) (*UnspeccedGetPostThreadOtherV2_Output, error) { +func UnspeccedGetPostThreadOtherV2(ctx context.Context, c lexutil.LexClient, anchor string, prioritizeFollowedUsers bool) (*UnspeccedGetPostThreadOtherV2_Output, error) { var out UnspeccedGetPostThreadOtherV2_Output params := map[string]interface{}{} @@ -66,7 +65,7 @@ func UnspeccedGetPostThreadOtherV2(ctx context.Context, c util.LexClient, anchor if prioritizeFollowedUsers { params["prioritizeFollowedUsers"] = prioritizeFollowedUsers } - if err := c.LexDo(ctx, util.Query, "", "app.bsky.unspecced.getPostThreadOtherV2", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.unspecced.getPostThreadOtherV2", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/unspeccedgetPostThreadV2.go b/api/bsky/unspeccedgetPostThreadV2.go index 9270e080..f3cd6240 100644 --- a/api/bsky/unspeccedgetPostThreadV2.go +++ b/api/bsky/unspeccedgetPostThreadV2.go @@ -9,7 +9,7 @@ import ( "encoding/json" "fmt" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // UnspeccedGetPostThreadV2_Output is the output of a app.bsky.unspecced.getPostThreadV2 call. @@ -57,7 +57,7 @@ func (t *UnspeccedGetPostThreadV2_ThreadItem_Value) MarshalJSON() ([]byte, error } func (t *UnspeccedGetPostThreadV2_ThreadItem_Value) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -75,7 +75,6 @@ func (t *UnspeccedGetPostThreadV2_ThreadItem_Value) UnmarshalJSON(b []byte) erro case "app.bsky.unspecced.defs#threadItemBlocked": t.UnspeccedDefs_ThreadItemBlocked = new(UnspeccedDefs_ThreadItemBlocked) return json.Unmarshal(b, t.UnspeccedDefs_ThreadItemBlocked) - default: return nil } @@ -89,7 +88,7 @@ func (t *UnspeccedGetPostThreadV2_ThreadItem_Value) UnmarshalJSON(b []byte) erro // branchingFactor: Maximum of replies to include at each level of the thread, except for the direct replies to the anchor, which are (NOTE: currently, during unspecced phase) all returned (NOTE: later they might be paginated). // prioritizeFollowedUsers: Whether to prioritize posts from followed users. It only has effect when the user is authenticated. // sort: Sorting for the thread replies. -func UnspeccedGetPostThreadV2(ctx context.Context, c util.LexClient, above bool, anchor string, below int64, branchingFactor int64, prioritizeFollowedUsers bool, sort string) (*UnspeccedGetPostThreadV2_Output, error) { +func UnspeccedGetPostThreadV2(ctx context.Context, c lexutil.LexClient, above bool, anchor string, below int64, branchingFactor int64, prioritizeFollowedUsers bool, sort string) (*UnspeccedGetPostThreadV2_Output, error) { var out UnspeccedGetPostThreadV2_Output params := map[string]interface{}{} @@ -109,7 +108,7 @@ func UnspeccedGetPostThreadV2(ctx context.Context, c util.LexClient, above bool, if sort != "" { params["sort"] = sort } - if err := c.LexDo(ctx, util.Query, "", "app.bsky.unspecced.getPostThreadV2", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.unspecced.getPostThreadV2", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/unspeccedgetSuggestedFeeds.go b/api/bsky/unspeccedgetSuggestedFeeds.go index 3eabb884..91771604 100644 --- a/api/bsky/unspeccedgetSuggestedFeeds.go +++ b/api/bsky/unspeccedgetSuggestedFeeds.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // UnspeccedGetSuggestedFeeds_Output is the output of a app.bsky.unspecced.getSuggestedFeeds call. @@ -16,14 +16,14 @@ type UnspeccedGetSuggestedFeeds_Output struct { } // UnspeccedGetSuggestedFeeds calls the XRPC method "app.bsky.unspecced.getSuggestedFeeds". -func UnspeccedGetSuggestedFeeds(ctx context.Context, c util.LexClient, limit int64) (*UnspeccedGetSuggestedFeeds_Output, error) { +func UnspeccedGetSuggestedFeeds(ctx context.Context, c lexutil.LexClient, limit int64) (*UnspeccedGetSuggestedFeeds_Output, error) { var out UnspeccedGetSuggestedFeeds_Output params := map[string]interface{}{} if limit != 0 { params["limit"] = limit } - if err := c.LexDo(ctx, util.Query, "", "app.bsky.unspecced.getSuggestedFeeds", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.unspecced.getSuggestedFeeds", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/unspeccedgetSuggestedFeedsSkeleton.go b/api/bsky/unspeccedgetSuggestedFeedsSkeleton.go index fbe0be90..0aacb270 100644 --- a/api/bsky/unspeccedgetSuggestedFeedsSkeleton.go +++ b/api/bsky/unspeccedgetSuggestedFeedsSkeleton.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // UnspeccedGetSuggestedFeedsSkeleton_Output is the output of a app.bsky.unspecced.getSuggestedFeedsSkeleton call. @@ -18,7 +18,7 @@ type UnspeccedGetSuggestedFeedsSkeleton_Output struct { // UnspeccedGetSuggestedFeedsSkeleton calls the XRPC method "app.bsky.unspecced.getSuggestedFeedsSkeleton". // // viewer: DID of the account making the request (not included for public/unauthenticated queries). -func UnspeccedGetSuggestedFeedsSkeleton(ctx context.Context, c util.LexClient, limit int64, viewer string) (*UnspeccedGetSuggestedFeedsSkeleton_Output, error) { +func UnspeccedGetSuggestedFeedsSkeleton(ctx context.Context, c lexutil.LexClient, limit int64, viewer string) (*UnspeccedGetSuggestedFeedsSkeleton_Output, error) { var out UnspeccedGetSuggestedFeedsSkeleton_Output params := map[string]interface{}{} @@ -28,7 +28,7 @@ func UnspeccedGetSuggestedFeedsSkeleton(ctx context.Context, c util.LexClient, l if viewer != "" { params["viewer"] = viewer } - if err := c.LexDo(ctx, util.Query, "", "app.bsky.unspecced.getSuggestedFeedsSkeleton", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.unspecced.getSuggestedFeedsSkeleton", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/unspeccedgetSuggestedStarterPacks.go b/api/bsky/unspeccedgetSuggestedStarterPacks.go index 2e26d266..3f61242f 100644 --- a/api/bsky/unspeccedgetSuggestedStarterPacks.go +++ b/api/bsky/unspeccedgetSuggestedStarterPacks.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // UnspeccedGetSuggestedStarterPacks_Output is the output of a app.bsky.unspecced.getSuggestedStarterPacks call. @@ -16,14 +16,14 @@ type UnspeccedGetSuggestedStarterPacks_Output struct { } // UnspeccedGetSuggestedStarterPacks calls the XRPC method "app.bsky.unspecced.getSuggestedStarterPacks". -func UnspeccedGetSuggestedStarterPacks(ctx context.Context, c util.LexClient, limit int64) (*UnspeccedGetSuggestedStarterPacks_Output, error) { +func UnspeccedGetSuggestedStarterPacks(ctx context.Context, c lexutil.LexClient, limit int64) (*UnspeccedGetSuggestedStarterPacks_Output, error) { var out UnspeccedGetSuggestedStarterPacks_Output params := map[string]interface{}{} if limit != 0 { params["limit"] = limit } - if err := c.LexDo(ctx, util.Query, "", "app.bsky.unspecced.getSuggestedStarterPacks", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.unspecced.getSuggestedStarterPacks", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/unspeccedgetSuggestedStarterPacksSkeleton.go b/api/bsky/unspeccedgetSuggestedStarterPacksSkeleton.go index e4e7df07..09c2eec1 100644 --- a/api/bsky/unspeccedgetSuggestedStarterPacksSkeleton.go +++ b/api/bsky/unspeccedgetSuggestedStarterPacksSkeleton.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // UnspeccedGetSuggestedStarterPacksSkeleton_Output is the output of a app.bsky.unspecced.getSuggestedStarterPacksSkeleton call. @@ -18,7 +18,7 @@ type UnspeccedGetSuggestedStarterPacksSkeleton_Output struct { // UnspeccedGetSuggestedStarterPacksSkeleton calls the XRPC method "app.bsky.unspecced.getSuggestedStarterPacksSkeleton". // // viewer: DID of the account making the request (not included for public/unauthenticated queries). -func UnspeccedGetSuggestedStarterPacksSkeleton(ctx context.Context, c util.LexClient, limit int64, viewer string) (*UnspeccedGetSuggestedStarterPacksSkeleton_Output, error) { +func UnspeccedGetSuggestedStarterPacksSkeleton(ctx context.Context, c lexutil.LexClient, limit int64, viewer string) (*UnspeccedGetSuggestedStarterPacksSkeleton_Output, error) { var out UnspeccedGetSuggestedStarterPacksSkeleton_Output params := map[string]interface{}{} @@ -28,7 +28,7 @@ func UnspeccedGetSuggestedStarterPacksSkeleton(ctx context.Context, c util.LexCl if viewer != "" { params["viewer"] = viewer } - if err := c.LexDo(ctx, util.Query, "", "app.bsky.unspecced.getSuggestedStarterPacksSkeleton", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.unspecced.getSuggestedStarterPacksSkeleton", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/unspeccedgetSuggestedUsers.go b/api/bsky/unspeccedgetSuggestedUsers.go index c38404df..e61b7237 100644 --- a/api/bsky/unspeccedgetSuggestedUsers.go +++ b/api/bsky/unspeccedgetSuggestedUsers.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // UnspeccedGetSuggestedUsers_Output is the output of a app.bsky.unspecced.getSuggestedUsers call. @@ -18,7 +18,7 @@ type UnspeccedGetSuggestedUsers_Output struct { // UnspeccedGetSuggestedUsers calls the XRPC method "app.bsky.unspecced.getSuggestedUsers". // // category: Category of users to get suggestions for. -func UnspeccedGetSuggestedUsers(ctx context.Context, c util.LexClient, category string, limit int64) (*UnspeccedGetSuggestedUsers_Output, error) { +func UnspeccedGetSuggestedUsers(ctx context.Context, c lexutil.LexClient, category string, limit int64) (*UnspeccedGetSuggestedUsers_Output, error) { var out UnspeccedGetSuggestedUsers_Output params := map[string]interface{}{} @@ -28,7 +28,7 @@ func UnspeccedGetSuggestedUsers(ctx context.Context, c util.LexClient, category if limit != 0 { params["limit"] = limit } - if err := c.LexDo(ctx, util.Query, "", "app.bsky.unspecced.getSuggestedUsers", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.unspecced.getSuggestedUsers", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/unspeccedgetSuggestedUsersSkeleton.go b/api/bsky/unspeccedgetSuggestedUsersSkeleton.go index 731dfea4..41c2bbba 100644 --- a/api/bsky/unspeccedgetSuggestedUsersSkeleton.go +++ b/api/bsky/unspeccedgetSuggestedUsersSkeleton.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // UnspeccedGetSuggestedUsersSkeleton_Output is the output of a app.bsky.unspecced.getSuggestedUsersSkeleton call. @@ -19,7 +19,7 @@ type UnspeccedGetSuggestedUsersSkeleton_Output struct { // // category: Category of users to get suggestions for. // viewer: DID of the account making the request (not included for public/unauthenticated queries). -func UnspeccedGetSuggestedUsersSkeleton(ctx context.Context, c util.LexClient, category string, limit int64, viewer string) (*UnspeccedGetSuggestedUsersSkeleton_Output, error) { +func UnspeccedGetSuggestedUsersSkeleton(ctx context.Context, c lexutil.LexClient, category string, limit int64, viewer string) (*UnspeccedGetSuggestedUsersSkeleton_Output, error) { var out UnspeccedGetSuggestedUsersSkeleton_Output params := map[string]interface{}{} @@ -32,7 +32,7 @@ func UnspeccedGetSuggestedUsersSkeleton(ctx context.Context, c util.LexClient, c if viewer != "" { params["viewer"] = viewer } - if err := c.LexDo(ctx, util.Query, "", "app.bsky.unspecced.getSuggestedUsersSkeleton", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.unspecced.getSuggestedUsersSkeleton", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/unspeccedgetSuggestionsSkeleton.go b/api/bsky/unspeccedgetSuggestionsSkeleton.go index b81b2c2d..1ac1973f 100644 --- a/api/bsky/unspeccedgetSuggestionsSkeleton.go +++ b/api/bsky/unspeccedgetSuggestionsSkeleton.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // UnspeccedGetSuggestionsSkeleton_Output is the output of a app.bsky.unspecced.getSuggestionsSkeleton call. @@ -24,7 +24,7 @@ type UnspeccedGetSuggestionsSkeleton_Output struct { // // relativeToDid: DID of the account to get suggestions relative to. If not provided, suggestions will be based on the viewer. // viewer: DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking. -func UnspeccedGetSuggestionsSkeleton(ctx context.Context, c util.LexClient, cursor string, limit int64, relativeToDid string, viewer string) (*UnspeccedGetSuggestionsSkeleton_Output, error) { +func UnspeccedGetSuggestionsSkeleton(ctx context.Context, c lexutil.LexClient, cursor string, limit int64, relativeToDid string, viewer string) (*UnspeccedGetSuggestionsSkeleton_Output, error) { var out UnspeccedGetSuggestionsSkeleton_Output params := map[string]interface{}{} @@ -40,7 +40,7 @@ func UnspeccedGetSuggestionsSkeleton(ctx context.Context, c util.LexClient, curs if viewer != "" { params["viewer"] = viewer } - if err := c.LexDo(ctx, util.Query, "", "app.bsky.unspecced.getSuggestionsSkeleton", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.unspecced.getSuggestionsSkeleton", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/unspeccedgetTaggedSuggestions.go b/api/bsky/unspeccedgetTaggedSuggestions.go index 5758c9a9..7db029d2 100644 --- a/api/bsky/unspeccedgetTaggedSuggestions.go +++ b/api/bsky/unspeccedgetTaggedSuggestions.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // UnspeccedGetTaggedSuggestions_Output is the output of a app.bsky.unspecced.getTaggedSuggestions call. @@ -23,11 +23,11 @@ type UnspeccedGetTaggedSuggestions_Suggestion struct { } // UnspeccedGetTaggedSuggestions calls the XRPC method "app.bsky.unspecced.getTaggedSuggestions". -func UnspeccedGetTaggedSuggestions(ctx context.Context, c util.LexClient) (*UnspeccedGetTaggedSuggestions_Output, error) { +func UnspeccedGetTaggedSuggestions(ctx context.Context, c lexutil.LexClient) (*UnspeccedGetTaggedSuggestions_Output, error) { var out UnspeccedGetTaggedSuggestions_Output params := map[string]interface{}{} - if err := c.LexDo(ctx, util.Query, "", "app.bsky.unspecced.getTaggedSuggestions", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.unspecced.getTaggedSuggestions", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/unspeccedgetTrendingTopics.go b/api/bsky/unspeccedgetTrendingTopics.go index 9836b549..76b156cc 100644 --- a/api/bsky/unspeccedgetTrendingTopics.go +++ b/api/bsky/unspeccedgetTrendingTopics.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // UnspeccedGetTrendingTopics_Output is the output of a app.bsky.unspecced.getTrendingTopics call. @@ -19,7 +19,7 @@ type UnspeccedGetTrendingTopics_Output struct { // UnspeccedGetTrendingTopics calls the XRPC method "app.bsky.unspecced.getTrendingTopics". // // viewer: DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking. -func UnspeccedGetTrendingTopics(ctx context.Context, c util.LexClient, limit int64, viewer string) (*UnspeccedGetTrendingTopics_Output, error) { +func UnspeccedGetTrendingTopics(ctx context.Context, c lexutil.LexClient, limit int64, viewer string) (*UnspeccedGetTrendingTopics_Output, error) { var out UnspeccedGetTrendingTopics_Output params := map[string]interface{}{} @@ -29,7 +29,7 @@ func UnspeccedGetTrendingTopics(ctx context.Context, c util.LexClient, limit int if viewer != "" { params["viewer"] = viewer } - if err := c.LexDo(ctx, util.Query, "", "app.bsky.unspecced.getTrendingTopics", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.unspecced.getTrendingTopics", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/unspeccedgetTrends.go b/api/bsky/unspeccedgetTrends.go index 898fb76f..8dfc9b27 100644 --- a/api/bsky/unspeccedgetTrends.go +++ b/api/bsky/unspeccedgetTrends.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // UnspeccedGetTrends_Output is the output of a app.bsky.unspecced.getTrends call. @@ -16,14 +16,14 @@ type UnspeccedGetTrends_Output struct { } // UnspeccedGetTrends calls the XRPC method "app.bsky.unspecced.getTrends". -func UnspeccedGetTrends(ctx context.Context, c util.LexClient, limit int64) (*UnspeccedGetTrends_Output, error) { +func UnspeccedGetTrends(ctx context.Context, c lexutil.LexClient, limit int64) (*UnspeccedGetTrends_Output, error) { var out UnspeccedGetTrends_Output params := map[string]interface{}{} if limit != 0 { params["limit"] = limit } - if err := c.LexDo(ctx, util.Query, "", "app.bsky.unspecced.getTrends", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.unspecced.getTrends", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/unspeccedgetTrendsSkeleton.go b/api/bsky/unspeccedgetTrendsSkeleton.go index cad9fd1c..5817eaa8 100644 --- a/api/bsky/unspeccedgetTrendsSkeleton.go +++ b/api/bsky/unspeccedgetTrendsSkeleton.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // UnspeccedGetTrendsSkeleton_Output is the output of a app.bsky.unspecced.getTrendsSkeleton call. @@ -18,7 +18,7 @@ type UnspeccedGetTrendsSkeleton_Output struct { // UnspeccedGetTrendsSkeleton calls the XRPC method "app.bsky.unspecced.getTrendsSkeleton". // // viewer: DID of the account making the request (not included for public/unauthenticated queries). -func UnspeccedGetTrendsSkeleton(ctx context.Context, c util.LexClient, limit int64, viewer string) (*UnspeccedGetTrendsSkeleton_Output, error) { +func UnspeccedGetTrendsSkeleton(ctx context.Context, c lexutil.LexClient, limit int64, viewer string) (*UnspeccedGetTrendsSkeleton_Output, error) { var out UnspeccedGetTrendsSkeleton_Output params := map[string]interface{}{} @@ -28,7 +28,7 @@ func UnspeccedGetTrendsSkeleton(ctx context.Context, c util.LexClient, limit int if viewer != "" { params["viewer"] = viewer } - if err := c.LexDo(ctx, util.Query, "", "app.bsky.unspecced.getTrendsSkeleton", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.unspecced.getTrendsSkeleton", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/unspeccedinitAgeAssurance.go b/api/bsky/unspeccedinitAgeAssurance.go index ad1a31ed..26edc4a7 100644 --- a/api/bsky/unspeccedinitAgeAssurance.go +++ b/api/bsky/unspeccedinitAgeAssurance.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // UnspeccedInitAgeAssurance_Input is the input argument to a app.bsky.unspecced.initAgeAssurance call. @@ -21,9 +21,9 @@ type UnspeccedInitAgeAssurance_Input struct { } // UnspeccedInitAgeAssurance calls the XRPC method "app.bsky.unspecced.initAgeAssurance". -func UnspeccedInitAgeAssurance(ctx context.Context, c util.LexClient, input *UnspeccedInitAgeAssurance_Input) (*UnspeccedDefs_AgeAssuranceState, error) { +func UnspeccedInitAgeAssurance(ctx context.Context, c lexutil.LexClient, input *UnspeccedInitAgeAssurance_Input) (*UnspeccedDefs_AgeAssuranceState, error) { var out UnspeccedDefs_AgeAssuranceState - if err := c.LexDo(ctx, util.Procedure, "application/json", "app.bsky.unspecced.initAgeAssurance", nil, input, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "app.bsky.unspecced.initAgeAssurance", nil, input, &out); err != nil { return nil, err } diff --git a/api/bsky/unspeccedsearchActorsSkeleton.go b/api/bsky/unspeccedsearchActorsSkeleton.go index 0b965557..ee7ef111 100644 --- a/api/bsky/unspeccedsearchActorsSkeleton.go +++ b/api/bsky/unspeccedsearchActorsSkeleton.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // UnspeccedSearchActorsSkeleton_Output is the output of a app.bsky.unspecced.searchActorsSkeleton call. @@ -24,7 +24,7 @@ type UnspeccedSearchActorsSkeleton_Output struct { // q: Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. For typeahead search, only simple term match is supported, not full syntax. // typeahead: If true, acts as fast/simple 'typeahead' query. // viewer: DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking. -func UnspeccedSearchActorsSkeleton(ctx context.Context, c util.LexClient, cursor string, limit int64, q string, typeahead bool, viewer string) (*UnspeccedSearchActorsSkeleton_Output, error) { +func UnspeccedSearchActorsSkeleton(ctx context.Context, c lexutil.LexClient, cursor string, limit int64, q string, typeahead bool, viewer string) (*UnspeccedSearchActorsSkeleton_Output, error) { var out UnspeccedSearchActorsSkeleton_Output params := map[string]interface{}{} @@ -41,7 +41,7 @@ func UnspeccedSearchActorsSkeleton(ctx context.Context, c util.LexClient, cursor if viewer != "" { params["viewer"] = viewer } - if err := c.LexDo(ctx, util.Query, "", "app.bsky.unspecced.searchActorsSkeleton", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.unspecced.searchActorsSkeleton", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/unspeccedsearchPostsSkeleton.go b/api/bsky/unspeccedsearchPostsSkeleton.go index 453c4831..3d9bdad7 100644 --- a/api/bsky/unspeccedsearchPostsSkeleton.go +++ b/api/bsky/unspeccedsearchPostsSkeleton.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // UnspeccedSearchPostsSkeleton_Output is the output of a app.bsky.unspecced.searchPostsSkeleton call. @@ -32,7 +32,7 @@ type UnspeccedSearchPostsSkeleton_Output struct { // until: Filter results for posts before the indicated datetime (not inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYY-MM-DD). // url: Filter to posts with links (facet links or embeds) pointing to this URL. Server may apply URL normalization or fuzzy matching. // viewer: DID of the account making the request (not included for public/unauthenticated queries). Used for 'from:me' queries. -func UnspeccedSearchPostsSkeleton(ctx context.Context, c util.LexClient, author string, cursor string, domain string, lang string, limit int64, mentions string, q string, since string, sort string, tag []string, until string, url string, viewer string) (*UnspeccedSearchPostsSkeleton_Output, error) { +func UnspeccedSearchPostsSkeleton(ctx context.Context, c lexutil.LexClient, author string, cursor string, domain string, lang string, limit int64, mentions string, q string, since string, sort string, tag []string, until string, url string, viewer string) (*UnspeccedSearchPostsSkeleton_Output, error) { var out UnspeccedSearchPostsSkeleton_Output params := map[string]interface{}{} @@ -73,7 +73,7 @@ func UnspeccedSearchPostsSkeleton(ctx context.Context, c util.LexClient, author if viewer != "" { params["viewer"] = viewer } - if err := c.LexDo(ctx, util.Query, "", "app.bsky.unspecced.searchPostsSkeleton", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.unspecced.searchPostsSkeleton", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/unspeccedsearchStarterPacksSkeleton.go b/api/bsky/unspeccedsearchStarterPacksSkeleton.go index d8453871..0fef0af2 100644 --- a/api/bsky/unspeccedsearchStarterPacksSkeleton.go +++ b/api/bsky/unspeccedsearchStarterPacksSkeleton.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // UnspeccedSearchStarterPacksSkeleton_Output is the output of a app.bsky.unspecced.searchStarterPacksSkeleton call. @@ -23,7 +23,7 @@ type UnspeccedSearchStarterPacksSkeleton_Output struct { // cursor: Optional pagination mechanism; may not necessarily allow scrolling through entire result set. // q: Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. // viewer: DID of the account making the request (not included for public/unauthenticated queries). -func UnspeccedSearchStarterPacksSkeleton(ctx context.Context, c util.LexClient, cursor string, limit int64, q string, viewer string) (*UnspeccedSearchStarterPacksSkeleton_Output, error) { +func UnspeccedSearchStarterPacksSkeleton(ctx context.Context, c lexutil.LexClient, cursor string, limit int64, q string, viewer string) (*UnspeccedSearchStarterPacksSkeleton_Output, error) { var out UnspeccedSearchStarterPacksSkeleton_Output params := map[string]interface{}{} @@ -37,7 +37,7 @@ func UnspeccedSearchStarterPacksSkeleton(ctx context.Context, c util.LexClient, if viewer != "" { params["viewer"] = viewer } - if err := c.LexDo(ctx, util.Query, "", "app.bsky.unspecced.searchStarterPacksSkeleton", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.unspecced.searchStarterPacksSkeleton", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/videodefs.go b/api/bsky/videodefs.go index 8da5f7ca..0afb7cd1 100644 --- a/api/bsky/videodefs.go +++ b/api/bsky/videodefs.go @@ -5,16 +5,16 @@ package bsky import ( - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // VideoDefs_JobStatus is a "jobStatus" in the app.bsky.video.defs schema. type VideoDefs_JobStatus struct { - Blob *util.LexBlob `json:"blob,omitempty" cborgen:"blob,omitempty"` - Did string `json:"did" cborgen:"did"` - Error *string `json:"error,omitempty" cborgen:"error,omitempty"` - JobId string `json:"jobId" cborgen:"jobId"` - Message *string `json:"message,omitempty" cborgen:"message,omitempty"` + Blob *lexutil.LexBlob `json:"blob,omitempty" cborgen:"blob,omitempty"` + Did string `json:"did" cborgen:"did"` + Error *string `json:"error,omitempty" cborgen:"error,omitempty"` + JobId string `json:"jobId" cborgen:"jobId"` + Message *string `json:"message,omitempty" cborgen:"message,omitempty"` // progress: Progress within the current processing state. Progress *int64 `json:"progress,omitempty" cborgen:"progress,omitempty"` // state: The state of the video processing job. All values not listed as a known value indicate that the job is in process. diff --git a/api/bsky/videogetJobStatus.go b/api/bsky/videogetJobStatus.go index cd6e3061..c35a3dba 100644 --- a/api/bsky/videogetJobStatus.go +++ b/api/bsky/videogetJobStatus.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // VideoGetJobStatus_Output is the output of a app.bsky.video.getJobStatus call. @@ -16,12 +16,12 @@ type VideoGetJobStatus_Output struct { } // VideoGetJobStatus calls the XRPC method "app.bsky.video.getJobStatus". -func VideoGetJobStatus(ctx context.Context, c util.LexClient, jobId string) (*VideoGetJobStatus_Output, error) { +func VideoGetJobStatus(ctx context.Context, c lexutil.LexClient, jobId string) (*VideoGetJobStatus_Output, error) { var out VideoGetJobStatus_Output params := map[string]interface{}{} params["jobId"] = jobId - if err := c.LexDo(ctx, util.Query, "", "app.bsky.video.getJobStatus", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.video.getJobStatus", params, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/videogetUploadLimits.go b/api/bsky/videogetUploadLimits.go index 23639aac..87671804 100644 --- a/api/bsky/videogetUploadLimits.go +++ b/api/bsky/videogetUploadLimits.go @@ -7,7 +7,7 @@ package bsky import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // VideoGetUploadLimits_Output is the output of a app.bsky.video.getUploadLimits call. @@ -20,9 +20,9 @@ type VideoGetUploadLimits_Output struct { } // VideoGetUploadLimits calls the XRPC method "app.bsky.video.getUploadLimits". -func VideoGetUploadLimits(ctx context.Context, c util.LexClient) (*VideoGetUploadLimits_Output, error) { +func VideoGetUploadLimits(ctx context.Context, c lexutil.LexClient) (*VideoGetUploadLimits_Output, error) { var out VideoGetUploadLimits_Output - if err := c.LexDo(ctx, util.Query, "", "app.bsky.video.getUploadLimits", nil, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.video.getUploadLimits", nil, nil, &out); err != nil { return nil, err } diff --git a/api/bsky/videouploadVideo.go b/api/bsky/videouploadVideo.go index d1d94d78..4e7d2e64 100644 --- a/api/bsky/videouploadVideo.go +++ b/api/bsky/videouploadVideo.go @@ -8,7 +8,7 @@ import ( "context" "io" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // VideoUploadVideo_Output is the output of a app.bsky.video.uploadVideo call. @@ -17,9 +17,9 @@ type VideoUploadVideo_Output struct { } // VideoUploadVideo calls the XRPC method "app.bsky.video.uploadVideo". -func VideoUploadVideo(ctx context.Context, c util.LexClient, input io.Reader) (*VideoUploadVideo_Output, error) { +func VideoUploadVideo(ctx context.Context, c lexutil.LexClient, input io.Reader) (*VideoUploadVideo_Output, error) { var out VideoUploadVideo_Output - if err := c.LexDo(ctx, util.Procedure, "video/mp4", "app.bsky.video.uploadVideo", nil, input, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "video/mp4", "app.bsky.video.uploadVideo", nil, input, &out); err != nil { return nil, err } diff --git a/api/chat/actordeclaration.go b/api/chat/actordeclaration.go index e8ac997e..6766f666 100644 --- a/api/chat/actordeclaration.go +++ b/api/chat/actordeclaration.go @@ -5,11 +5,11 @@ package chat import ( - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) func init() { - util.RegisterType("chat.bsky.actor.declaration", &ActorDeclaration{}) + lexutil.RegisterType("chat.bsky.actor.declaration", &ActorDeclaration{}) } type ActorDeclaration struct { diff --git a/api/chat/actordefs.go b/api/chat/actordefs.go index a485caae..547773f3 100644 --- a/api/chat/actordefs.go +++ b/api/chat/actordefs.go @@ -5,20 +5,20 @@ package chat import ( - comatprototypes "github.com/bluesky-social/indigo/api/atproto" - appbskytypes "github.com/bluesky-social/indigo/api/bsky" + comatproto "github.com/bluesky-social/indigo/api/atproto" + appbsky "github.com/bluesky-social/indigo/api/bsky" ) // ActorDefs_ProfileViewBasic is a "profileViewBasic" in the chat.bsky.actor.defs schema. type ActorDefs_ProfileViewBasic struct { - Associated *appbskytypes.ActorDefs_ProfileAssociated `json:"associated,omitempty" cborgen:"associated,omitempty"` - Avatar *string `json:"avatar,omitempty" cborgen:"avatar,omitempty"` + Associated *appbsky.ActorDefs_ProfileAssociated `json:"associated,omitempty" cborgen:"associated,omitempty"` + Avatar *string `json:"avatar,omitempty" cborgen:"avatar,omitempty"` // chatDisabled: Set to true when the actor cannot actively participate in conversations - ChatDisabled *bool `json:"chatDisabled,omitempty" cborgen:"chatDisabled,omitempty"` - Did string `json:"did" cborgen:"did"` - DisplayName *string `json:"displayName,omitempty" cborgen:"displayName,omitempty"` - Handle string `json:"handle" cborgen:"handle"` - Labels []*comatprototypes.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` - Verification *appbskytypes.ActorDefs_VerificationState `json:"verification,omitempty" cborgen:"verification,omitempty"` - Viewer *appbskytypes.ActorDefs_ViewerState `json:"viewer,omitempty" cborgen:"viewer,omitempty"` + ChatDisabled *bool `json:"chatDisabled,omitempty" cborgen:"chatDisabled,omitempty"` + Did string `json:"did" cborgen:"did"` + DisplayName *string `json:"displayName,omitempty" cborgen:"displayName,omitempty"` + Handle string `json:"handle" cborgen:"handle"` + Labels []*comatproto.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` + Verification *appbsky.ActorDefs_VerificationState `json:"verification,omitempty" cborgen:"verification,omitempty"` + Viewer *appbsky.ActorDefs_ViewerState `json:"viewer,omitempty" cborgen:"viewer,omitempty"` } diff --git a/api/chat/actordeleteAccount.go b/api/chat/actordeleteAccount.go index b1d2f1aa..d5964893 100644 --- a/api/chat/actordeleteAccount.go +++ b/api/chat/actordeleteAccount.go @@ -7,7 +7,7 @@ package chat import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ActorDeleteAccount_Output is the output of a chat.bsky.actor.deleteAccount call. @@ -15,9 +15,9 @@ type ActorDeleteAccount_Output struct { } // ActorDeleteAccount calls the XRPC method "chat.bsky.actor.deleteAccount". -func ActorDeleteAccount(ctx context.Context, c util.LexClient) (*ActorDeleteAccount_Output, error) { +func ActorDeleteAccount(ctx context.Context, c lexutil.LexClient) (*ActorDeleteAccount_Output, error) { var out ActorDeleteAccount_Output - if err := c.LexDo(ctx, util.Procedure, "", "chat.bsky.actor.deleteAccount", nil, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "", "chat.bsky.actor.deleteAccount", nil, nil, &out); err != nil { return nil, err } diff --git a/api/chat/actorexportAccountData.go b/api/chat/actorexportAccountData.go index 2a15d106..0851203c 100644 --- a/api/chat/actorexportAccountData.go +++ b/api/chat/actorexportAccountData.go @@ -8,13 +8,13 @@ import ( "bytes" "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ActorExportAccountData calls the XRPC method "chat.bsky.actor.exportAccountData". -func ActorExportAccountData(ctx context.Context, c util.LexClient) ([]byte, error) { +func ActorExportAccountData(ctx context.Context, c lexutil.LexClient) ([]byte, error) { buf := new(bytes.Buffer) - if err := c.LexDo(ctx, util.Query, "", "chat.bsky.actor.exportAccountData", nil, nil, buf); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "chat.bsky.actor.exportAccountData", nil, nil, buf); err != nil { return nil, err } diff --git a/api/chat/convoacceptConvo.go b/api/chat/convoacceptConvo.go index 590ad0df..27efe1d9 100644 --- a/api/chat/convoacceptConvo.go +++ b/api/chat/convoacceptConvo.go @@ -7,7 +7,7 @@ package chat import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ConvoAcceptConvo_Input is the input argument to a chat.bsky.convo.acceptConvo call. @@ -22,9 +22,9 @@ type ConvoAcceptConvo_Output struct { } // ConvoAcceptConvo calls the XRPC method "chat.bsky.convo.acceptConvo". -func ConvoAcceptConvo(ctx context.Context, c util.LexClient, input *ConvoAcceptConvo_Input) (*ConvoAcceptConvo_Output, error) { +func ConvoAcceptConvo(ctx context.Context, c lexutil.LexClient, input *ConvoAcceptConvo_Input) (*ConvoAcceptConvo_Output, error) { var out ConvoAcceptConvo_Output - if err := c.LexDo(ctx, util.Procedure, "application/json", "chat.bsky.convo.acceptConvo", nil, input, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "chat.bsky.convo.acceptConvo", nil, input, &out); err != nil { return nil, err } diff --git a/api/chat/convoaddReaction.go b/api/chat/convoaddReaction.go index f2a8ca09..296901f6 100644 --- a/api/chat/convoaddReaction.go +++ b/api/chat/convoaddReaction.go @@ -7,7 +7,7 @@ package chat import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ConvoAddReaction_Input is the input argument to a chat.bsky.convo.addReaction call. @@ -23,9 +23,9 @@ type ConvoAddReaction_Output struct { } // ConvoAddReaction calls the XRPC method "chat.bsky.convo.addReaction". -func ConvoAddReaction(ctx context.Context, c util.LexClient, input *ConvoAddReaction_Input) (*ConvoAddReaction_Output, error) { +func ConvoAddReaction(ctx context.Context, c lexutil.LexClient, input *ConvoAddReaction_Input) (*ConvoAddReaction_Output, error) { var out ConvoAddReaction_Output - if err := c.LexDo(ctx, util.Procedure, "application/json", "chat.bsky.convo.addReaction", nil, input, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "chat.bsky.convo.addReaction", nil, input, &out); err != nil { return nil, err } diff --git a/api/chat/convodefs.go b/api/chat/convodefs.go index d114dde2..b013ce96 100644 --- a/api/chat/convodefs.go +++ b/api/chat/convodefs.go @@ -8,8 +8,8 @@ import ( "encoding/json" "fmt" - appbskytypes "github.com/bluesky-social/indigo/api/bsky" - "github.com/bluesky-social/indigo/lex/util" + appbsky "github.com/bluesky-social/indigo/api/bsky" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ConvoDefs_ConvoView is a "convoView" in the chat.bsky.convo.defs schema. @@ -42,7 +42,7 @@ func (t *ConvoDefs_ConvoView_LastMessage) MarshalJSON() ([]byte, error) { } func (t *ConvoDefs_ConvoView_LastMessage) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -54,7 +54,6 @@ func (t *ConvoDefs_ConvoView_LastMessage) UnmarshalJSON(b []byte) error { case "chat.bsky.convo.defs#deletedMessageView": t.ConvoDefs_DeletedMessageView = new(ConvoDefs_DeletedMessageView) return json.Unmarshal(b, t.ConvoDefs_DeletedMessageView) - default: return nil } @@ -73,7 +72,7 @@ func (t *ConvoDefs_ConvoView_LastReaction) MarshalJSON() ([]byte, error) { } func (t *ConvoDefs_ConvoView_LastReaction) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -82,7 +81,6 @@ func (t *ConvoDefs_ConvoView_LastReaction) UnmarshalJSON(b []byte) error { case "chat.bsky.convo.defs#messageAndReactionView": t.ConvoDefs_MessageAndReactionView = new(ConvoDefs_MessageAndReactionView) return json.Unmarshal(b, t.ConvoDefs_MessageAndReactionView) - default: return nil } @@ -131,7 +129,7 @@ func (t *ConvoDefs_LogAddReaction_Message) MarshalJSON() ([]byte, error) { } func (t *ConvoDefs_LogAddReaction_Message) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -143,7 +141,6 @@ func (t *ConvoDefs_LogAddReaction_Message) UnmarshalJSON(b []byte) error { case "chat.bsky.convo.defs#deletedMessageView": t.ConvoDefs_DeletedMessageView = new(ConvoDefs_DeletedMessageView) return json.Unmarshal(b, t.ConvoDefs_DeletedMessageView) - default: return nil } @@ -182,7 +179,7 @@ func (t *ConvoDefs_LogCreateMessage_Message) MarshalJSON() ([]byte, error) { } func (t *ConvoDefs_LogCreateMessage_Message) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -194,7 +191,6 @@ func (t *ConvoDefs_LogCreateMessage_Message) UnmarshalJSON(b []byte) error { case "chat.bsky.convo.defs#deletedMessageView": t.ConvoDefs_DeletedMessageView = new(ConvoDefs_DeletedMessageView) return json.Unmarshal(b, t.ConvoDefs_DeletedMessageView) - default: return nil } @@ -226,7 +222,7 @@ func (t *ConvoDefs_LogDeleteMessage_Message) MarshalJSON() ([]byte, error) { } func (t *ConvoDefs_LogDeleteMessage_Message) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -238,7 +234,6 @@ func (t *ConvoDefs_LogDeleteMessage_Message) UnmarshalJSON(b []byte) error { case "chat.bsky.convo.defs#deletedMessageView": t.ConvoDefs_DeletedMessageView = new(ConvoDefs_DeletedMessageView) return json.Unmarshal(b, t.ConvoDefs_DeletedMessageView) - default: return nil } @@ -284,7 +279,7 @@ func (t *ConvoDefs_LogReadMessage_Message) MarshalJSON() ([]byte, error) { } func (t *ConvoDefs_LogReadMessage_Message) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -296,7 +291,6 @@ func (t *ConvoDefs_LogReadMessage_Message) UnmarshalJSON(b []byte) error { case "chat.bsky.convo.defs#deletedMessageView": t.ConvoDefs_DeletedMessageView = new(ConvoDefs_DeletedMessageView) return json.Unmarshal(b, t.ConvoDefs_DeletedMessageView) - default: return nil } @@ -329,7 +323,7 @@ func (t *ConvoDefs_LogRemoveReaction_Message) MarshalJSON() ([]byte, error) { } func (t *ConvoDefs_LogRemoveReaction_Message) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -341,7 +335,6 @@ func (t *ConvoDefs_LogRemoveReaction_Message) UnmarshalJSON(b []byte) error { case "chat.bsky.convo.defs#deletedMessageView": t.ConvoDefs_DeletedMessageView = new(ConvoDefs_DeletedMessageView) return json.Unmarshal(b, t.ConvoDefs_DeletedMessageView) - default: return nil } @@ -365,12 +358,12 @@ type ConvoDefs_MessageAndReactionView struct { type ConvoDefs_MessageInput struct { Embed *ConvoDefs_MessageInput_Embed `json:"embed,omitempty" cborgen:"embed,omitempty"` // facets: Annotations of text (mentions, URLs, hashtags, etc) - Facets []*appbskytypes.RichtextFacet `json:"facets,omitempty" cborgen:"facets,omitempty"` - Text string `json:"text" cborgen:"text"` + Facets []*appbsky.RichtextFacet `json:"facets,omitempty" cborgen:"facets,omitempty"` + Text string `json:"text" cborgen:"text"` } type ConvoDefs_MessageInput_Embed struct { - EmbedRecord *appbskytypes.EmbedRecord + EmbedRecord *appbsky.EmbedRecord } func (t *ConvoDefs_MessageInput_Embed) MarshalJSON() ([]byte, error) { @@ -382,16 +375,15 @@ func (t *ConvoDefs_MessageInput_Embed) MarshalJSON() ([]byte, error) { } func (t *ConvoDefs_MessageInput_Embed) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } switch typ { case "app.bsky.embed.record": - t.EmbedRecord = new(appbskytypes.EmbedRecord) + t.EmbedRecord = new(appbsky.EmbedRecord) return json.Unmarshal(b, t.EmbedRecord) - default: return nil } @@ -410,8 +402,8 @@ type ConvoDefs_MessageView struct { LexiconTypeID string `json:"$type" cborgen:"$type,const=chat.bsky.convo.defs#messageView"` Embed *ConvoDefs_MessageView_Embed `json:"embed,omitempty" cborgen:"embed,omitempty"` // facets: Annotations of text (mentions, URLs, hashtags, etc) - Facets []*appbskytypes.RichtextFacet `json:"facets,omitempty" cborgen:"facets,omitempty"` - Id string `json:"id" cborgen:"id"` + Facets []*appbsky.RichtextFacet `json:"facets,omitempty" cborgen:"facets,omitempty"` + Id string `json:"id" cborgen:"id"` // reactions: Reactions to this message, in ascending order of creation time. Reactions []*ConvoDefs_ReactionView `json:"reactions,omitempty" cborgen:"reactions,omitempty"` Rev string `json:"rev" cborgen:"rev"` @@ -426,7 +418,7 @@ type ConvoDefs_MessageViewSender struct { } type ConvoDefs_MessageView_Embed struct { - EmbedRecord_View *appbskytypes.EmbedRecord_View + EmbedRecord_View *appbsky.EmbedRecord_View } func (t *ConvoDefs_MessageView_Embed) MarshalJSON() ([]byte, error) { @@ -438,16 +430,15 @@ func (t *ConvoDefs_MessageView_Embed) MarshalJSON() ([]byte, error) { } func (t *ConvoDefs_MessageView_Embed) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } switch typ { case "app.bsky.embed.record#view": - t.EmbedRecord_View = new(appbskytypes.EmbedRecord_View) + t.EmbedRecord_View = new(appbsky.EmbedRecord_View) return json.Unmarshal(b, t.EmbedRecord_View) - default: return nil } diff --git a/api/chat/convodeleteMessageForSelf.go b/api/chat/convodeleteMessageForSelf.go index 4d493ccf..b2bb8691 100644 --- a/api/chat/convodeleteMessageForSelf.go +++ b/api/chat/convodeleteMessageForSelf.go @@ -7,7 +7,7 @@ package chat import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ConvoDeleteMessageForSelf_Input is the input argument to a chat.bsky.convo.deleteMessageForSelf call. @@ -17,9 +17,9 @@ type ConvoDeleteMessageForSelf_Input struct { } // ConvoDeleteMessageForSelf calls the XRPC method "chat.bsky.convo.deleteMessageForSelf". -func ConvoDeleteMessageForSelf(ctx context.Context, c util.LexClient, input *ConvoDeleteMessageForSelf_Input) (*ConvoDefs_DeletedMessageView, error) { +func ConvoDeleteMessageForSelf(ctx context.Context, c lexutil.LexClient, input *ConvoDeleteMessageForSelf_Input) (*ConvoDefs_DeletedMessageView, error) { var out ConvoDefs_DeletedMessageView - if err := c.LexDo(ctx, util.Procedure, "application/json", "chat.bsky.convo.deleteMessageForSelf", nil, input, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "chat.bsky.convo.deleteMessageForSelf", nil, input, &out); err != nil { return nil, err } diff --git a/api/chat/convogetConvo.go b/api/chat/convogetConvo.go index cdffd67f..e87a2e03 100644 --- a/api/chat/convogetConvo.go +++ b/api/chat/convogetConvo.go @@ -7,7 +7,7 @@ package chat import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ConvoGetConvo_Output is the output of a chat.bsky.convo.getConvo call. @@ -16,12 +16,12 @@ type ConvoGetConvo_Output struct { } // ConvoGetConvo calls the XRPC method "chat.bsky.convo.getConvo". -func ConvoGetConvo(ctx context.Context, c util.LexClient, convoId string) (*ConvoGetConvo_Output, error) { +func ConvoGetConvo(ctx context.Context, c lexutil.LexClient, convoId string) (*ConvoGetConvo_Output, error) { var out ConvoGetConvo_Output params := map[string]interface{}{} params["convoId"] = convoId - if err := c.LexDo(ctx, util.Query, "", "chat.bsky.convo.getConvo", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "chat.bsky.convo.getConvo", params, nil, &out); err != nil { return nil, err } diff --git a/api/chat/convogetConvoAvailability.go b/api/chat/convogetConvoAvailability.go index 299c0977..670fe268 100644 --- a/api/chat/convogetConvoAvailability.go +++ b/api/chat/convogetConvoAvailability.go @@ -7,7 +7,7 @@ package chat import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ConvoGetConvoAvailability_Output is the output of a chat.bsky.convo.getConvoAvailability call. @@ -17,12 +17,12 @@ type ConvoGetConvoAvailability_Output struct { } // ConvoGetConvoAvailability calls the XRPC method "chat.bsky.convo.getConvoAvailability". -func ConvoGetConvoAvailability(ctx context.Context, c util.LexClient, members []string) (*ConvoGetConvoAvailability_Output, error) { +func ConvoGetConvoAvailability(ctx context.Context, c lexutil.LexClient, members []string) (*ConvoGetConvoAvailability_Output, error) { var out ConvoGetConvoAvailability_Output params := map[string]interface{}{} params["members"] = members - if err := c.LexDo(ctx, util.Query, "", "chat.bsky.convo.getConvoAvailability", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "chat.bsky.convo.getConvoAvailability", params, nil, &out); err != nil { return nil, err } diff --git a/api/chat/convogetConvoForMembers.go b/api/chat/convogetConvoForMembers.go index e3e24091..2ab28d82 100644 --- a/api/chat/convogetConvoForMembers.go +++ b/api/chat/convogetConvoForMembers.go @@ -7,7 +7,7 @@ package chat import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ConvoGetConvoForMembers_Output is the output of a chat.bsky.convo.getConvoForMembers call. @@ -16,12 +16,12 @@ type ConvoGetConvoForMembers_Output struct { } // ConvoGetConvoForMembers calls the XRPC method "chat.bsky.convo.getConvoForMembers". -func ConvoGetConvoForMembers(ctx context.Context, c util.LexClient, members []string) (*ConvoGetConvoForMembers_Output, error) { +func ConvoGetConvoForMembers(ctx context.Context, c lexutil.LexClient, members []string) (*ConvoGetConvoForMembers_Output, error) { var out ConvoGetConvoForMembers_Output params := map[string]interface{}{} params["members"] = members - if err := c.LexDo(ctx, util.Query, "", "chat.bsky.convo.getConvoForMembers", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "chat.bsky.convo.getConvoForMembers", params, nil, &out); err != nil { return nil, err } diff --git a/api/chat/convogetLog.go b/api/chat/convogetLog.go index 683b4802..482f553d 100644 --- a/api/chat/convogetLog.go +++ b/api/chat/convogetLog.go @@ -9,7 +9,7 @@ import ( "encoding/json" "fmt" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ConvoGetLog_Output is the output of a chat.bsky.convo.getLog call. @@ -76,7 +76,7 @@ func (t *ConvoGetLog_Output_Logs_Elem) MarshalJSON() ([]byte, error) { } func (t *ConvoGetLog_Output_Logs_Elem) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -112,21 +112,20 @@ func (t *ConvoGetLog_Output_Logs_Elem) UnmarshalJSON(b []byte) error { case "chat.bsky.convo.defs#logRemoveReaction": t.ConvoDefs_LogRemoveReaction = new(ConvoDefs_LogRemoveReaction) return json.Unmarshal(b, t.ConvoDefs_LogRemoveReaction) - default: return nil } } // ConvoGetLog calls the XRPC method "chat.bsky.convo.getLog". -func ConvoGetLog(ctx context.Context, c util.LexClient, cursor string) (*ConvoGetLog_Output, error) { +func ConvoGetLog(ctx context.Context, c lexutil.LexClient, cursor string) (*ConvoGetLog_Output, error) { var out ConvoGetLog_Output params := map[string]interface{}{} if cursor != "" { params["cursor"] = cursor } - if err := c.LexDo(ctx, util.Query, "", "chat.bsky.convo.getLog", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "chat.bsky.convo.getLog", params, nil, &out); err != nil { return nil, err } diff --git a/api/chat/convogetMessages.go b/api/chat/convogetMessages.go index 24c8183a..f3eb66cb 100644 --- a/api/chat/convogetMessages.go +++ b/api/chat/convogetMessages.go @@ -9,7 +9,7 @@ import ( "encoding/json" "fmt" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ConvoGetMessages_Output is the output of a chat.bsky.convo.getMessages call. @@ -36,7 +36,7 @@ func (t *ConvoGetMessages_Output_Messages_Elem) MarshalJSON() ([]byte, error) { } func (t *ConvoGetMessages_Output_Messages_Elem) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -48,14 +48,13 @@ func (t *ConvoGetMessages_Output_Messages_Elem) UnmarshalJSON(b []byte) error { case "chat.bsky.convo.defs#deletedMessageView": t.ConvoDefs_DeletedMessageView = new(ConvoDefs_DeletedMessageView) return json.Unmarshal(b, t.ConvoDefs_DeletedMessageView) - default: return nil } } // ConvoGetMessages calls the XRPC method "chat.bsky.convo.getMessages". -func ConvoGetMessages(ctx context.Context, c util.LexClient, convoId string, cursor string, limit int64) (*ConvoGetMessages_Output, error) { +func ConvoGetMessages(ctx context.Context, c lexutil.LexClient, convoId string, cursor string, limit int64) (*ConvoGetMessages_Output, error) { var out ConvoGetMessages_Output params := map[string]interface{}{} @@ -66,7 +65,7 @@ func ConvoGetMessages(ctx context.Context, c util.LexClient, convoId string, cur if limit != 0 { params["limit"] = limit } - if err := c.LexDo(ctx, util.Query, "", "chat.bsky.convo.getMessages", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "chat.bsky.convo.getMessages", params, nil, &out); err != nil { return nil, err } diff --git a/api/chat/convoleaveConvo.go b/api/chat/convoleaveConvo.go index f2475a14..3429eb49 100644 --- a/api/chat/convoleaveConvo.go +++ b/api/chat/convoleaveConvo.go @@ -7,7 +7,7 @@ package chat import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ConvoLeaveConvo_Input is the input argument to a chat.bsky.convo.leaveConvo call. @@ -22,9 +22,9 @@ type ConvoLeaveConvo_Output struct { } // ConvoLeaveConvo calls the XRPC method "chat.bsky.convo.leaveConvo". -func ConvoLeaveConvo(ctx context.Context, c util.LexClient, input *ConvoLeaveConvo_Input) (*ConvoLeaveConvo_Output, error) { +func ConvoLeaveConvo(ctx context.Context, c lexutil.LexClient, input *ConvoLeaveConvo_Input) (*ConvoLeaveConvo_Output, error) { var out ConvoLeaveConvo_Output - if err := c.LexDo(ctx, util.Procedure, "application/json", "chat.bsky.convo.leaveConvo", nil, input, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "chat.bsky.convo.leaveConvo", nil, input, &out); err != nil { return nil, err } diff --git a/api/chat/convolistConvos.go b/api/chat/convolistConvos.go index 145aeeb0..0e516d94 100644 --- a/api/chat/convolistConvos.go +++ b/api/chat/convolistConvos.go @@ -7,7 +7,7 @@ package chat import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ConvoListConvos_Output is the output of a chat.bsky.convo.listConvos call. @@ -17,7 +17,7 @@ type ConvoListConvos_Output struct { } // ConvoListConvos calls the XRPC method "chat.bsky.convo.listConvos". -func ConvoListConvos(ctx context.Context, c util.LexClient, cursor string, limit int64, readState string, status string) (*ConvoListConvos_Output, error) { +func ConvoListConvos(ctx context.Context, c lexutil.LexClient, cursor string, limit int64, readState string, status string) (*ConvoListConvos_Output, error) { var out ConvoListConvos_Output params := map[string]interface{}{} @@ -33,7 +33,7 @@ func ConvoListConvos(ctx context.Context, c util.LexClient, cursor string, limit if status != "" { params["status"] = status } - if err := c.LexDo(ctx, util.Query, "", "chat.bsky.convo.listConvos", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "chat.bsky.convo.listConvos", params, nil, &out); err != nil { return nil, err } diff --git a/api/chat/convomuteConvo.go b/api/chat/convomuteConvo.go index 0bd8fb20..37b6c455 100644 --- a/api/chat/convomuteConvo.go +++ b/api/chat/convomuteConvo.go @@ -7,7 +7,7 @@ package chat import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ConvoMuteConvo_Input is the input argument to a chat.bsky.convo.muteConvo call. @@ -21,9 +21,9 @@ type ConvoMuteConvo_Output struct { } // ConvoMuteConvo calls the XRPC method "chat.bsky.convo.muteConvo". -func ConvoMuteConvo(ctx context.Context, c util.LexClient, input *ConvoMuteConvo_Input) (*ConvoMuteConvo_Output, error) { +func ConvoMuteConvo(ctx context.Context, c lexutil.LexClient, input *ConvoMuteConvo_Input) (*ConvoMuteConvo_Output, error) { var out ConvoMuteConvo_Output - if err := c.LexDo(ctx, util.Procedure, "application/json", "chat.bsky.convo.muteConvo", nil, input, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "chat.bsky.convo.muteConvo", nil, input, &out); err != nil { return nil, err } diff --git a/api/chat/convoremoveReaction.go b/api/chat/convoremoveReaction.go index 8401cd42..f8ec1c70 100644 --- a/api/chat/convoremoveReaction.go +++ b/api/chat/convoremoveReaction.go @@ -7,7 +7,7 @@ package chat import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ConvoRemoveReaction_Input is the input argument to a chat.bsky.convo.removeReaction call. @@ -23,9 +23,9 @@ type ConvoRemoveReaction_Output struct { } // ConvoRemoveReaction calls the XRPC method "chat.bsky.convo.removeReaction". -func ConvoRemoveReaction(ctx context.Context, c util.LexClient, input *ConvoRemoveReaction_Input) (*ConvoRemoveReaction_Output, error) { +func ConvoRemoveReaction(ctx context.Context, c lexutil.LexClient, input *ConvoRemoveReaction_Input) (*ConvoRemoveReaction_Output, error) { var out ConvoRemoveReaction_Output - if err := c.LexDo(ctx, util.Procedure, "application/json", "chat.bsky.convo.removeReaction", nil, input, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "chat.bsky.convo.removeReaction", nil, input, &out); err != nil { return nil, err } diff --git a/api/chat/convosendMessage.go b/api/chat/convosendMessage.go index 2a63caa4..1f723615 100644 --- a/api/chat/convosendMessage.go +++ b/api/chat/convosendMessage.go @@ -7,7 +7,7 @@ package chat import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ConvoSendMessage_Input is the input argument to a chat.bsky.convo.sendMessage call. @@ -17,9 +17,9 @@ type ConvoSendMessage_Input struct { } // ConvoSendMessage calls the XRPC method "chat.bsky.convo.sendMessage". -func ConvoSendMessage(ctx context.Context, c util.LexClient, input *ConvoSendMessage_Input) (*ConvoDefs_MessageView, error) { +func ConvoSendMessage(ctx context.Context, c lexutil.LexClient, input *ConvoSendMessage_Input) (*ConvoDefs_MessageView, error) { var out ConvoDefs_MessageView - if err := c.LexDo(ctx, util.Procedure, "application/json", "chat.bsky.convo.sendMessage", nil, input, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "chat.bsky.convo.sendMessage", nil, input, &out); err != nil { return nil, err } diff --git a/api/chat/convosendMessageBatch.go b/api/chat/convosendMessageBatch.go index 23e00fa2..01cc3f25 100644 --- a/api/chat/convosendMessageBatch.go +++ b/api/chat/convosendMessageBatch.go @@ -7,7 +7,7 @@ package chat import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ConvoSendMessageBatch_BatchItem is a "batchItem" in the chat.bsky.convo.sendMessageBatch schema. @@ -27,9 +27,9 @@ type ConvoSendMessageBatch_Output struct { } // ConvoSendMessageBatch calls the XRPC method "chat.bsky.convo.sendMessageBatch". -func ConvoSendMessageBatch(ctx context.Context, c util.LexClient, input *ConvoSendMessageBatch_Input) (*ConvoSendMessageBatch_Output, error) { +func ConvoSendMessageBatch(ctx context.Context, c lexutil.LexClient, input *ConvoSendMessageBatch_Input) (*ConvoSendMessageBatch_Output, error) { var out ConvoSendMessageBatch_Output - if err := c.LexDo(ctx, util.Procedure, "application/json", "chat.bsky.convo.sendMessageBatch", nil, input, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "chat.bsky.convo.sendMessageBatch", nil, input, &out); err != nil { return nil, err } diff --git a/api/chat/convounmuteConvo.go b/api/chat/convounmuteConvo.go index 2798f629..7228d549 100644 --- a/api/chat/convounmuteConvo.go +++ b/api/chat/convounmuteConvo.go @@ -7,7 +7,7 @@ package chat import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ConvoUnmuteConvo_Input is the input argument to a chat.bsky.convo.unmuteConvo call. @@ -21,9 +21,9 @@ type ConvoUnmuteConvo_Output struct { } // ConvoUnmuteConvo calls the XRPC method "chat.bsky.convo.unmuteConvo". -func ConvoUnmuteConvo(ctx context.Context, c util.LexClient, input *ConvoUnmuteConvo_Input) (*ConvoUnmuteConvo_Output, error) { +func ConvoUnmuteConvo(ctx context.Context, c lexutil.LexClient, input *ConvoUnmuteConvo_Input) (*ConvoUnmuteConvo_Output, error) { var out ConvoUnmuteConvo_Output - if err := c.LexDo(ctx, util.Procedure, "application/json", "chat.bsky.convo.unmuteConvo", nil, input, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "chat.bsky.convo.unmuteConvo", nil, input, &out); err != nil { return nil, err } diff --git a/api/chat/convoupdateAllRead.go b/api/chat/convoupdateAllRead.go index 2a34598b..02d18cd4 100644 --- a/api/chat/convoupdateAllRead.go +++ b/api/chat/convoupdateAllRead.go @@ -7,7 +7,7 @@ package chat import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ConvoUpdateAllRead_Input is the input argument to a chat.bsky.convo.updateAllRead call. @@ -22,9 +22,9 @@ type ConvoUpdateAllRead_Output struct { } // ConvoUpdateAllRead calls the XRPC method "chat.bsky.convo.updateAllRead". -func ConvoUpdateAllRead(ctx context.Context, c util.LexClient, input *ConvoUpdateAllRead_Input) (*ConvoUpdateAllRead_Output, error) { +func ConvoUpdateAllRead(ctx context.Context, c lexutil.LexClient, input *ConvoUpdateAllRead_Input) (*ConvoUpdateAllRead_Output, error) { var out ConvoUpdateAllRead_Output - if err := c.LexDo(ctx, util.Procedure, "application/json", "chat.bsky.convo.updateAllRead", nil, input, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "chat.bsky.convo.updateAllRead", nil, input, &out); err != nil { return nil, err } diff --git a/api/chat/convoupdateRead.go b/api/chat/convoupdateRead.go index 5c6f8b5f..85494fb8 100644 --- a/api/chat/convoupdateRead.go +++ b/api/chat/convoupdateRead.go @@ -7,7 +7,7 @@ package chat import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ConvoUpdateRead_Input is the input argument to a chat.bsky.convo.updateRead call. @@ -22,9 +22,9 @@ type ConvoUpdateRead_Output struct { } // ConvoUpdateRead calls the XRPC method "chat.bsky.convo.updateRead". -func ConvoUpdateRead(ctx context.Context, c util.LexClient, input *ConvoUpdateRead_Input) (*ConvoUpdateRead_Output, error) { +func ConvoUpdateRead(ctx context.Context, c lexutil.LexClient, input *ConvoUpdateRead_Input) (*ConvoUpdateRead_Output, error) { var out ConvoUpdateRead_Output - if err := c.LexDo(ctx, util.Procedure, "application/json", "chat.bsky.convo.updateRead", nil, input, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "chat.bsky.convo.updateRead", nil, input, &out); err != nil { return nil, err } diff --git a/api/chat/moderationgetActorMetadata.go b/api/chat/moderationgetActorMetadata.go index dc1ba6ab..401c7f36 100644 --- a/api/chat/moderationgetActorMetadata.go +++ b/api/chat/moderationgetActorMetadata.go @@ -7,7 +7,7 @@ package chat import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ModerationGetActorMetadata_Metadata is a "metadata" in the chat.bsky.moderation.getActorMetadata schema. @@ -26,12 +26,12 @@ type ModerationGetActorMetadata_Output struct { } // ModerationGetActorMetadata calls the XRPC method "chat.bsky.moderation.getActorMetadata". -func ModerationGetActorMetadata(ctx context.Context, c util.LexClient, actor string) (*ModerationGetActorMetadata_Output, error) { +func ModerationGetActorMetadata(ctx context.Context, c lexutil.LexClient, actor string) (*ModerationGetActorMetadata_Output, error) { var out ModerationGetActorMetadata_Output params := map[string]interface{}{} params["actor"] = actor - if err := c.LexDo(ctx, util.Query, "", "chat.bsky.moderation.getActorMetadata", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "chat.bsky.moderation.getActorMetadata", params, nil, &out); err != nil { return nil, err } diff --git a/api/chat/moderationgetMessageContext.go b/api/chat/moderationgetMessageContext.go index cd8e07fa..764ca273 100644 --- a/api/chat/moderationgetMessageContext.go +++ b/api/chat/moderationgetMessageContext.go @@ -9,7 +9,7 @@ import ( "encoding/json" "fmt" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ModerationGetMessageContext_Output is the output of a chat.bsky.moderation.getMessageContext call. @@ -35,7 +35,7 @@ func (t *ModerationGetMessageContext_Output_Messages_Elem) MarshalJSON() ([]byte } func (t *ModerationGetMessageContext_Output_Messages_Elem) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -47,7 +47,6 @@ func (t *ModerationGetMessageContext_Output_Messages_Elem) UnmarshalJSON(b []byt case "chat.bsky.convo.defs#deletedMessageView": t.ConvoDefs_DeletedMessageView = new(ConvoDefs_DeletedMessageView) return json.Unmarshal(b, t.ConvoDefs_DeletedMessageView) - default: return nil } @@ -56,7 +55,7 @@ func (t *ModerationGetMessageContext_Output_Messages_Elem) UnmarshalJSON(b []byt // ModerationGetMessageContext calls the XRPC method "chat.bsky.moderation.getMessageContext". // // convoId: Conversation that the message is from. NOTE: this field will eventually be required. -func ModerationGetMessageContext(ctx context.Context, c util.LexClient, after int64, before int64, convoId string, messageId string) (*ModerationGetMessageContext_Output, error) { +func ModerationGetMessageContext(ctx context.Context, c lexutil.LexClient, after int64, before int64, convoId string, messageId string) (*ModerationGetMessageContext_Output, error) { var out ModerationGetMessageContext_Output params := map[string]interface{}{} @@ -70,7 +69,7 @@ func ModerationGetMessageContext(ctx context.Context, c util.LexClient, after in params["convoId"] = convoId } params["messageId"] = messageId - if err := c.LexDo(ctx, util.Query, "", "chat.bsky.moderation.getMessageContext", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "chat.bsky.moderation.getMessageContext", params, nil, &out); err != nil { return nil, err } diff --git a/api/chat/moderationupdateActorAccess.go b/api/chat/moderationupdateActorAccess.go index efb5614c..121555fe 100644 --- a/api/chat/moderationupdateActorAccess.go +++ b/api/chat/moderationupdateActorAccess.go @@ -7,7 +7,7 @@ package chat import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ModerationUpdateActorAccess_Input is the input argument to a chat.bsky.moderation.updateActorAccess call. @@ -18,8 +18,8 @@ type ModerationUpdateActorAccess_Input struct { } // ModerationUpdateActorAccess calls the XRPC method "chat.bsky.moderation.updateActorAccess". -func ModerationUpdateActorAccess(ctx context.Context, c util.LexClient, input *ModerationUpdateActorAccess_Input) error { - if err := c.LexDo(ctx, util.Procedure, "application/json", "chat.bsky.moderation.updateActorAccess", nil, input, nil); err != nil { +func ModerationUpdateActorAccess(ctx context.Context, c lexutil.LexClient, input *ModerationUpdateActorAccess_Input) error { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "chat.bsky.moderation.updateActorAccess", nil, input, nil); err != nil { return err } diff --git a/api/ozone/communicationcreateTemplate.go b/api/ozone/communicationcreateTemplate.go index 8e145601..3a04e59e 100644 --- a/api/ozone/communicationcreateTemplate.go +++ b/api/ozone/communicationcreateTemplate.go @@ -7,7 +7,7 @@ package ozone import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // CommunicationCreateTemplate_Input is the input argument to a tools.ozone.communication.createTemplate call. @@ -25,9 +25,9 @@ type CommunicationCreateTemplate_Input struct { } // CommunicationCreateTemplate calls the XRPC method "tools.ozone.communication.createTemplate". -func CommunicationCreateTemplate(ctx context.Context, c util.LexClient, input *CommunicationCreateTemplate_Input) (*CommunicationDefs_TemplateView, error) { +func CommunicationCreateTemplate(ctx context.Context, c lexutil.LexClient, input *CommunicationCreateTemplate_Input) (*CommunicationDefs_TemplateView, error) { var out CommunicationDefs_TemplateView - if err := c.LexDo(ctx, util.Procedure, "application/json", "tools.ozone.communication.createTemplate", nil, input, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "tools.ozone.communication.createTemplate", nil, input, &out); err != nil { return nil, err } diff --git a/api/ozone/communicationdeleteTemplate.go b/api/ozone/communicationdeleteTemplate.go index 34dad6c4..0a7f911b 100644 --- a/api/ozone/communicationdeleteTemplate.go +++ b/api/ozone/communicationdeleteTemplate.go @@ -7,7 +7,7 @@ package ozone import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // CommunicationDeleteTemplate_Input is the input argument to a tools.ozone.communication.deleteTemplate call. @@ -16,8 +16,8 @@ type CommunicationDeleteTemplate_Input struct { } // CommunicationDeleteTemplate calls the XRPC method "tools.ozone.communication.deleteTemplate". -func CommunicationDeleteTemplate(ctx context.Context, c util.LexClient, input *CommunicationDeleteTemplate_Input) error { - if err := c.LexDo(ctx, util.Procedure, "application/json", "tools.ozone.communication.deleteTemplate", nil, input, nil); err != nil { +func CommunicationDeleteTemplate(ctx context.Context, c lexutil.LexClient, input *CommunicationDeleteTemplate_Input) error { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "tools.ozone.communication.deleteTemplate", nil, input, nil); err != nil { return err } diff --git a/api/ozone/communicationlistTemplates.go b/api/ozone/communicationlistTemplates.go index c3f55c6a..d95aa301 100644 --- a/api/ozone/communicationlistTemplates.go +++ b/api/ozone/communicationlistTemplates.go @@ -7,7 +7,7 @@ package ozone import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // CommunicationListTemplates_Output is the output of a tools.ozone.communication.listTemplates call. @@ -16,9 +16,9 @@ type CommunicationListTemplates_Output struct { } // CommunicationListTemplates calls the XRPC method "tools.ozone.communication.listTemplates". -func CommunicationListTemplates(ctx context.Context, c util.LexClient) (*CommunicationListTemplates_Output, error) { +func CommunicationListTemplates(ctx context.Context, c lexutil.LexClient) (*CommunicationListTemplates_Output, error) { var out CommunicationListTemplates_Output - if err := c.LexDo(ctx, util.Query, "", "tools.ozone.communication.listTemplates", nil, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "tools.ozone.communication.listTemplates", nil, nil, &out); err != nil { return nil, err } diff --git a/api/ozone/communicationupdateTemplate.go b/api/ozone/communicationupdateTemplate.go index 84f10c70..bded5a72 100644 --- a/api/ozone/communicationupdateTemplate.go +++ b/api/ozone/communicationupdateTemplate.go @@ -7,7 +7,7 @@ package ozone import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // CommunicationUpdateTemplate_Input is the input argument to a tools.ozone.communication.updateTemplate call. @@ -28,9 +28,9 @@ type CommunicationUpdateTemplate_Input struct { } // CommunicationUpdateTemplate calls the XRPC method "tools.ozone.communication.updateTemplate". -func CommunicationUpdateTemplate(ctx context.Context, c util.LexClient, input *CommunicationUpdateTemplate_Input) (*CommunicationDefs_TemplateView, error) { +func CommunicationUpdateTemplate(ctx context.Context, c lexutil.LexClient, input *CommunicationUpdateTemplate_Input) (*CommunicationDefs_TemplateView, error) { var out CommunicationDefs_TemplateView - if err := c.LexDo(ctx, util.Procedure, "application/json", "tools.ozone.communication.updateTemplate", nil, input, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "tools.ozone.communication.updateTemplate", nil, input, &out); err != nil { return nil, err } diff --git a/api/ozone/hostinggetAccountHistory.go b/api/ozone/hostinggetAccountHistory.go index f877fd94..9180eeb2 100644 --- a/api/ozone/hostinggetAccountHistory.go +++ b/api/ozone/hostinggetAccountHistory.go @@ -9,7 +9,7 @@ import ( "encoding/json" "fmt" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // HostingGetAccountHistory_AccountCreated is a "accountCreated" in the tools.ozone.hosting.getAccountHistory schema. @@ -71,7 +71,7 @@ func (t *HostingGetAccountHistory_Event_Details) MarshalJSON() ([]byte, error) { } func (t *HostingGetAccountHistory_Event_Details) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -92,7 +92,6 @@ func (t *HostingGetAccountHistory_Event_Details) UnmarshalJSON(b []byte) error { case "tools.ozone.hosting.getAccountHistory#handleUpdated": t.HostingGetAccountHistory_HandleUpdated = new(HostingGetAccountHistory_HandleUpdated) return json.Unmarshal(b, t.HostingGetAccountHistory_HandleUpdated) - default: return nil } @@ -116,7 +115,7 @@ type HostingGetAccountHistory_PasswordUpdated struct { } // HostingGetAccountHistory calls the XRPC method "tools.ozone.hosting.getAccountHistory". -func HostingGetAccountHistory(ctx context.Context, c util.LexClient, cursor string, did string, events []string, limit int64) (*HostingGetAccountHistory_Output, error) { +func HostingGetAccountHistory(ctx context.Context, c lexutil.LexClient, cursor string, did string, events []string, limit int64) (*HostingGetAccountHistory_Output, error) { var out HostingGetAccountHistory_Output params := map[string]interface{}{} @@ -130,7 +129,7 @@ func HostingGetAccountHistory(ctx context.Context, c util.LexClient, cursor stri if limit != 0 { params["limit"] = limit } - if err := c.LexDo(ctx, util.Query, "", "tools.ozone.hosting.getAccountHistory", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "tools.ozone.hosting.getAccountHistory", params, nil, &out); err != nil { return nil, err } diff --git a/api/ozone/moderationcancelScheduledActions.go b/api/ozone/moderationcancelScheduledActions.go index 13ae1486..fdc04153 100644 --- a/api/ozone/moderationcancelScheduledActions.go +++ b/api/ozone/moderationcancelScheduledActions.go @@ -7,7 +7,7 @@ package ozone import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ModerationCancelScheduledActions_CancellationResults is a "cancellationResults" in the tools.ozone.moderation.cancelScheduledActions schema. @@ -34,9 +34,9 @@ type ModerationCancelScheduledActions_Input struct { } // ModerationCancelScheduledActions calls the XRPC method "tools.ozone.moderation.cancelScheduledActions". -func ModerationCancelScheduledActions(ctx context.Context, c util.LexClient, input *ModerationCancelScheduledActions_Input) (*ModerationCancelScheduledActions_CancellationResults, error) { +func ModerationCancelScheduledActions(ctx context.Context, c lexutil.LexClient, input *ModerationCancelScheduledActions_Input) (*ModerationCancelScheduledActions_CancellationResults, error) { var out ModerationCancelScheduledActions_CancellationResults - if err := c.LexDo(ctx, util.Procedure, "application/json", "tools.ozone.moderation.cancelScheduledActions", nil, input, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "tools.ozone.moderation.cancelScheduledActions", nil, input, &out); err != nil { return nil, err } diff --git a/api/ozone/moderationdefs.go b/api/ozone/moderationdefs.go index 848be3fd..24b5f024 100644 --- a/api/ozone/moderationdefs.go +++ b/api/ozone/moderationdefs.go @@ -8,9 +8,9 @@ import ( "encoding/json" "fmt" - comatprototypes "github.com/bluesky-social/indigo/api/atproto" - chatbskytypes "github.com/bluesky-social/indigo/api/chat" - "github.com/bluesky-social/indigo/lex/util" + comatproto "github.com/bluesky-social/indigo/api/atproto" + chatbsky "github.com/bluesky-social/indigo/api/chat" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ModerationDefs_AccountEvent is a "accountEvent" in the tools.ozone.moderation.defs schema. @@ -112,7 +112,7 @@ func (t *ModerationDefs_BlobView_Details) MarshalJSON() ([]byte, error) { } func (t *ModerationDefs_BlobView_Details) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -124,7 +124,6 @@ func (t *ModerationDefs_BlobView_Details) UnmarshalJSON(b []byte) error { case "tools.ozone.moderation.defs#videoDetails": t.ModerationDefs_VideoDetails = new(ModerationDefs_VideoDetails) return json.Unmarshal(b, t.ModerationDefs_VideoDetails) - default: return nil } @@ -469,7 +468,7 @@ func (t *ModerationDefs_ModEventViewDetail_Event) MarshalJSON() ([]byte, error) } func (t *ModerationDefs_ModEventViewDetail_Event) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -547,7 +546,6 @@ func (t *ModerationDefs_ModEventViewDetail_Event) UnmarshalJSON(b []byte) error case "tools.ozone.moderation.defs#cancelScheduledTakedownEvent": t.ModerationDefs_CancelScheduledTakedownEvent = new(ModerationDefs_CancelScheduledTakedownEvent) return json.Unmarshal(b, t.ModerationDefs_CancelScheduledTakedownEvent) - default: return nil } @@ -581,7 +579,7 @@ func (t *ModerationDefs_ModEventViewDetail_Subject) MarshalJSON() ([]byte, error } func (t *ModerationDefs_ModEventViewDetail_Subject) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -599,7 +597,6 @@ func (t *ModerationDefs_ModEventViewDetail_Subject) UnmarshalJSON(b []byte) erro case "tools.ozone.moderation.defs#recordViewNotFound": t.ModerationDefs_RecordViewNotFound = new(ModerationDefs_RecordViewNotFound) return json.Unmarshal(b, t.ModerationDefs_RecordViewNotFound) - default: return nil } @@ -733,7 +730,7 @@ func (t *ModerationDefs_ModEventView_Event) MarshalJSON() ([]byte, error) { } func (t *ModerationDefs_ModEventView_Event) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -811,16 +808,15 @@ func (t *ModerationDefs_ModEventView_Event) UnmarshalJSON(b []byte) error { case "tools.ozone.moderation.defs#cancelScheduledTakedownEvent": t.ModerationDefs_CancelScheduledTakedownEvent = new(ModerationDefs_CancelScheduledTakedownEvent) return json.Unmarshal(b, t.ModerationDefs_CancelScheduledTakedownEvent) - default: return nil } } type ModerationDefs_ModEventView_Subject struct { - AdminDefs_RepoRef *comatprototypes.AdminDefs_RepoRef - RepoStrongRef *comatprototypes.RepoStrongRef - ConvoDefs_MessageRef *chatbskytypes.ConvoDefs_MessageRef + AdminDefs_RepoRef *comatproto.AdminDefs_RepoRef + RepoStrongRef *comatproto.RepoStrongRef + ConvoDefs_MessageRef *chatbsky.ConvoDefs_MessageRef } func (t *ModerationDefs_ModEventView_Subject) MarshalJSON() ([]byte, error) { @@ -840,22 +836,21 @@ func (t *ModerationDefs_ModEventView_Subject) MarshalJSON() ([]byte, error) { } func (t *ModerationDefs_ModEventView_Subject) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } switch typ { case "com.atproto.admin.defs#repoRef": - t.AdminDefs_RepoRef = new(comatprototypes.AdminDefs_RepoRef) + t.AdminDefs_RepoRef = new(comatproto.AdminDefs_RepoRef) return json.Unmarshal(b, t.AdminDefs_RepoRef) case "com.atproto.repo.strongRef": - t.RepoStrongRef = new(comatprototypes.RepoStrongRef) + t.RepoStrongRef = new(comatproto.RepoStrongRef) return json.Unmarshal(b, t.RepoStrongRef) case "chat.bsky.convo.defs#messageRef": - t.ConvoDefs_MessageRef = new(chatbskytypes.ConvoDefs_MessageRef) + t.ConvoDefs_MessageRef = new(chatbsky.ConvoDefs_MessageRef) return json.Unmarshal(b, t.ConvoDefs_MessageRef) - default: return nil } @@ -903,27 +898,27 @@ type ModerationDefs_RecordHosting struct { // ModerationDefs_RecordView is a "recordView" in the tools.ozone.moderation.defs schema. type ModerationDefs_RecordView struct { - LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#recordView"` - BlobCids []string `json:"blobCids" cborgen:"blobCids"` - Cid string `json:"cid" cborgen:"cid"` - IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` - Moderation *ModerationDefs_Moderation `json:"moderation" cborgen:"moderation"` - Repo *ModerationDefs_RepoView `json:"repo" cborgen:"repo"` - Uri string `json:"uri" cborgen:"uri"` - Value *util.LexiconTypeDecoder `json:"value" cborgen:"value"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#recordView"` + BlobCids []string `json:"blobCids" cborgen:"blobCids"` + Cid string `json:"cid" cborgen:"cid"` + IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` + Moderation *ModerationDefs_Moderation `json:"moderation" cborgen:"moderation"` + Repo *ModerationDefs_RepoView `json:"repo" cborgen:"repo"` + Uri string `json:"uri" cborgen:"uri"` + Value *lexutil.LexiconTypeDecoder `json:"value" cborgen:"value"` } // ModerationDefs_RecordViewDetail is a "recordViewDetail" in the tools.ozone.moderation.defs schema. type ModerationDefs_RecordViewDetail struct { - LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#recordViewDetail"` - Blobs []*ModerationDefs_BlobView `json:"blobs" cborgen:"blobs"` - Cid string `json:"cid" cborgen:"cid"` - IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` - Labels []*comatprototypes.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` - Moderation *ModerationDefs_ModerationDetail `json:"moderation" cborgen:"moderation"` - Repo *ModerationDefs_RepoView `json:"repo" cborgen:"repo"` - Uri string `json:"uri" cborgen:"uri"` - Value *util.LexiconTypeDecoder `json:"value" cborgen:"value"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#recordViewDetail"` + Blobs []*ModerationDefs_BlobView `json:"blobs" cborgen:"blobs"` + Cid string `json:"cid" cborgen:"cid"` + IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` + Labels []*comatproto.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` + Moderation *ModerationDefs_ModerationDetail `json:"moderation" cborgen:"moderation"` + Repo *ModerationDefs_RepoView `json:"repo" cborgen:"repo"` + Uri string `json:"uri" cborgen:"uri"` + Value *lexutil.LexiconTypeDecoder `json:"value" cborgen:"value"` } // ModerationDefs_RecordViewNotFound is a "recordViewNotFound" in the tools.ozone.moderation.defs schema. @@ -956,37 +951,37 @@ type ModerationDefs_RecordsStats struct { // ModerationDefs_RepoView is a "repoView" in the tools.ozone.moderation.defs schema. type ModerationDefs_RepoView struct { - LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#repoView"` - DeactivatedAt *string `json:"deactivatedAt,omitempty" cborgen:"deactivatedAt,omitempty"` - Did string `json:"did" cborgen:"did"` - Email *string `json:"email,omitempty" cborgen:"email,omitempty"` - Handle string `json:"handle" cborgen:"handle"` - IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` - InviteNote *string `json:"inviteNote,omitempty" cborgen:"inviteNote,omitempty"` - InvitedBy *comatprototypes.ServerDefs_InviteCode `json:"invitedBy,omitempty" cborgen:"invitedBy,omitempty"` - InvitesDisabled *bool `json:"invitesDisabled,omitempty" cborgen:"invitesDisabled,omitempty"` - Moderation *ModerationDefs_Moderation `json:"moderation" cborgen:"moderation"` - RelatedRecords []*util.LexiconTypeDecoder `json:"relatedRecords" cborgen:"relatedRecords"` - ThreatSignatures []*comatprototypes.AdminDefs_ThreatSignature `json:"threatSignatures,omitempty" cborgen:"threatSignatures,omitempty"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#repoView"` + DeactivatedAt *string `json:"deactivatedAt,omitempty" cborgen:"deactivatedAt,omitempty"` + Did string `json:"did" cborgen:"did"` + Email *string `json:"email,omitempty" cborgen:"email,omitempty"` + Handle string `json:"handle" cborgen:"handle"` + IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` + InviteNote *string `json:"inviteNote,omitempty" cborgen:"inviteNote,omitempty"` + InvitedBy *comatproto.ServerDefs_InviteCode `json:"invitedBy,omitempty" cborgen:"invitedBy,omitempty"` + InvitesDisabled *bool `json:"invitesDisabled,omitempty" cborgen:"invitesDisabled,omitempty"` + Moderation *ModerationDefs_Moderation `json:"moderation" cborgen:"moderation"` + RelatedRecords []*lexutil.LexiconTypeDecoder `json:"relatedRecords" cborgen:"relatedRecords"` + ThreatSignatures []*comatproto.AdminDefs_ThreatSignature `json:"threatSignatures,omitempty" cborgen:"threatSignatures,omitempty"` } // ModerationDefs_RepoViewDetail is a "repoViewDetail" in the tools.ozone.moderation.defs schema. type ModerationDefs_RepoViewDetail struct { - LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#repoViewDetail"` - DeactivatedAt *string `json:"deactivatedAt,omitempty" cborgen:"deactivatedAt,omitempty"` - Did string `json:"did" cborgen:"did"` - Email *string `json:"email,omitempty" cborgen:"email,omitempty"` - EmailConfirmedAt *string `json:"emailConfirmedAt,omitempty" cborgen:"emailConfirmedAt,omitempty"` - Handle string `json:"handle" cborgen:"handle"` - IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` - InviteNote *string `json:"inviteNote,omitempty" cborgen:"inviteNote,omitempty"` - InvitedBy *comatprototypes.ServerDefs_InviteCode `json:"invitedBy,omitempty" cborgen:"invitedBy,omitempty"` - Invites []*comatprototypes.ServerDefs_InviteCode `json:"invites,omitempty" cborgen:"invites,omitempty"` - InvitesDisabled *bool `json:"invitesDisabled,omitempty" cborgen:"invitesDisabled,omitempty"` - Labels []*comatprototypes.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` - Moderation *ModerationDefs_ModerationDetail `json:"moderation" cborgen:"moderation"` - RelatedRecords []*util.LexiconTypeDecoder `json:"relatedRecords" cborgen:"relatedRecords"` - ThreatSignatures []*comatprototypes.AdminDefs_ThreatSignature `json:"threatSignatures,omitempty" cborgen:"threatSignatures,omitempty"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#repoViewDetail"` + DeactivatedAt *string `json:"deactivatedAt,omitempty" cborgen:"deactivatedAt,omitempty"` + Did string `json:"did" cborgen:"did"` + Email *string `json:"email,omitempty" cborgen:"email,omitempty"` + EmailConfirmedAt *string `json:"emailConfirmedAt,omitempty" cborgen:"emailConfirmedAt,omitempty"` + Handle string `json:"handle" cborgen:"handle"` + IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` + InviteNote *string `json:"inviteNote,omitempty" cborgen:"inviteNote,omitempty"` + InvitedBy *comatproto.ServerDefs_InviteCode `json:"invitedBy,omitempty" cborgen:"invitedBy,omitempty"` + Invites []*comatproto.ServerDefs_InviteCode `json:"invites,omitempty" cborgen:"invites,omitempty"` + InvitesDisabled *bool `json:"invitesDisabled,omitempty" cborgen:"invitesDisabled,omitempty"` + Labels []*comatproto.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` + Moderation *ModerationDefs_ModerationDetail `json:"moderation" cborgen:"moderation"` + RelatedRecords []*lexutil.LexiconTypeDecoder `json:"relatedRecords" cborgen:"relatedRecords"` + ThreatSignatures []*comatproto.AdminDefs_ThreatSignature `json:"threatSignatures,omitempty" cborgen:"threatSignatures,omitempty"` } // ModerationDefs_RepoViewNotFound is a "repoViewNotFound" in the tools.ozone.moderation.defs schema. @@ -1049,7 +1044,7 @@ type ModerationDefs_ScheduledActionView struct { // did: Subject DID for the action Did string `json:"did" cborgen:"did"` // eventData: Serialized event object that will be propagated to the event when performed - EventData *util.LexiconTypeDecoder `json:"eventData,omitempty" cborgen:"eventData,omitempty"` + EventData *lexutil.LexiconTypeDecoder `json:"eventData,omitempty" cborgen:"eventData,omitempty"` // executeAfter: Earliest time to execute the action (for randomized scheduling) ExecuteAfter *string `json:"executeAfter,omitempty" cborgen:"executeAfter,omitempty"` // executeAt: Exact time to execute the action @@ -1128,7 +1123,7 @@ func (t *ModerationDefs_SubjectStatusView_Hosting) MarshalJSON() ([]byte, error) } func (t *ModerationDefs_SubjectStatusView_Hosting) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -1140,16 +1135,15 @@ func (t *ModerationDefs_SubjectStatusView_Hosting) UnmarshalJSON(b []byte) error case "tools.ozone.moderation.defs#recordHosting": t.ModerationDefs_RecordHosting = new(ModerationDefs_RecordHosting) return json.Unmarshal(b, t.ModerationDefs_RecordHosting) - default: return nil } } type ModerationDefs_SubjectStatusView_Subject struct { - AdminDefs_RepoRef *comatprototypes.AdminDefs_RepoRef - RepoStrongRef *comatprototypes.RepoStrongRef - ConvoDefs_MessageRef *chatbskytypes.ConvoDefs_MessageRef + AdminDefs_RepoRef *comatproto.AdminDefs_RepoRef + RepoStrongRef *comatproto.RepoStrongRef + ConvoDefs_MessageRef *chatbsky.ConvoDefs_MessageRef } func (t *ModerationDefs_SubjectStatusView_Subject) MarshalJSON() ([]byte, error) { @@ -1169,22 +1163,21 @@ func (t *ModerationDefs_SubjectStatusView_Subject) MarshalJSON() ([]byte, error) } func (t *ModerationDefs_SubjectStatusView_Subject) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } switch typ { case "com.atproto.admin.defs#repoRef": - t.AdminDefs_RepoRef = new(comatprototypes.AdminDefs_RepoRef) + t.AdminDefs_RepoRef = new(comatproto.AdminDefs_RepoRef) return json.Unmarshal(b, t.AdminDefs_RepoRef) case "com.atproto.repo.strongRef": - t.RepoStrongRef = new(comatprototypes.RepoStrongRef) + t.RepoStrongRef = new(comatproto.RepoStrongRef) return json.Unmarshal(b, t.RepoStrongRef) case "chat.bsky.convo.defs#messageRef": - t.ConvoDefs_MessageRef = new(chatbskytypes.ConvoDefs_MessageRef) + t.ConvoDefs_MessageRef = new(chatbsky.ConvoDefs_MessageRef) return json.Unmarshal(b, t.ConvoDefs_MessageRef) - default: return nil } @@ -1194,7 +1187,7 @@ func (t *ModerationDefs_SubjectStatusView_Subject) UnmarshalJSON(b []byte) error // // Detailed view of a subject. For record subjects, the author's repo and profile will be returned. type ModerationDefs_SubjectView struct { - Profile *util.LexiconTypeDecoder `json:"profile,omitempty" cborgen:"profile,omitempty"` + Profile *lexutil.LexiconTypeDecoder `json:"profile,omitempty" cborgen:"profile,omitempty"` Record *ModerationDefs_RecordViewDetail `json:"record,omitempty" cborgen:"record,omitempty"` Repo *ModerationDefs_RepoViewDetail `json:"repo,omitempty" cborgen:"repo,omitempty"` Status *ModerationDefs_SubjectStatusView `json:"status,omitempty" cborgen:"status,omitempty"` diff --git a/api/ozone/moderationemitEvent.go b/api/ozone/moderationemitEvent.go index dbe64463..38556ed5 100644 --- a/api/ozone/moderationemitEvent.go +++ b/api/ozone/moderationemitEvent.go @@ -9,8 +9,8 @@ import ( "encoding/json" "fmt" - comatprototypes "github.com/bluesky-social/indigo/api/atproto" - "github.com/bluesky-social/indigo/lex/util" + comatproto "github.com/bluesky-social/indigo/api/atproto" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ModerationEmitEvent_Input is the input argument to a tools.ozone.moderation.emitEvent call. @@ -152,7 +152,7 @@ func (t *ModerationEmitEvent_Input_Event) MarshalJSON() ([]byte, error) { } func (t *ModerationEmitEvent_Input_Event) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -230,15 +230,14 @@ func (t *ModerationEmitEvent_Input_Event) UnmarshalJSON(b []byte) error { case "tools.ozone.moderation.defs#cancelScheduledTakedownEvent": t.ModerationDefs_CancelScheduledTakedownEvent = new(ModerationDefs_CancelScheduledTakedownEvent) return json.Unmarshal(b, t.ModerationDefs_CancelScheduledTakedownEvent) - default: return nil } } type ModerationEmitEvent_Input_Subject struct { - AdminDefs_RepoRef *comatprototypes.AdminDefs_RepoRef - RepoStrongRef *comatprototypes.RepoStrongRef + AdminDefs_RepoRef *comatproto.AdminDefs_RepoRef + RepoStrongRef *comatproto.RepoStrongRef } func (t *ModerationEmitEvent_Input_Subject) MarshalJSON() ([]byte, error) { @@ -254,28 +253,27 @@ func (t *ModerationEmitEvent_Input_Subject) MarshalJSON() ([]byte, error) { } func (t *ModerationEmitEvent_Input_Subject) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } switch typ { case "com.atproto.admin.defs#repoRef": - t.AdminDefs_RepoRef = new(comatprototypes.AdminDefs_RepoRef) + t.AdminDefs_RepoRef = new(comatproto.AdminDefs_RepoRef) return json.Unmarshal(b, t.AdminDefs_RepoRef) case "com.atproto.repo.strongRef": - t.RepoStrongRef = new(comatprototypes.RepoStrongRef) + t.RepoStrongRef = new(comatproto.RepoStrongRef) return json.Unmarshal(b, t.RepoStrongRef) - default: return nil } } // ModerationEmitEvent calls the XRPC method "tools.ozone.moderation.emitEvent". -func ModerationEmitEvent(ctx context.Context, c util.LexClient, input *ModerationEmitEvent_Input) (*ModerationDefs_ModEventView, error) { +func ModerationEmitEvent(ctx context.Context, c lexutil.LexClient, input *ModerationEmitEvent_Input) (*ModerationDefs_ModEventView, error) { var out ModerationDefs_ModEventView - if err := c.LexDo(ctx, util.Procedure, "application/json", "tools.ozone.moderation.emitEvent", nil, input, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "tools.ozone.moderation.emitEvent", nil, input, &out); err != nil { return nil, err } diff --git a/api/ozone/moderationgetAccountTimeline.go b/api/ozone/moderationgetAccountTimeline.go index 98ee1309..3e86c3c5 100644 --- a/api/ozone/moderationgetAccountTimeline.go +++ b/api/ozone/moderationgetAccountTimeline.go @@ -7,7 +7,7 @@ package ozone import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ModerationGetAccountTimeline_Output is the output of a tools.ozone.moderation.getAccountTimeline call. @@ -29,12 +29,12 @@ type ModerationGetAccountTimeline_TimelineItemSummary struct { } // ModerationGetAccountTimeline calls the XRPC method "tools.ozone.moderation.getAccountTimeline". -func ModerationGetAccountTimeline(ctx context.Context, c util.LexClient, did string) (*ModerationGetAccountTimeline_Output, error) { +func ModerationGetAccountTimeline(ctx context.Context, c lexutil.LexClient, did string) (*ModerationGetAccountTimeline_Output, error) { var out ModerationGetAccountTimeline_Output params := map[string]interface{}{} params["did"] = did - if err := c.LexDo(ctx, util.Query, "", "tools.ozone.moderation.getAccountTimeline", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "tools.ozone.moderation.getAccountTimeline", params, nil, &out); err != nil { return nil, err } diff --git a/api/ozone/moderationgetEvent.go b/api/ozone/moderationgetEvent.go index 40744dd5..c9ed3a6f 100644 --- a/api/ozone/moderationgetEvent.go +++ b/api/ozone/moderationgetEvent.go @@ -7,16 +7,16 @@ package ozone import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ModerationGetEvent calls the XRPC method "tools.ozone.moderation.getEvent". -func ModerationGetEvent(ctx context.Context, c util.LexClient, id int64) (*ModerationDefs_ModEventViewDetail, error) { +func ModerationGetEvent(ctx context.Context, c lexutil.LexClient, id int64) (*ModerationDefs_ModEventViewDetail, error) { var out ModerationDefs_ModEventViewDetail params := map[string]interface{}{} params["id"] = id - if err := c.LexDo(ctx, util.Query, "", "tools.ozone.moderation.getEvent", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "tools.ozone.moderation.getEvent", params, nil, &out); err != nil { return nil, err } diff --git a/api/ozone/moderationgetRecord.go b/api/ozone/moderationgetRecord.go index 35a65b8e..3dc38735 100644 --- a/api/ozone/moderationgetRecord.go +++ b/api/ozone/moderationgetRecord.go @@ -7,11 +7,11 @@ package ozone import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ModerationGetRecord calls the XRPC method "tools.ozone.moderation.getRecord". -func ModerationGetRecord(ctx context.Context, c util.LexClient, cid string, uri string) (*ModerationDefs_RecordViewDetail, error) { +func ModerationGetRecord(ctx context.Context, c lexutil.LexClient, cid string, uri string) (*ModerationDefs_RecordViewDetail, error) { var out ModerationDefs_RecordViewDetail params := map[string]interface{}{} @@ -19,7 +19,7 @@ func ModerationGetRecord(ctx context.Context, c util.LexClient, cid string, uri params["cid"] = cid } params["uri"] = uri - if err := c.LexDo(ctx, util.Query, "", "tools.ozone.moderation.getRecord", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "tools.ozone.moderation.getRecord", params, nil, &out); err != nil { return nil, err } diff --git a/api/ozone/moderationgetRecords.go b/api/ozone/moderationgetRecords.go index af02c1ce..79db2885 100644 --- a/api/ozone/moderationgetRecords.go +++ b/api/ozone/moderationgetRecords.go @@ -9,7 +9,7 @@ import ( "encoding/json" "fmt" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ModerationGetRecords_Output is the output of a tools.ozone.moderation.getRecords call. @@ -35,7 +35,7 @@ func (t *ModerationGetRecords_Output_Records_Elem) MarshalJSON() ([]byte, error) } func (t *ModerationGetRecords_Output_Records_Elem) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -47,19 +47,18 @@ func (t *ModerationGetRecords_Output_Records_Elem) UnmarshalJSON(b []byte) error case "tools.ozone.moderation.defs#recordViewNotFound": t.ModerationDefs_RecordViewNotFound = new(ModerationDefs_RecordViewNotFound) return json.Unmarshal(b, t.ModerationDefs_RecordViewNotFound) - default: return nil } } // ModerationGetRecords calls the XRPC method "tools.ozone.moderation.getRecords". -func ModerationGetRecords(ctx context.Context, c util.LexClient, uris []string) (*ModerationGetRecords_Output, error) { +func ModerationGetRecords(ctx context.Context, c lexutil.LexClient, uris []string) (*ModerationGetRecords_Output, error) { var out ModerationGetRecords_Output params := map[string]interface{}{} params["uris"] = uris - if err := c.LexDo(ctx, util.Query, "", "tools.ozone.moderation.getRecords", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "tools.ozone.moderation.getRecords", params, nil, &out); err != nil { return nil, err } diff --git a/api/ozone/moderationgetRepo.go b/api/ozone/moderationgetRepo.go index 1cb76dd3..77148ee8 100644 --- a/api/ozone/moderationgetRepo.go +++ b/api/ozone/moderationgetRepo.go @@ -7,16 +7,16 @@ package ozone import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ModerationGetRepo calls the XRPC method "tools.ozone.moderation.getRepo". -func ModerationGetRepo(ctx context.Context, c util.LexClient, did string) (*ModerationDefs_RepoViewDetail, error) { +func ModerationGetRepo(ctx context.Context, c lexutil.LexClient, did string) (*ModerationDefs_RepoViewDetail, error) { var out ModerationDefs_RepoViewDetail params := map[string]interface{}{} params["did"] = did - if err := c.LexDo(ctx, util.Query, "", "tools.ozone.moderation.getRepo", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "tools.ozone.moderation.getRepo", params, nil, &out); err != nil { return nil, err } diff --git a/api/ozone/moderationgetReporterStats.go b/api/ozone/moderationgetReporterStats.go index 9910b6be..79693509 100644 --- a/api/ozone/moderationgetReporterStats.go +++ b/api/ozone/moderationgetReporterStats.go @@ -7,7 +7,7 @@ package ozone import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ModerationGetReporterStats_Output is the output of a tools.ozone.moderation.getReporterStats call. @@ -16,12 +16,12 @@ type ModerationGetReporterStats_Output struct { } // ModerationGetReporterStats calls the XRPC method "tools.ozone.moderation.getReporterStats". -func ModerationGetReporterStats(ctx context.Context, c util.LexClient, dids []string) (*ModerationGetReporterStats_Output, error) { +func ModerationGetReporterStats(ctx context.Context, c lexutil.LexClient, dids []string) (*ModerationGetReporterStats_Output, error) { var out ModerationGetReporterStats_Output params := map[string]interface{}{} params["dids"] = dids - if err := c.LexDo(ctx, util.Query, "", "tools.ozone.moderation.getReporterStats", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "tools.ozone.moderation.getReporterStats", params, nil, &out); err != nil { return nil, err } diff --git a/api/ozone/moderationgetRepos.go b/api/ozone/moderationgetRepos.go index 63813320..d96f7e2d 100644 --- a/api/ozone/moderationgetRepos.go +++ b/api/ozone/moderationgetRepos.go @@ -9,7 +9,7 @@ import ( "encoding/json" "fmt" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ModerationGetRepos_Output is the output of a tools.ozone.moderation.getRepos call. @@ -35,7 +35,7 @@ func (t *ModerationGetRepos_Output_Repos_Elem) MarshalJSON() ([]byte, error) { } func (t *ModerationGetRepos_Output_Repos_Elem) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -47,19 +47,18 @@ func (t *ModerationGetRepos_Output_Repos_Elem) UnmarshalJSON(b []byte) error { case "tools.ozone.moderation.defs#repoViewNotFound": t.ModerationDefs_RepoViewNotFound = new(ModerationDefs_RepoViewNotFound) return json.Unmarshal(b, t.ModerationDefs_RepoViewNotFound) - default: return nil } } // ModerationGetRepos calls the XRPC method "tools.ozone.moderation.getRepos". -func ModerationGetRepos(ctx context.Context, c util.LexClient, dids []string) (*ModerationGetRepos_Output, error) { +func ModerationGetRepos(ctx context.Context, c lexutil.LexClient, dids []string) (*ModerationGetRepos_Output, error) { var out ModerationGetRepos_Output params := map[string]interface{}{} params["dids"] = dids - if err := c.LexDo(ctx, util.Query, "", "tools.ozone.moderation.getRepos", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "tools.ozone.moderation.getRepos", params, nil, &out); err != nil { return nil, err } diff --git a/api/ozone/moderationgetSubjects.go b/api/ozone/moderationgetSubjects.go index 0ffb42d7..c739d6cf 100644 --- a/api/ozone/moderationgetSubjects.go +++ b/api/ozone/moderationgetSubjects.go @@ -7,7 +7,7 @@ package ozone import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ModerationGetSubjects_Output is the output of a tools.ozone.moderation.getSubjects call. @@ -16,12 +16,12 @@ type ModerationGetSubjects_Output struct { } // ModerationGetSubjects calls the XRPC method "tools.ozone.moderation.getSubjects". -func ModerationGetSubjects(ctx context.Context, c util.LexClient, subjects []string) (*ModerationGetSubjects_Output, error) { +func ModerationGetSubjects(ctx context.Context, c lexutil.LexClient, subjects []string) (*ModerationGetSubjects_Output, error) { var out ModerationGetSubjects_Output params := map[string]interface{}{} params["subjects"] = subjects - if err := c.LexDo(ctx, util.Query, "", "tools.ozone.moderation.getSubjects", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "tools.ozone.moderation.getSubjects", params, nil, &out); err != nil { return nil, err } diff --git a/api/ozone/moderationlistScheduledActions.go b/api/ozone/moderationlistScheduledActions.go index bbb49207..6fb6276e 100644 --- a/api/ozone/moderationlistScheduledActions.go +++ b/api/ozone/moderationlistScheduledActions.go @@ -7,7 +7,7 @@ package ozone import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ModerationListScheduledActions_Input is the input argument to a tools.ozone.moderation.listScheduledActions call. @@ -34,9 +34,9 @@ type ModerationListScheduledActions_Output struct { } // ModerationListScheduledActions calls the XRPC method "tools.ozone.moderation.listScheduledActions". -func ModerationListScheduledActions(ctx context.Context, c util.LexClient, input *ModerationListScheduledActions_Input) (*ModerationListScheduledActions_Output, error) { +func ModerationListScheduledActions(ctx context.Context, c lexutil.LexClient, input *ModerationListScheduledActions_Input) (*ModerationListScheduledActions_Output, error) { var out ModerationListScheduledActions_Output - if err := c.LexDo(ctx, util.Procedure, "application/json", "tools.ozone.moderation.listScheduledActions", nil, input, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "tools.ozone.moderation.listScheduledActions", nil, input, &out); err != nil { return nil, err } diff --git a/api/ozone/moderationqueryEvents.go b/api/ozone/moderationqueryEvents.go index e90630c6..9adfdd26 100644 --- a/api/ozone/moderationqueryEvents.go +++ b/api/ozone/moderationqueryEvents.go @@ -7,7 +7,7 @@ package ozone import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ModerationQueryEvents_Output is the output of a tools.ozone.moderation.queryEvents call. @@ -34,7 +34,7 @@ type ModerationQueryEvents_Output struct { // sortDirection: Sort direction for the events. Defaults to descending order of created at timestamp. // subjectType: If specified, only events where the subject is of the given type (account or record) will be returned. When this is set to 'account' the 'collections' parameter will be ignored. When includeAllUserRecords or subject is set, this will be ignored. // types: The types of events (fully qualified string in the format of tools.ozone.moderation.defs#modEvent) to filter by. If not specified, all events are returned. -func ModerationQueryEvents(ctx context.Context, c util.LexClient, addedLabels []string, addedTags []string, ageAssuranceState string, batchId string, collections []string, comment string, createdAfter string, createdBefore string, createdBy string, cursor string, hasComment bool, includeAllUserRecords bool, limit int64, modTool []string, policies []string, removedLabels []string, removedTags []string, reportTypes []string, sortDirection string, subject string, subjectType string, types []string) (*ModerationQueryEvents_Output, error) { +func ModerationQueryEvents(ctx context.Context, c lexutil.LexClient, addedLabels []string, addedTags []string, ageAssuranceState string, batchId string, collections []string, comment string, createdAfter string, createdBefore string, createdBy string, cursor string, hasComment bool, includeAllUserRecords bool, limit int64, modTool []string, policies []string, removedLabels []string, removedTags []string, reportTypes []string, sortDirection string, subject string, subjectType string, types []string) (*ModerationQueryEvents_Output, error) { var out ModerationQueryEvents_Output params := map[string]interface{}{} @@ -104,7 +104,7 @@ func ModerationQueryEvents(ctx context.Context, c util.LexClient, addedLabels [] if len(types) != 0 { params["types"] = types } - if err := c.LexDo(ctx, util.Query, "", "tools.ozone.moderation.queryEvents", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "tools.ozone.moderation.queryEvents", params, nil, &out); err != nil { return nil, err } diff --git a/api/ozone/moderationqueryStatuses.go b/api/ozone/moderationqueryStatuses.go index e115d324..47b63d55 100644 --- a/api/ozone/moderationqueryStatuses.go +++ b/api/ozone/moderationqueryStatuses.go @@ -7,7 +7,7 @@ package ozone import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ModerationQueryStatuses_Output is the output of a tools.ozone.moderation.queryStatuses call. @@ -46,7 +46,7 @@ type ModerationQueryStatuses_Output struct { // subject: The subject to get the status for. // subjectType: If specified, subjects of the given type (account or record) will be returned. When this is set to 'account' the 'collections' parameter will be ignored. When includeAllUserRecords or subject is set, this will be ignored. // takendown: Get subjects that were taken down -func ModerationQueryStatuses(ctx context.Context, c util.LexClient, ageAssuranceState string, appealed bool, collections []string, comment string, cursor string, excludeTags []string, hostingDeletedAfter string, hostingDeletedBefore string, hostingStatuses []string, hostingUpdatedAfter string, hostingUpdatedBefore string, ignoreSubjects []string, includeAllUserRecords bool, includeMuted bool, lastReviewedBy string, limit int64, minAccountSuspendCount int64, minPriorityScore int64, minReportedRecordsCount int64, minTakendownRecordsCount int64, onlyMuted bool, queueCount int64, queueIndex int64, queueSeed string, reportedAfter string, reportedBefore string, reviewState string, reviewedAfter string, reviewedBefore string, sortDirection string, sortField string, subject string, subjectType string, tags []string, takendown bool) (*ModerationQueryStatuses_Output, error) { +func ModerationQueryStatuses(ctx context.Context, c lexutil.LexClient, ageAssuranceState string, appealed bool, collections []string, comment string, cursor string, excludeTags []string, hostingDeletedAfter string, hostingDeletedBefore string, hostingStatuses []string, hostingUpdatedAfter string, hostingUpdatedBefore string, ignoreSubjects []string, includeAllUserRecords bool, includeMuted bool, lastReviewedBy string, limit int64, minAccountSuspendCount int64, minPriorityScore int64, minReportedRecordsCount int64, minTakendownRecordsCount int64, onlyMuted bool, queueCount int64, queueIndex int64, queueSeed string, reportedAfter string, reportedBefore string, reviewState string, reviewedAfter string, reviewedBefore string, sortDirection string, sortField string, subject string, subjectType string, tags []string, takendown bool) (*ModerationQueryStatuses_Output, error) { var out ModerationQueryStatuses_Output params := map[string]interface{}{} @@ -155,7 +155,7 @@ func ModerationQueryStatuses(ctx context.Context, c util.LexClient, ageAssurance if takendown { params["takendown"] = takendown } - if err := c.LexDo(ctx, util.Query, "", "tools.ozone.moderation.queryStatuses", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "tools.ozone.moderation.queryStatuses", params, nil, &out); err != nil { return nil, err } diff --git a/api/ozone/moderationscheduleAction.go b/api/ozone/moderationscheduleAction.go index 6aa411a0..2edd18d7 100644 --- a/api/ozone/moderationscheduleAction.go +++ b/api/ozone/moderationscheduleAction.go @@ -9,7 +9,7 @@ import ( "encoding/json" "fmt" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ModerationScheduleAction_FailedScheduling is a "failedScheduling" in the tools.ozone.moderation.scheduleAction schema. @@ -43,7 +43,7 @@ func (t *ModerationScheduleAction_Input_Action) MarshalJSON() ([]byte, error) { } func (t *ModerationScheduleAction_Input_Action) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -52,7 +52,6 @@ func (t *ModerationScheduleAction_Input_Action) UnmarshalJSON(b []byte) error { case "tools.ozone.moderation.scheduleAction#takedown": t.ModerationScheduleAction_Takedown = new(ModerationScheduleAction_Takedown) return json.Unmarshal(b, t.ModerationScheduleAction_Takedown) - default: return nil } @@ -91,9 +90,9 @@ type ModerationScheduleAction_Takedown struct { } // ModerationScheduleAction calls the XRPC method "tools.ozone.moderation.scheduleAction". -func ModerationScheduleAction(ctx context.Context, c util.LexClient, input *ModerationScheduleAction_Input) (*ModerationScheduleAction_ScheduledActionResults, error) { +func ModerationScheduleAction(ctx context.Context, c lexutil.LexClient, input *ModerationScheduleAction_Input) (*ModerationScheduleAction_ScheduledActionResults, error) { var out ModerationScheduleAction_ScheduledActionResults - if err := c.LexDo(ctx, util.Procedure, "application/json", "tools.ozone.moderation.scheduleAction", nil, input, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "tools.ozone.moderation.scheduleAction", nil, input, &out); err != nil { return nil, err } diff --git a/api/ozone/moderationsearchRepos.go b/api/ozone/moderationsearchRepos.go index 9a0e767c..184926b4 100644 --- a/api/ozone/moderationsearchRepos.go +++ b/api/ozone/moderationsearchRepos.go @@ -7,7 +7,7 @@ package ozone import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ModerationSearchRepos_Output is the output of a tools.ozone.moderation.searchRepos call. @@ -19,7 +19,7 @@ type ModerationSearchRepos_Output struct { // ModerationSearchRepos calls the XRPC method "tools.ozone.moderation.searchRepos". // // term: DEPRECATED: use 'q' instead -func ModerationSearchRepos(ctx context.Context, c util.LexClient, cursor string, limit int64, q string, term string) (*ModerationSearchRepos_Output, error) { +func ModerationSearchRepos(ctx context.Context, c lexutil.LexClient, cursor string, limit int64, q string, term string) (*ModerationSearchRepos_Output, error) { var out ModerationSearchRepos_Output params := map[string]interface{}{} @@ -35,7 +35,7 @@ func ModerationSearchRepos(ctx context.Context, c util.LexClient, cursor string, if term != "" { params["term"] = term } - if err := c.LexDo(ctx, util.Query, "", "tools.ozone.moderation.searchRepos", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "tools.ozone.moderation.searchRepos", params, nil, &out); err != nil { return nil, err } diff --git a/api/ozone/safelinkaddRule.go b/api/ozone/safelinkaddRule.go index edb23c2e..ecfb8138 100644 --- a/api/ozone/safelinkaddRule.go +++ b/api/ozone/safelinkaddRule.go @@ -7,7 +7,7 @@ package ozone import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // SafelinkAddRule_Input is the input argument to a tools.ozone.safelink.addRule call. @@ -24,9 +24,9 @@ type SafelinkAddRule_Input struct { } // SafelinkAddRule calls the XRPC method "tools.ozone.safelink.addRule". -func SafelinkAddRule(ctx context.Context, c util.LexClient, input *SafelinkAddRule_Input) (*SafelinkDefs_Event, error) { +func SafelinkAddRule(ctx context.Context, c lexutil.LexClient, input *SafelinkAddRule_Input) (*SafelinkDefs_Event, error) { var out SafelinkDefs_Event - if err := c.LexDo(ctx, util.Procedure, "application/json", "tools.ozone.safelink.addRule", nil, input, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "tools.ozone.safelink.addRule", nil, input, &out); err != nil { return nil, err } diff --git a/api/ozone/safelinkqueryEvents.go b/api/ozone/safelinkqueryEvents.go index 927e8363..8fdd149d 100644 --- a/api/ozone/safelinkqueryEvents.go +++ b/api/ozone/safelinkqueryEvents.go @@ -7,7 +7,7 @@ package ozone import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // SafelinkQueryEvents_Input is the input argument to a tools.ozone.safelink.queryEvents call. @@ -32,9 +32,9 @@ type SafelinkQueryEvents_Output struct { } // SafelinkQueryEvents calls the XRPC method "tools.ozone.safelink.queryEvents". -func SafelinkQueryEvents(ctx context.Context, c util.LexClient, input *SafelinkQueryEvents_Input) (*SafelinkQueryEvents_Output, error) { +func SafelinkQueryEvents(ctx context.Context, c lexutil.LexClient, input *SafelinkQueryEvents_Input) (*SafelinkQueryEvents_Output, error) { var out SafelinkQueryEvents_Output - if err := c.LexDo(ctx, util.Procedure, "application/json", "tools.ozone.safelink.queryEvents", nil, input, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "tools.ozone.safelink.queryEvents", nil, input, &out); err != nil { return nil, err } diff --git a/api/ozone/safelinkqueryRules.go b/api/ozone/safelinkqueryRules.go index c38ac2a0..9360b0e3 100644 --- a/api/ozone/safelinkqueryRules.go +++ b/api/ozone/safelinkqueryRules.go @@ -7,7 +7,7 @@ package ozone import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // SafelinkQueryRules_Input is the input argument to a tools.ozone.safelink.queryRules call. @@ -38,9 +38,9 @@ type SafelinkQueryRules_Output struct { } // SafelinkQueryRules calls the XRPC method "tools.ozone.safelink.queryRules". -func SafelinkQueryRules(ctx context.Context, c util.LexClient, input *SafelinkQueryRules_Input) (*SafelinkQueryRules_Output, error) { +func SafelinkQueryRules(ctx context.Context, c lexutil.LexClient, input *SafelinkQueryRules_Input) (*SafelinkQueryRules_Output, error) { var out SafelinkQueryRules_Output - if err := c.LexDo(ctx, util.Procedure, "application/json", "tools.ozone.safelink.queryRules", nil, input, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "tools.ozone.safelink.queryRules", nil, input, &out); err != nil { return nil, err } diff --git a/api/ozone/safelinkremoveRule.go b/api/ozone/safelinkremoveRule.go index aabdc983..92a13a43 100644 --- a/api/ozone/safelinkremoveRule.go +++ b/api/ozone/safelinkremoveRule.go @@ -7,7 +7,7 @@ package ozone import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // SafelinkRemoveRule_Input is the input argument to a tools.ozone.safelink.removeRule call. @@ -22,9 +22,9 @@ type SafelinkRemoveRule_Input struct { } // SafelinkRemoveRule calls the XRPC method "tools.ozone.safelink.removeRule". -func SafelinkRemoveRule(ctx context.Context, c util.LexClient, input *SafelinkRemoveRule_Input) (*SafelinkDefs_Event, error) { +func SafelinkRemoveRule(ctx context.Context, c lexutil.LexClient, input *SafelinkRemoveRule_Input) (*SafelinkDefs_Event, error) { var out SafelinkDefs_Event - if err := c.LexDo(ctx, util.Procedure, "application/json", "tools.ozone.safelink.removeRule", nil, input, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "tools.ozone.safelink.removeRule", nil, input, &out); err != nil { return nil, err } diff --git a/api/ozone/safelinkupdateRule.go b/api/ozone/safelinkupdateRule.go index 689711bb..ada1c7ce 100644 --- a/api/ozone/safelinkupdateRule.go +++ b/api/ozone/safelinkupdateRule.go @@ -7,7 +7,7 @@ package ozone import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // SafelinkUpdateRule_Input is the input argument to a tools.ozone.safelink.updateRule call. @@ -24,9 +24,9 @@ type SafelinkUpdateRule_Input struct { } // SafelinkUpdateRule calls the XRPC method "tools.ozone.safelink.updateRule". -func SafelinkUpdateRule(ctx context.Context, c util.LexClient, input *SafelinkUpdateRule_Input) (*SafelinkDefs_Event, error) { +func SafelinkUpdateRule(ctx context.Context, c lexutil.LexClient, input *SafelinkUpdateRule_Input) (*SafelinkDefs_Event, error) { var out SafelinkDefs_Event - if err := c.LexDo(ctx, util.Procedure, "application/json", "tools.ozone.safelink.updateRule", nil, input, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "tools.ozone.safelink.updateRule", nil, input, &out); err != nil { return nil, err } diff --git a/api/ozone/servergetConfig.go b/api/ozone/servergetConfig.go index 0dde0865..b6c03b2b 100644 --- a/api/ozone/servergetConfig.go +++ b/api/ozone/servergetConfig.go @@ -7,7 +7,7 @@ package ozone import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // ServerGetConfig_Output is the output of a tools.ozone.server.getConfig call. @@ -32,9 +32,9 @@ type ServerGetConfig_ViewerConfig struct { } // ServerGetConfig calls the XRPC method "tools.ozone.server.getConfig". -func ServerGetConfig(ctx context.Context, c util.LexClient) (*ServerGetConfig_Output, error) { +func ServerGetConfig(ctx context.Context, c lexutil.LexClient) (*ServerGetConfig_Output, error) { var out ServerGetConfig_Output - if err := c.LexDo(ctx, util.Query, "", "tools.ozone.server.getConfig", nil, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "tools.ozone.server.getConfig", nil, nil, &out); err != nil { return nil, err } diff --git a/api/ozone/setaddValues.go b/api/ozone/setaddValues.go index 9c79838e..2b59ea0b 100644 --- a/api/ozone/setaddValues.go +++ b/api/ozone/setaddValues.go @@ -7,7 +7,7 @@ package ozone import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // SetAddValues_Input is the input argument to a tools.ozone.set.addValues call. @@ -19,8 +19,8 @@ type SetAddValues_Input struct { } // SetAddValues calls the XRPC method "tools.ozone.set.addValues". -func SetAddValues(ctx context.Context, c util.LexClient, input *SetAddValues_Input) error { - if err := c.LexDo(ctx, util.Procedure, "application/json", "tools.ozone.set.addValues", nil, input, nil); err != nil { +func SetAddValues(ctx context.Context, c lexutil.LexClient, input *SetAddValues_Input) error { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "tools.ozone.set.addValues", nil, input, nil); err != nil { return err } diff --git a/api/ozone/setdeleteSet.go b/api/ozone/setdeleteSet.go index 54da08a8..d48f6e50 100644 --- a/api/ozone/setdeleteSet.go +++ b/api/ozone/setdeleteSet.go @@ -7,7 +7,7 @@ package ozone import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // SetDeleteSet_Input is the input argument to a tools.ozone.set.deleteSet call. @@ -21,9 +21,9 @@ type SetDeleteSet_Output struct { } // SetDeleteSet calls the XRPC method "tools.ozone.set.deleteSet". -func SetDeleteSet(ctx context.Context, c util.LexClient, input *SetDeleteSet_Input) (*SetDeleteSet_Output, error) { +func SetDeleteSet(ctx context.Context, c lexutil.LexClient, input *SetDeleteSet_Input) (*SetDeleteSet_Output, error) { var out SetDeleteSet_Output - if err := c.LexDo(ctx, util.Procedure, "application/json", "tools.ozone.set.deleteSet", nil, input, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "tools.ozone.set.deleteSet", nil, input, &out); err != nil { return nil, err } diff --git a/api/ozone/setdeleteValues.go b/api/ozone/setdeleteValues.go index c69b8415..96cc1f35 100644 --- a/api/ozone/setdeleteValues.go +++ b/api/ozone/setdeleteValues.go @@ -7,7 +7,7 @@ package ozone import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // SetDeleteValues_Input is the input argument to a tools.ozone.set.deleteValues call. @@ -19,8 +19,8 @@ type SetDeleteValues_Input struct { } // SetDeleteValues calls the XRPC method "tools.ozone.set.deleteValues". -func SetDeleteValues(ctx context.Context, c util.LexClient, input *SetDeleteValues_Input) error { - if err := c.LexDo(ctx, util.Procedure, "application/json", "tools.ozone.set.deleteValues", nil, input, nil); err != nil { +func SetDeleteValues(ctx context.Context, c lexutil.LexClient, input *SetDeleteValues_Input) error { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "tools.ozone.set.deleteValues", nil, input, nil); err != nil { return err } diff --git a/api/ozone/setgetValues.go b/api/ozone/setgetValues.go index dd8f11be..eb5bcc2e 100644 --- a/api/ozone/setgetValues.go +++ b/api/ozone/setgetValues.go @@ -7,7 +7,7 @@ package ozone import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // SetGetValues_Output is the output of a tools.ozone.set.getValues call. @@ -18,7 +18,7 @@ type SetGetValues_Output struct { } // SetGetValues calls the XRPC method "tools.ozone.set.getValues". -func SetGetValues(ctx context.Context, c util.LexClient, cursor string, limit int64, name string) (*SetGetValues_Output, error) { +func SetGetValues(ctx context.Context, c lexutil.LexClient, cursor string, limit int64, name string) (*SetGetValues_Output, error) { var out SetGetValues_Output params := map[string]interface{}{} @@ -29,7 +29,7 @@ func SetGetValues(ctx context.Context, c util.LexClient, cursor string, limit in params["limit"] = limit } params["name"] = name - if err := c.LexDo(ctx, util.Query, "", "tools.ozone.set.getValues", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "tools.ozone.set.getValues", params, nil, &out); err != nil { return nil, err } diff --git a/api/ozone/setquerySets.go b/api/ozone/setquerySets.go index 4283ca04..d853cc3e 100644 --- a/api/ozone/setquerySets.go +++ b/api/ozone/setquerySets.go @@ -7,7 +7,7 @@ package ozone import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // SetQuerySets_Output is the output of a tools.ozone.set.querySets call. @@ -19,7 +19,7 @@ type SetQuerySets_Output struct { // SetQuerySets calls the XRPC method "tools.ozone.set.querySets". // // sortDirection: Defaults to ascending order of name field. -func SetQuerySets(ctx context.Context, c util.LexClient, cursor string, limit int64, namePrefix string, sortBy string, sortDirection string) (*SetQuerySets_Output, error) { +func SetQuerySets(ctx context.Context, c lexutil.LexClient, cursor string, limit int64, namePrefix string, sortBy string, sortDirection string) (*SetQuerySets_Output, error) { var out SetQuerySets_Output params := map[string]interface{}{} @@ -38,7 +38,7 @@ func SetQuerySets(ctx context.Context, c util.LexClient, cursor string, limit in if sortDirection != "" { params["sortDirection"] = sortDirection } - if err := c.LexDo(ctx, util.Query, "", "tools.ozone.set.querySets", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "tools.ozone.set.querySets", params, nil, &out); err != nil { return nil, err } diff --git a/api/ozone/settingdefs.go b/api/ozone/settingdefs.go index c0c52cb5..f0b4e5d4 100644 --- a/api/ozone/settingdefs.go +++ b/api/ozone/settingdefs.go @@ -5,19 +5,19 @@ package ozone import ( - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // SettingDefs_Option is a "option" in the tools.ozone.setting.defs schema. type SettingDefs_Option struct { - CreatedAt *string `json:"createdAt,omitempty" cborgen:"createdAt,omitempty"` - CreatedBy string `json:"createdBy" cborgen:"createdBy"` - Description *string `json:"description,omitempty" cborgen:"description,omitempty"` - Did string `json:"did" cborgen:"did"` - Key string `json:"key" cborgen:"key"` - LastUpdatedBy string `json:"lastUpdatedBy" cborgen:"lastUpdatedBy"` - ManagerRole *string `json:"managerRole,omitempty" cborgen:"managerRole,omitempty"` - Scope string `json:"scope" cborgen:"scope"` - UpdatedAt *string `json:"updatedAt,omitempty" cborgen:"updatedAt,omitempty"` - Value *util.LexiconTypeDecoder `json:"value" cborgen:"value"` + CreatedAt *string `json:"createdAt,omitempty" cborgen:"createdAt,omitempty"` + CreatedBy string `json:"createdBy" cborgen:"createdBy"` + Description *string `json:"description,omitempty" cborgen:"description,omitempty"` + Did string `json:"did" cborgen:"did"` + Key string `json:"key" cborgen:"key"` + LastUpdatedBy string `json:"lastUpdatedBy" cborgen:"lastUpdatedBy"` + ManagerRole *string `json:"managerRole,omitempty" cborgen:"managerRole,omitempty"` + Scope string `json:"scope" cborgen:"scope"` + UpdatedAt *string `json:"updatedAt,omitempty" cborgen:"updatedAt,omitempty"` + Value *lexutil.LexiconTypeDecoder `json:"value" cborgen:"value"` } diff --git a/api/ozone/settinglistOptions.go b/api/ozone/settinglistOptions.go index 3c73c350..07e5801e 100644 --- a/api/ozone/settinglistOptions.go +++ b/api/ozone/settinglistOptions.go @@ -7,7 +7,7 @@ package ozone import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // SettingListOptions_Output is the output of a tools.ozone.setting.listOptions call. @@ -20,7 +20,7 @@ type SettingListOptions_Output struct { // // keys: Filter for only the specified keys. Ignored if prefix is provided // prefix: Filter keys by prefix -func SettingListOptions(ctx context.Context, c util.LexClient, cursor string, keys []string, limit int64, prefix string, scope string) (*SettingListOptions_Output, error) { +func SettingListOptions(ctx context.Context, c lexutil.LexClient, cursor string, keys []string, limit int64, prefix string, scope string) (*SettingListOptions_Output, error) { var out SettingListOptions_Output params := map[string]interface{}{} @@ -39,7 +39,7 @@ func SettingListOptions(ctx context.Context, c util.LexClient, cursor string, ke if scope != "" { params["scope"] = scope } - if err := c.LexDo(ctx, util.Query, "", "tools.ozone.setting.listOptions", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "tools.ozone.setting.listOptions", params, nil, &out); err != nil { return nil, err } diff --git a/api/ozone/settingremoveOptions.go b/api/ozone/settingremoveOptions.go index 8f16b450..81e6ff13 100644 --- a/api/ozone/settingremoveOptions.go +++ b/api/ozone/settingremoveOptions.go @@ -7,7 +7,7 @@ package ozone import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // SettingRemoveOptions_Input is the input argument to a tools.ozone.setting.removeOptions call. @@ -21,9 +21,9 @@ type SettingRemoveOptions_Output struct { } // SettingRemoveOptions calls the XRPC method "tools.ozone.setting.removeOptions". -func SettingRemoveOptions(ctx context.Context, c util.LexClient, input *SettingRemoveOptions_Input) (*SettingRemoveOptions_Output, error) { +func SettingRemoveOptions(ctx context.Context, c lexutil.LexClient, input *SettingRemoveOptions_Input) (*SettingRemoveOptions_Output, error) { var out SettingRemoveOptions_Output - if err := c.LexDo(ctx, util.Procedure, "application/json", "tools.ozone.setting.removeOptions", nil, input, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "tools.ozone.setting.removeOptions", nil, input, &out); err != nil { return nil, err } diff --git a/api/ozone/settingupsertOption.go b/api/ozone/settingupsertOption.go index 7f784b8b..8d12dac9 100644 --- a/api/ozone/settingupsertOption.go +++ b/api/ozone/settingupsertOption.go @@ -7,16 +7,16 @@ package ozone import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // SettingUpsertOption_Input is the input argument to a tools.ozone.setting.upsertOption call. type SettingUpsertOption_Input struct { - Description *string `json:"description,omitempty" cborgen:"description,omitempty"` - Key string `json:"key" cborgen:"key"` - ManagerRole *string `json:"managerRole,omitempty" cborgen:"managerRole,omitempty"` - Scope string `json:"scope" cborgen:"scope"` - Value *util.LexiconTypeDecoder `json:"value" cborgen:"value"` + Description *string `json:"description,omitempty" cborgen:"description,omitempty"` + Key string `json:"key" cborgen:"key"` + ManagerRole *string `json:"managerRole,omitempty" cborgen:"managerRole,omitempty"` + Scope string `json:"scope" cborgen:"scope"` + Value *lexutil.LexiconTypeDecoder `json:"value" cborgen:"value"` } // SettingUpsertOption_Output is the output of a tools.ozone.setting.upsertOption call. @@ -25,9 +25,9 @@ type SettingUpsertOption_Output struct { } // SettingUpsertOption calls the XRPC method "tools.ozone.setting.upsertOption". -func SettingUpsertOption(ctx context.Context, c util.LexClient, input *SettingUpsertOption_Input) (*SettingUpsertOption_Output, error) { +func SettingUpsertOption(ctx context.Context, c lexutil.LexClient, input *SettingUpsertOption_Input) (*SettingUpsertOption_Output, error) { var out SettingUpsertOption_Output - if err := c.LexDo(ctx, util.Procedure, "application/json", "tools.ozone.setting.upsertOption", nil, input, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "tools.ozone.setting.upsertOption", nil, input, &out); err != nil { return nil, err } diff --git a/api/ozone/setupsertSet.go b/api/ozone/setupsertSet.go index c0c76d1e..ccf565ec 100644 --- a/api/ozone/setupsertSet.go +++ b/api/ozone/setupsertSet.go @@ -7,13 +7,13 @@ package ozone import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // SetUpsertSet calls the XRPC method "tools.ozone.set.upsertSet". -func SetUpsertSet(ctx context.Context, c util.LexClient, input *SetDefs_Set) (*SetDefs_SetView, error) { +func SetUpsertSet(ctx context.Context, c lexutil.LexClient, input *SetDefs_Set) (*SetDefs_SetView, error) { var out SetDefs_SetView - if err := c.LexDo(ctx, util.Procedure, "application/json", "tools.ozone.set.upsertSet", nil, input, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "tools.ozone.set.upsertSet", nil, input, &out); err != nil { return nil, err } diff --git a/api/ozone/signaturefindCorrelation.go b/api/ozone/signaturefindCorrelation.go index f16cfb19..9d28ed68 100644 --- a/api/ozone/signaturefindCorrelation.go +++ b/api/ozone/signaturefindCorrelation.go @@ -7,7 +7,7 @@ package ozone import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // SignatureFindCorrelation_Output is the output of a tools.ozone.signature.findCorrelation call. @@ -16,12 +16,12 @@ type SignatureFindCorrelation_Output struct { } // SignatureFindCorrelation calls the XRPC method "tools.ozone.signature.findCorrelation". -func SignatureFindCorrelation(ctx context.Context, c util.LexClient, dids []string) (*SignatureFindCorrelation_Output, error) { +func SignatureFindCorrelation(ctx context.Context, c lexutil.LexClient, dids []string) (*SignatureFindCorrelation_Output, error) { var out SignatureFindCorrelation_Output params := map[string]interface{}{} params["dids"] = dids - if err := c.LexDo(ctx, util.Query, "", "tools.ozone.signature.findCorrelation", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "tools.ozone.signature.findCorrelation", params, nil, &out); err != nil { return nil, err } diff --git a/api/ozone/signaturefindRelatedAccounts.go b/api/ozone/signaturefindRelatedAccounts.go index a32f65c7..7a2e348f 100644 --- a/api/ozone/signaturefindRelatedAccounts.go +++ b/api/ozone/signaturefindRelatedAccounts.go @@ -7,8 +7,8 @@ package ozone import ( "context" - comatprototypes "github.com/bluesky-social/indigo/api/atproto" - "github.com/bluesky-social/indigo/lex/util" + comatproto "github.com/bluesky-social/indigo/api/atproto" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // SignatureFindRelatedAccounts_Output is the output of a tools.ozone.signature.findRelatedAccounts call. @@ -19,12 +19,12 @@ type SignatureFindRelatedAccounts_Output struct { // SignatureFindRelatedAccounts_RelatedAccount is a "relatedAccount" in the tools.ozone.signature.findRelatedAccounts schema. type SignatureFindRelatedAccounts_RelatedAccount struct { - Account *comatprototypes.AdminDefs_AccountView `json:"account" cborgen:"account"` - Similarities []*SignatureDefs_SigDetail `json:"similarities,omitempty" cborgen:"similarities,omitempty"` + Account *comatproto.AdminDefs_AccountView `json:"account" cborgen:"account"` + Similarities []*SignatureDefs_SigDetail `json:"similarities,omitempty" cborgen:"similarities,omitempty"` } // SignatureFindRelatedAccounts calls the XRPC method "tools.ozone.signature.findRelatedAccounts". -func SignatureFindRelatedAccounts(ctx context.Context, c util.LexClient, cursor string, did string, limit int64) (*SignatureFindRelatedAccounts_Output, error) { +func SignatureFindRelatedAccounts(ctx context.Context, c lexutil.LexClient, cursor string, did string, limit int64) (*SignatureFindRelatedAccounts_Output, error) { var out SignatureFindRelatedAccounts_Output params := map[string]interface{}{} @@ -35,7 +35,7 @@ func SignatureFindRelatedAccounts(ctx context.Context, c util.LexClient, cursor if limit != 0 { params["limit"] = limit } - if err := c.LexDo(ctx, util.Query, "", "tools.ozone.signature.findRelatedAccounts", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "tools.ozone.signature.findRelatedAccounts", params, nil, &out); err != nil { return nil, err } diff --git a/api/ozone/signaturesearchAccounts.go b/api/ozone/signaturesearchAccounts.go index c2d88bb8..f41bbae4 100644 --- a/api/ozone/signaturesearchAccounts.go +++ b/api/ozone/signaturesearchAccounts.go @@ -7,18 +7,18 @@ package ozone import ( "context" - comatprototypes "github.com/bluesky-social/indigo/api/atproto" - "github.com/bluesky-social/indigo/lex/util" + comatproto "github.com/bluesky-social/indigo/api/atproto" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // SignatureSearchAccounts_Output is the output of a tools.ozone.signature.searchAccounts call. type SignatureSearchAccounts_Output struct { - Accounts []*comatprototypes.AdminDefs_AccountView `json:"accounts" cborgen:"accounts"` - Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` + Accounts []*comatproto.AdminDefs_AccountView `json:"accounts" cborgen:"accounts"` + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` } // SignatureSearchAccounts calls the XRPC method "tools.ozone.signature.searchAccounts". -func SignatureSearchAccounts(ctx context.Context, c util.LexClient, cursor string, limit int64, values []string) (*SignatureSearchAccounts_Output, error) { +func SignatureSearchAccounts(ctx context.Context, c lexutil.LexClient, cursor string, limit int64, values []string) (*SignatureSearchAccounts_Output, error) { var out SignatureSearchAccounts_Output params := map[string]interface{}{} @@ -29,7 +29,7 @@ func SignatureSearchAccounts(ctx context.Context, c util.LexClient, cursor strin params["limit"] = limit } params["values"] = values - if err := c.LexDo(ctx, util.Query, "", "tools.ozone.signature.searchAccounts", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "tools.ozone.signature.searchAccounts", params, nil, &out); err != nil { return nil, err } diff --git a/api/ozone/teamaddMember.go b/api/ozone/teamaddMember.go index 66e3dca6..bf0e0b68 100644 --- a/api/ozone/teamaddMember.go +++ b/api/ozone/teamaddMember.go @@ -7,7 +7,7 @@ package ozone import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // TeamAddMember_Input is the input argument to a tools.ozone.team.addMember call. @@ -17,9 +17,9 @@ type TeamAddMember_Input struct { } // TeamAddMember calls the XRPC method "tools.ozone.team.addMember". -func TeamAddMember(ctx context.Context, c util.LexClient, input *TeamAddMember_Input) (*TeamDefs_Member, error) { +func TeamAddMember(ctx context.Context, c lexutil.LexClient, input *TeamAddMember_Input) (*TeamDefs_Member, error) { var out TeamDefs_Member - if err := c.LexDo(ctx, util.Procedure, "application/json", "tools.ozone.team.addMember", nil, input, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "tools.ozone.team.addMember", nil, input, &out); err != nil { return nil, err } diff --git a/api/ozone/teamdefs.go b/api/ozone/teamdefs.go index 833ea2b8..5b5f2c09 100644 --- a/api/ozone/teamdefs.go +++ b/api/ozone/teamdefs.go @@ -5,16 +5,16 @@ package ozone import ( - appbskytypes "github.com/bluesky-social/indigo/api/bsky" + appbsky "github.com/bluesky-social/indigo/api/bsky" ) // TeamDefs_Member is a "member" in the tools.ozone.team.defs schema. type TeamDefs_Member struct { - CreatedAt *string `json:"createdAt,omitempty" cborgen:"createdAt,omitempty"` - Did string `json:"did" cborgen:"did"` - Disabled *bool `json:"disabled,omitempty" cborgen:"disabled,omitempty"` - LastUpdatedBy *string `json:"lastUpdatedBy,omitempty" cborgen:"lastUpdatedBy,omitempty"` - Profile *appbskytypes.ActorDefs_ProfileViewDetailed `json:"profile,omitempty" cborgen:"profile,omitempty"` - Role string `json:"role" cborgen:"role"` - UpdatedAt *string `json:"updatedAt,omitempty" cborgen:"updatedAt,omitempty"` + CreatedAt *string `json:"createdAt,omitempty" cborgen:"createdAt,omitempty"` + Did string `json:"did" cborgen:"did"` + Disabled *bool `json:"disabled,omitempty" cborgen:"disabled,omitempty"` + LastUpdatedBy *string `json:"lastUpdatedBy,omitempty" cborgen:"lastUpdatedBy,omitempty"` + Profile *appbsky.ActorDefs_ProfileViewDetailed `json:"profile,omitempty" cborgen:"profile,omitempty"` + Role string `json:"role" cborgen:"role"` + UpdatedAt *string `json:"updatedAt,omitempty" cborgen:"updatedAt,omitempty"` } diff --git a/api/ozone/teamdeleteMember.go b/api/ozone/teamdeleteMember.go index 9885269c..d8ed3211 100644 --- a/api/ozone/teamdeleteMember.go +++ b/api/ozone/teamdeleteMember.go @@ -7,7 +7,7 @@ package ozone import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // TeamDeleteMember_Input is the input argument to a tools.ozone.team.deleteMember call. @@ -16,8 +16,8 @@ type TeamDeleteMember_Input struct { } // TeamDeleteMember calls the XRPC method "tools.ozone.team.deleteMember". -func TeamDeleteMember(ctx context.Context, c util.LexClient, input *TeamDeleteMember_Input) error { - if err := c.LexDo(ctx, util.Procedure, "application/json", "tools.ozone.team.deleteMember", nil, input, nil); err != nil { +func TeamDeleteMember(ctx context.Context, c lexutil.LexClient, input *TeamDeleteMember_Input) error { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "tools.ozone.team.deleteMember", nil, input, nil); err != nil { return err } diff --git a/api/ozone/teamlistMembers.go b/api/ozone/teamlistMembers.go index 59d63d76..7e04bd43 100644 --- a/api/ozone/teamlistMembers.go +++ b/api/ozone/teamlistMembers.go @@ -7,7 +7,7 @@ package ozone import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // TeamListMembers_Output is the output of a tools.ozone.team.listMembers call. @@ -17,7 +17,7 @@ type TeamListMembers_Output struct { } // TeamListMembers calls the XRPC method "tools.ozone.team.listMembers". -func TeamListMembers(ctx context.Context, c util.LexClient, cursor string, disabled bool, limit int64, q string, roles []string) (*TeamListMembers_Output, error) { +func TeamListMembers(ctx context.Context, c lexutil.LexClient, cursor string, disabled bool, limit int64, q string, roles []string) (*TeamListMembers_Output, error) { var out TeamListMembers_Output params := map[string]interface{}{} @@ -36,7 +36,7 @@ func TeamListMembers(ctx context.Context, c util.LexClient, cursor string, disab if len(roles) != 0 { params["roles"] = roles } - if err := c.LexDo(ctx, util.Query, "", "tools.ozone.team.listMembers", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "tools.ozone.team.listMembers", params, nil, &out); err != nil { return nil, err } diff --git a/api/ozone/teamupdateMember.go b/api/ozone/teamupdateMember.go index 1e623fd2..1672cfc7 100644 --- a/api/ozone/teamupdateMember.go +++ b/api/ozone/teamupdateMember.go @@ -7,7 +7,7 @@ package ozone import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // TeamUpdateMember_Input is the input argument to a tools.ozone.team.updateMember call. @@ -18,9 +18,9 @@ type TeamUpdateMember_Input struct { } // TeamUpdateMember calls the XRPC method "tools.ozone.team.updateMember". -func TeamUpdateMember(ctx context.Context, c util.LexClient, input *TeamUpdateMember_Input) (*TeamDefs_Member, error) { +func TeamUpdateMember(ctx context.Context, c lexutil.LexClient, input *TeamUpdateMember_Input) (*TeamDefs_Member, error) { var out TeamDefs_Member - if err := c.LexDo(ctx, util.Procedure, "application/json", "tools.ozone.team.updateMember", nil, input, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "tools.ozone.team.updateMember", nil, input, &out); err != nil { return nil, err } diff --git a/api/ozone/verificationdefs.go b/api/ozone/verificationdefs.go index 4480e5e5..b4154173 100644 --- a/api/ozone/verificationdefs.go +++ b/api/ozone/verificationdefs.go @@ -8,7 +8,7 @@ import ( "encoding/json" "fmt" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // VerificationDefs_VerificationView is a "verificationView" in the tools.ozone.verification.defs schema. @@ -23,7 +23,7 @@ type VerificationDefs_VerificationView struct { Handle string `json:"handle" cborgen:"handle"` // issuer: The user who issued this verification. Issuer string `json:"issuer" cborgen:"issuer"` - IssuerProfile *util.LexiconTypeDecoder `json:"issuerProfile,omitempty" cborgen:"issuerProfile,omitempty"` + IssuerProfile *lexutil.LexiconTypeDecoder `json:"issuerProfile,omitempty" cborgen:"issuerProfile,omitempty"` IssuerRepo *VerificationDefs_VerificationView_IssuerRepo `json:"issuerRepo,omitempty" cborgen:"issuerRepo,omitempty"` // revokeReason: Describes the reason for revocation, also indicating that the verification is no longer valid. RevokeReason *string `json:"revokeReason,omitempty" cborgen:"revokeReason,omitempty"` @@ -33,7 +33,7 @@ type VerificationDefs_VerificationView struct { RevokedBy *string `json:"revokedBy,omitempty" cborgen:"revokedBy,omitempty"` // subject: The subject of the verification. Subject string `json:"subject" cborgen:"subject"` - SubjectProfile *util.LexiconTypeDecoder `json:"subjectProfile,omitempty" cborgen:"subjectProfile,omitempty"` + SubjectProfile *lexutil.LexiconTypeDecoder `json:"subjectProfile,omitempty" cborgen:"subjectProfile,omitempty"` SubjectRepo *VerificationDefs_VerificationView_SubjectRepo `json:"subjectRepo,omitempty" cborgen:"subjectRepo,omitempty"` // uri: The AT-URI of the verification record. Uri string `json:"uri" cborgen:"uri"` @@ -57,7 +57,7 @@ func (t *VerificationDefs_VerificationView_IssuerRepo) MarshalJSON() ([]byte, er } func (t *VerificationDefs_VerificationView_IssuerRepo) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -69,7 +69,6 @@ func (t *VerificationDefs_VerificationView_IssuerRepo) UnmarshalJSON(b []byte) e case "tools.ozone.moderation.defs#repoViewNotFound": t.ModerationDefs_RepoViewNotFound = new(ModerationDefs_RepoViewNotFound) return json.Unmarshal(b, t.ModerationDefs_RepoViewNotFound) - default: return nil } @@ -93,7 +92,7 @@ func (t *VerificationDefs_VerificationView_SubjectRepo) MarshalJSON() ([]byte, e } func (t *VerificationDefs_VerificationView_SubjectRepo) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -105,7 +104,6 @@ func (t *VerificationDefs_VerificationView_SubjectRepo) UnmarshalJSON(b []byte) case "tools.ozone.moderation.defs#repoViewNotFound": t.ModerationDefs_RepoViewNotFound = new(ModerationDefs_RepoViewNotFound) return json.Unmarshal(b, t.ModerationDefs_RepoViewNotFound) - default: return nil } diff --git a/api/ozone/verificationgrantVerifications.go b/api/ozone/verificationgrantVerifications.go index ca9ebb4d..fc4fa67c 100644 --- a/api/ozone/verificationgrantVerifications.go +++ b/api/ozone/verificationgrantVerifications.go @@ -7,7 +7,7 @@ package ozone import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // VerificationGrantVerifications_GrantError is a "grantError" in the tools.ozone.verification.grantVerifications schema. @@ -45,9 +45,9 @@ type VerificationGrantVerifications_VerificationInput struct { } // VerificationGrantVerifications calls the XRPC method "tools.ozone.verification.grantVerifications". -func VerificationGrantVerifications(ctx context.Context, c util.LexClient, input *VerificationGrantVerifications_Input) (*VerificationGrantVerifications_Output, error) { +func VerificationGrantVerifications(ctx context.Context, c lexutil.LexClient, input *VerificationGrantVerifications_Input) (*VerificationGrantVerifications_Output, error) { var out VerificationGrantVerifications_Output - if err := c.LexDo(ctx, util.Procedure, "application/json", "tools.ozone.verification.grantVerifications", nil, input, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "tools.ozone.verification.grantVerifications", nil, input, &out); err != nil { return nil, err } diff --git a/api/ozone/verificationlistVerifications.go b/api/ozone/verificationlistVerifications.go index 9ec346e1..ea8d7909 100644 --- a/api/ozone/verificationlistVerifications.go +++ b/api/ozone/verificationlistVerifications.go @@ -7,7 +7,7 @@ package ozone import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // VerificationListVerifications_Output is the output of a tools.ozone.verification.listVerifications call. @@ -26,7 +26,7 @@ type VerificationListVerifications_Output struct { // limit: Maximum number of results to return // sortDirection: Sort direction for creation date // subjects: Filter to specific verified DIDs -func VerificationListVerifications(ctx context.Context, c util.LexClient, createdAfter string, createdBefore string, cursor string, isRevoked bool, issuers []string, limit int64, sortDirection string, subjects []string) (*VerificationListVerifications_Output, error) { +func VerificationListVerifications(ctx context.Context, c lexutil.LexClient, createdAfter string, createdBefore string, cursor string, isRevoked bool, issuers []string, limit int64, sortDirection string, subjects []string) (*VerificationListVerifications_Output, error) { var out VerificationListVerifications_Output params := map[string]interface{}{} @@ -54,7 +54,7 @@ func VerificationListVerifications(ctx context.Context, c util.LexClient, create if len(subjects) != 0 { params["subjects"] = subjects } - if err := c.LexDo(ctx, util.Query, "", "tools.ozone.verification.listVerifications", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "tools.ozone.verification.listVerifications", params, nil, &out); err != nil { return nil, err } diff --git a/api/ozone/verificationrevokeVerifications.go b/api/ozone/verificationrevokeVerifications.go index a7ce9a87..2ddcd17c 100644 --- a/api/ozone/verificationrevokeVerifications.go +++ b/api/ozone/verificationrevokeVerifications.go @@ -7,7 +7,7 @@ package ozone import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // VerificationRevokeVerifications_Input is the input argument to a tools.ozone.verification.revokeVerifications call. @@ -37,9 +37,9 @@ type VerificationRevokeVerifications_RevokeError struct { } // VerificationRevokeVerifications calls the XRPC method "tools.ozone.verification.revokeVerifications". -func VerificationRevokeVerifications(ctx context.Context, c util.LexClient, input *VerificationRevokeVerifications_Input) (*VerificationRevokeVerifications_Output, error) { +func VerificationRevokeVerifications(ctx context.Context, c lexutil.LexClient, input *VerificationRevokeVerifications_Input) (*VerificationRevokeVerifications_Output, error) { var out VerificationRevokeVerifications_Output - if err := c.LexDo(ctx, util.Procedure, "application/json", "tools.ozone.verification.revokeVerifications", nil, input, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "tools.ozone.verification.revokeVerifications", nil, input, &out); err != nil { return nil, err }