Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
2.2 kB · 57 lines
Go
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758// Code generated by glex; DO NOT EDIT.
// Lexicon schema: app.bsky.graph.verification
package appbsky
import ( "encoding/json" "io"
glex "github.com/streamplace/glex/runtime" cbg "github.com/whyrusleeping/cbor-gen")
func init() { glex.RegisterType("app.bsky.graph.verification", &GraphVerification{})}
// Record declaring a verification relationship between two accounts. Verifications are only considered valid by an app if issued by an account the app considers trusted.type GraphVerification struct { LexiconTypeID string `json:"$type,omitempty"` // createdAt: Date of when the verification was created. CreatedAt string `json:"createdAt"` // displayName: Display name of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current displayName matches the one at the time of verifying. DisplayName string `json:"displayName"` // handle: Handle of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current handle matches the one at the time of verifying. Handle string `json:"handle"` // subject: DID of the subject the verification applies to. Subject string `json:"subject"`}
// RecordTypeID implements glex.Record.func (t *GraphVerification) RecordTypeID() string { return "app.bsky.graph.verification" }
// MarshalJSON stamps the $type field, like MarshalCBOR does. The value// receiver operates on a copy, so the record is never mutated and both// GraphVerification and *GraphVerification marshal with $type.func (t GraphVerification) MarshalJSON() ([]byte, error) { t.LexiconTypeID = "app.bsky.graph.verification" type alias GraphVerification return json.Marshal((alias)(t))}
func (t *GraphVerification) 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 = "app.bsky.graph.verification" return glex.MarshalCBOR(w, &cp)}
func (t *GraphVerification) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}