Documentation ¶
Overview ¶
Package indigo/api/agnositc provides schema-agnostic helpers for fetching records from the network.
These are variants of endpoints in indigo/api/atproto.
Index ¶
- func ActorPutPreferences(ctx context.Context, c *xrpc.Client, input *ActorPutPreferences_Input) error
- func IdentityGetRecommendedDidCredentials(ctx context.Context, c *xrpc.Client) (*json.RawMessage, error)
- func IdentitySubmitPlcOperation(ctx context.Context, c *xrpc.Client, input *IdentitySubmitPlcOperation_Input) error
- type ActorGetPreferences_Output
- type ActorPutPreferences_Input
- type IdentitySignPlcOperation_Input
- type IdentitySignPlcOperation_Output
- type IdentitySubmitPlcOperation_Input
- type RepoApplyWrites_Create
- type RepoApplyWrites_CreateResult
- type RepoApplyWrites_Delete
- type RepoApplyWrites_DeleteResult
- type RepoApplyWrites_Input
- type RepoApplyWrites_Input_Writes_Elem
- type RepoApplyWrites_Output
- type RepoApplyWrites_Output_Results_Elem
- type RepoApplyWrites_Update
- type RepoApplyWrites_UpdateResult
- type RepoCreateRecord_Input
- type RepoCreateRecord_Output
- type RepoDefs_CommitMeta
- type RepoGetRecord_Output
- type RepoListRecords_Output
- type RepoListRecords_Record
- type RepoPutRecord_Input
- type RepoPutRecord_Output
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ActorPutPreferences ¶
func ActorPutPreferences(ctx context.Context, c *xrpc.Client, input *ActorPutPreferences_Input) error
ActorPutPreferences calls the XRPC method "app.bsky.actor.putPreferences".
func IdentityGetRecommendedDidCredentials ¶
func IdentityGetRecommendedDidCredentials(ctx context.Context, c *xrpc.Client) (*json.RawMessage, error)
IdentityGetRecommendedDidCredentials calls the XRPC method "com.atproto.identity.getRecommendedDidCredentials".
func IdentitySubmitPlcOperation ¶
func IdentitySubmitPlcOperation(ctx context.Context, c *xrpc.Client, input *IdentitySubmitPlcOperation_Input) error
IdentitySubmitPlcOperation calls the XRPC method "com.atproto.identity.submitPlcOperation".
Types ¶
type ActorGetPreferences_Output ¶
type ActorGetPreferences_Output struct {
Preferences []map[string]any `json:"preferences" cborgen:"preferences"`
}
ActorGetPreferences_Output is the output of a app.bsky.actor.getPreferences call.
func ActorGetPreferences ¶
ActorGetPreferences calls the XRPC method "app.bsky.actor.getPreferences".
type ActorPutPreferences_Input ¶
type ActorPutPreferences_Input struct {
Preferences []map[string]any `json:"preferences" cborgen:"preferences"`
}
ActorPutPreferences_Input is the input argument to a app.bsky.actor.putPreferences call.
type IdentitySignPlcOperation_Input ¶
type IdentitySignPlcOperation_Input struct { AlsoKnownAs []string `json:"alsoKnownAs,omitempty" cborgen:"alsoKnownAs,omitempty"` RotationKeys []string `json:"rotationKeys,omitempty" cborgen:"rotationKeys,omitempty"` Services *json.RawMessage `json:"services,omitempty" cborgen:"services,omitempty"` // token: A token received through com.atproto.identity.requestPlcOperationSignature Token *string `json:"token,omitempty" cborgen:"token,omitempty"` VerificationMethods *json.RawMessage `json:"verificationMethods,omitempty" cborgen:"verificationMethods,omitempty"` }
IdentitySignPlcOperation_Input is the input argument to a com.atproto.identity.signPlcOperation call.
type IdentitySignPlcOperation_Output ¶
type IdentitySignPlcOperation_Output struct { // operation: A signed DID PLC operation. Operation *json.RawMessage `json:"operation" cborgen:"operation"` }
IdentitySignPlcOperation_Output is the output of a com.atproto.identity.signPlcOperation call.
func IdentitySignPlcOperation ¶
func IdentitySignPlcOperation(ctx context.Context, c *xrpc.Client, input *IdentitySignPlcOperation_Input) (*IdentitySignPlcOperation_Output, error)
IdentitySignPlcOperation calls the XRPC method "com.atproto.identity.signPlcOperation".
type IdentitySubmitPlcOperation_Input ¶
type IdentitySubmitPlcOperation_Input struct {
Operation *json.RawMessage `json:"operation" cborgen:"operation"`
}
IdentitySubmitPlcOperation_Input is the input argument to a com.atproto.identity.submitPlcOperation call.
type RepoApplyWrites_Create ¶
type RepoApplyWrites_Create struct { LexiconTypeID string `json:"$type,const=com.atproto.repo.applyWrites#create" cborgen:"$type,const=com.atproto.repo.applyWrites#create"` Collection string `json:"collection" cborgen:"collection"` Rkey *string `json:"rkey,omitempty" cborgen:"rkey,omitempty"` Value *json.RawMessage `json:"value" cborgen:"value"` }
RepoApplyWrites_Create is a "create" in the com.atproto.repo.applyWrites schema.
Operation which creates a new record.
RECORDTYPE: RepoApplyWrites_Create
type RepoApplyWrites_CreateResult ¶
type RepoApplyWrites_CreateResult struct { LexiconTypeID string `json:"$type,const=com.atproto.repo.applyWrites#createResult" cborgen:"$type,const=com.atproto.repo.applyWrites#createResult"` Cid string `json:"cid" cborgen:"cid"` Uri string `json:"uri" cborgen:"uri"` ValidationStatus *string `json:"validationStatus,omitempty" cborgen:"validationStatus,omitempty"` }
RepoApplyWrites_CreateResult is a "createResult" in the com.atproto.repo.applyWrites schema.
RECORDTYPE: RepoApplyWrites_CreateResult
type RepoApplyWrites_Delete ¶
type RepoApplyWrites_Delete struct { LexiconTypeID string `json:"$type,const=com.atproto.repo.applyWrites#delete" cborgen:"$type,const=com.atproto.repo.applyWrites#delete"` Collection string `json:"collection" cborgen:"collection"` Rkey string `json:"rkey" cborgen:"rkey"` }
RepoApplyWrites_Delete is a "delete" in the com.atproto.repo.applyWrites schema.
Operation which deletes an existing record.
RECORDTYPE: RepoApplyWrites_Delete
type RepoApplyWrites_DeleteResult ¶
type RepoApplyWrites_DeleteResult struct {
LexiconTypeID string `json:"$type,const=com.atproto.repo.applyWrites#deleteResult" cborgen:"$type,const=com.atproto.repo.applyWrites#deleteResult"`
}
RepoApplyWrites_DeleteResult is a "deleteResult" in the com.atproto.repo.applyWrites schema.
RECORDTYPE: RepoApplyWrites_DeleteResult
type RepoApplyWrites_Input ¶
type RepoApplyWrites_Input struct { // repo: The handle or DID of the repo (aka, current account). Repo string `json:"repo" cborgen:"repo"` // swapCommit: If provided, the entire operation will fail if the current repo commit CID does not match this value. Used to prevent conflicting repo mutations. SwapCommit *string `json:"swapCommit,omitempty" cborgen:"swapCommit,omitempty"` // validate: Can be set to 'false' to skip Lexicon schema validation of record data across all operations, 'true' to require it, or leave unset to validate only for known Lexicons. Validate *bool `json:"validate,omitempty" cborgen:"validate,omitempty"` Writes []*RepoApplyWrites_Input_Writes_Elem `json:"writes" cborgen:"writes"` }
RepoApplyWrites_Input is the input argument to a com.atproto.repo.applyWrites call.
type RepoApplyWrites_Input_Writes_Elem ¶
type RepoApplyWrites_Input_Writes_Elem struct { RepoApplyWrites_Create *RepoApplyWrites_Create RepoApplyWrites_Update *RepoApplyWrites_Update RepoApplyWrites_Delete *RepoApplyWrites_Delete }
func (*RepoApplyWrites_Input_Writes_Elem) MarshalJSON ¶
func (t *RepoApplyWrites_Input_Writes_Elem) MarshalJSON() ([]byte, error)
func (*RepoApplyWrites_Input_Writes_Elem) UnmarshalJSON ¶
func (t *RepoApplyWrites_Input_Writes_Elem) UnmarshalJSON(b []byte) error
type RepoApplyWrites_Output ¶
type RepoApplyWrites_Output struct { Commit *RepoDefs_CommitMeta `json:"commit,omitempty" cborgen:"commit,omitempty"` Results []*RepoApplyWrites_Output_Results_Elem `json:"results,omitempty" cborgen:"results,omitempty"` }
RepoApplyWrites_Output is the output of a com.atproto.repo.applyWrites call.
func RepoApplyWrites ¶
func RepoApplyWrites(ctx context.Context, c *xrpc.Client, input *RepoApplyWrites_Input) (*RepoApplyWrites_Output, error)
RepoApplyWrites calls the XRPC method "com.atproto.repo.applyWrites".
type RepoApplyWrites_Output_Results_Elem ¶
type RepoApplyWrites_Output_Results_Elem struct { RepoApplyWrites_CreateResult *RepoApplyWrites_CreateResult RepoApplyWrites_UpdateResult *RepoApplyWrites_UpdateResult RepoApplyWrites_DeleteResult *RepoApplyWrites_DeleteResult }
func (*RepoApplyWrites_Output_Results_Elem) MarshalJSON ¶
func (t *RepoApplyWrites_Output_Results_Elem) MarshalJSON() ([]byte, error)
func (*RepoApplyWrites_Output_Results_Elem) UnmarshalJSON ¶
func (t *RepoApplyWrites_Output_Results_Elem) UnmarshalJSON(b []byte) error
type RepoApplyWrites_Update ¶
type RepoApplyWrites_Update struct { LexiconTypeID string `json:"$type,const=com.atproto.repo.applyWrites#update" cborgen:"$type,const=com.atproto.repo.applyWrites#update"` Collection string `json:"collection" cborgen:"collection"` Rkey string `json:"rkey" cborgen:"rkey"` Value *json.RawMessage `json:"value" cborgen:"value"` }
RepoApplyWrites_Update is a "update" in the com.atproto.repo.applyWrites schema.
Operation which updates an existing record.
RECORDTYPE: RepoApplyWrites_Update
type RepoApplyWrites_UpdateResult ¶
type RepoApplyWrites_UpdateResult struct { LexiconTypeID string `json:"$type,const=com.atproto.repo.applyWrites#updateResult" cborgen:"$type,const=com.atproto.repo.applyWrites#updateResult"` Cid string `json:"cid" cborgen:"cid"` Uri string `json:"uri" cborgen:"uri"` ValidationStatus *string `json:"validationStatus,omitempty" cborgen:"validationStatus,omitempty"` }
RepoApplyWrites_UpdateResult is a "updateResult" in the com.atproto.repo.applyWrites schema.
RECORDTYPE: RepoApplyWrites_UpdateResult
type RepoCreateRecord_Input ¶
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 map[string]any `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. Rkey *string `json:"rkey,omitempty" cborgen:"rkey,omitempty"` // swapCommit: Compare and swap with the previous commit by CID. SwapCommit *string `json:"swapCommit,omitempty" cborgen:"swapCommit,omitempty"` // validate: Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons. Validate *bool `json:"validate,omitempty" cborgen:"validate,omitempty"` }
RepoCreateRecord_Input is the input argument to a com.atproto.repo.createRecord call.
type RepoCreateRecord_Output ¶
type RepoCreateRecord_Output struct { Cid string `json:"cid" cborgen:"cid"` Commit *RepoDefs_CommitMeta `json:"commit,omitempty" cborgen:"commit,omitempty"` Uri string `json:"uri" cborgen:"uri"` ValidationStatus *string `json:"validationStatus,omitempty" cborgen:"validationStatus,omitempty"` }
RepoCreateRecord_Output is the output of a com.atproto.repo.createRecord call.
func RepoCreateRecord ¶
func RepoCreateRecord(ctx context.Context, c *xrpc.Client, input *RepoCreateRecord_Input) (*RepoCreateRecord_Output, error)
RepoCreateRecord calls the XRPC method "com.atproto.repo.createRecord".
type RepoDefs_CommitMeta ¶
type RepoDefs_CommitMeta struct { Cid string `json:"cid" cborgen:"cid"` Rev string `json:"rev" cborgen:"rev"` }
RepoDefs_CommitMeta is a "commitMeta" in the com.atproto.repo.defs schema.
type RepoGetRecord_Output ¶
type RepoGetRecord_Output struct { Cid *string `json:"cid,omitempty" cborgen:"cid,omitempty"` Uri string `json:"uri" cborgen:"uri"` // NOTE: changed from lex decoder to json.RawMessage Value *json.RawMessage `json:"value" cborgen:"value"` }
RepoGetRecord_Output is the output of a com.atproto.repo.getRecord call.
func RepoGetRecord ¶
func RepoGetRecord(ctx context.Context, c *xrpc.Client, cid string, collection string, repo string, rkey string) (*RepoGetRecord_Output, error)
RepoGetRecord calls the XRPC method "com.atproto.repo.getRecord".
cid: The CID of the version of the record. If not specified, then return the most recent version. collection: The NSID of the record collection. repo: The handle or DID of the repo. rkey: The Record Key.
type RepoListRecords_Output ¶
type RepoListRecords_Output struct { Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` Records []*RepoListRecords_Record `json:"records" cborgen:"records"` }
RepoListRecords_Output is the output of a com.atproto.repo.listRecords call.
func RepoListRecords ¶
func RepoListRecords(ctx context.Context, c *xrpc.Client, collection string, cursor string, limit int64, repo string, reverse bool, rkeyEnd string, rkeyStart string) (*RepoListRecords_Output, error)
RepoListRecords calls the XRPC method "com.atproto.repo.listRecords".
collection: The NSID of the record type. 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. rkeyEnd: DEPRECATED: The highest sort-ordered rkey to stop at (exclusive) rkeyStart: DEPRECATED: The lowest sort-ordered rkey to start from (exclusive)
type RepoListRecords_Record ¶
type RepoListRecords_Record struct { Cid string `json:"cid" cborgen:"cid"` Uri string `json:"uri" cborgen:"uri"` // NOTE: changed from lex decoder to json.RawMessage Value *json.RawMessage `json:"value" cborgen:"value"` }
RepoListRecords_Record is a "record" in the com.atproto.repo.listRecords schema.
type RepoPutRecord_Input ¶
type RepoPutRecord_Input struct { // collection: The NSID of the record collection. Collection string `json:"collection" cborgen:"collection"` // record: The record to write. Record map[string]any `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. Rkey string `json:"rkey" cborgen:"rkey"` // swapCommit: Compare and swap with the previous commit by CID. SwapCommit *string `json:"swapCommit,omitempty" cborgen:"swapCommit,omitempty"` // swapRecord: Compare and swap with the previous record by CID. WARNING: nullable and optional field; may cause problems with golang implementation SwapRecord *string `json:"swapRecord" cborgen:"swapRecord"` // validate: Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons. Validate *bool `json:"validate,omitempty" cborgen:"validate,omitempty"` }
RepoPutRecord_Input is the input argument to a com.atproto.repo.putRecord call.
type RepoPutRecord_Output ¶
type RepoPutRecord_Output struct { Cid string `json:"cid" cborgen:"cid"` Commit *RepoDefs_CommitMeta `json:"commit,omitempty" cborgen:"commit,omitempty"` Uri string `json:"uri" cborgen:"uri"` ValidationStatus *string `json:"validationStatus,omitempty" cborgen:"validationStatus,omitempty"` }
RepoPutRecord_Output is the output of a com.atproto.repo.putRecord call.
func RepoPutRecord ¶
func RepoPutRecord(ctx context.Context, c *xrpc.Client, input *RepoPutRecord_Input) (*RepoPutRecord_Output, error)
RepoPutRecord calls the XRPC method "com.atproto.repo.putRecord".