// Code generated by glex; DO NOT EDIT. // Lexicon schema: com.atproto.repo.deleteRecord package comatproto import ( "context" "io" glex "github.com/streamplace/glex/runtime" cbg "github.com/whyrusleeping/cbor-gen" ) type RepoDeleteRecord_Input struct { LexiconTypeID string `json:"$type,omitempty"` // collection: The NSID of the record collection. Collection string `json:"collection"` // repo: The handle or DID of the repo (aka, current account). Repo string `json:"repo"` // rkey: The Record Key. Rkey string `json:"rkey"` // swapCommit: Compare and swap with the previous commit by CID. SwapCommit *string `json:"swapCommit,omitempty"` // swapRecord: Compare and swap with the previous record by CID. SwapRecord *string `json:"swapRecord,omitempty"` } // RecordTypeID implements glex.Record. func (t *RepoDeleteRecord_Input) RecordTypeID() string { return "com.atproto.repo.deleteRecord" } func (t *RepoDeleteRecord_Input) MarshalCBOR(w io.Writer) error { if t == nil { _, err := w.Write(cbg.CborNull) return err } // stamp $type on a copy so marshal never mutates the record cp := *t cp.LexiconTypeID = "com.atproto.repo.deleteRecord" return glex.MarshalCBOR(w, &cp) } func (t *RepoDeleteRecord_Input) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t) } type RepoDeleteRecord_Output struct { LexiconTypeID string `json:"$type,omitempty"` Commit *RepoDefs_CommitMeta `json:"commit,omitempty"` } // RecordTypeID implements glex.Record. func (t *RepoDeleteRecord_Output) RecordTypeID() string { return "com.atproto.repo.deleteRecord" } func (t *RepoDeleteRecord_Output) MarshalCBOR(w io.Writer) error { if t == nil { _, err := w.Write(cbg.CborNull) return err } // stamp $type on a copy so marshal never mutates the record cp := *t cp.LexiconTypeID = "com.atproto.repo.deleteRecord" return glex.MarshalCBOR(w, &cp) } func (t *RepoDeleteRecord_Output) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t) } // RepoDeleteRecord calls the XRPC method "com.atproto.repo.deleteRecord". // // Delete a repository record, or ensure it doesn't exist. Requires auth, implemented by PDS. func RepoDeleteRecord(ctx context.Context, c glex.LexClient, input *RepoDeleteRecord_Input) (*RepoDeleteRecord_Output, error) { var out RepoDeleteRecord_Output if err := c.LexDo(ctx, glex.Procedure, "application/json", "com.atproto.repo.deleteRecord", nil, input, &out); err != nil { return nil, err } return &out, nil }