Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
6.6 kB · 179 lines
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180// Code generated by glex; DO NOT EDIT.
// Lexicon schema: com.atproto.label.defs
package comatproto
import ( "io"
glex "github.com/streamplace/glex/runtime" cbg "github.com/whyrusleeping/cbor-gen")
// LabelDefs_Label is a "label" in the com.atproto.label.defs schema.//// Metadata tag on an atproto resource (eg, repo or record).type LabelDefs_Label struct { LexiconTypeID string `json:"$type,omitempty"` // cid: Optionally, CID specifying the specific version of 'uri' resource this label applies to. Cid *string `json:"cid,omitempty"` // cts: Timestamp when this label was created. Cts string `json:"cts"` // exp: Timestamp at which this label expires (no longer applies). Exp *string `json:"exp,omitempty"` // neg: If true, this is a negation label, overwriting a previous label. Neg *bool `json:"neg,omitempty"` // sig: Signature of dag-cbor encoded label. Sig glex.Bytes `json:"sig,omitempty"` // src: DID of the actor who created this label. Src string `json:"src"` // uri: AT URI of the record, repository (account), or other resource that this label applies to. Uri string `json:"uri"` // val: The short string name of the value or type of this label. Val string `json:"val"` // ver: The AT Protocol version of the label object. Ver *int64 `json:"ver,omitempty"`}
// RecordTypeID implements glex.Record.func (t *LabelDefs_Label) RecordTypeID() string { return "com.atproto.label.defs#label" }
func (t *LabelDefs_Label) 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.label.defs#label" return glex.MarshalCBOR(w, &cp)}
func (t *LabelDefs_Label) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// LabelDefs_LabelValueDefinition is a "labelValueDefinition" in the com.atproto.label.defs schema.//// Declares a label value and its expected interpretations and behaviors.type LabelDefs_LabelValueDefinition struct { LexiconTypeID string `json:"$type,omitempty"` // adultOnly: Does the user need to have adult content enabled in order to configure this label? AdultOnly *bool `json:"adultOnly,omitempty"` // blurs: What should this label hide in the UI, if applied? 'content' hides all of the target; 'media' hides the images/video/audio; 'none' hides nothing. Blurs string `json:"blurs"` // defaultSetting: The default setting for this label. DefaultSetting *string `json:"defaultSetting,omitempty"` // identifier: The value of the label being defined. Must only include lowercase ascii and the '-' character ([a-z-]+). Identifier string `json:"identifier"` Locales []LabelDefs_LabelValueDefinitionStrings `json:"locales"` // severity: How should a client visually convey this label? 'inform' means neutral and informational; 'alert' means negative and warning; 'none' means show nothing. Severity string `json:"severity"`}
// RecordTypeID implements glex.Record.func (t *LabelDefs_LabelValueDefinition) RecordTypeID() string { return "com.atproto.label.defs#labelValueDefinition"}
func (t *LabelDefs_LabelValueDefinition) 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.label.defs#labelValueDefinition" return glex.MarshalCBOR(w, &cp)}
func (t *LabelDefs_LabelValueDefinition) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// LabelDefs_LabelValueDefinitionStrings is a "labelValueDefinitionStrings" in the com.atproto.label.defs schema.//// Strings which describe the label in the UI, localized into a specific language.type LabelDefs_LabelValueDefinitionStrings struct { LexiconTypeID string `json:"$type,omitempty"` // description: A longer description of what the label means and why it might be applied. Description string `json:"description"` // lang: The code of the language these strings are written in. Lang string `json:"lang"` // name: A short human-readable name for the label. Name string `json:"name"`}
// RecordTypeID implements glex.Record.func (t *LabelDefs_LabelValueDefinitionStrings) RecordTypeID() string { return "com.atproto.label.defs#labelValueDefinitionStrings"}
func (t *LabelDefs_LabelValueDefinitionStrings) 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.label.defs#labelValueDefinitionStrings" return glex.MarshalCBOR(w, &cp)}
func (t *LabelDefs_LabelValueDefinitionStrings) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// LabelDefs_SelfLabel is a "selfLabel" in the com.atproto.label.defs schema.//// Metadata tag on an atproto record, published by the author within the record. Note that schemas should use #selfLabels, not #selfLabel.type LabelDefs_SelfLabel struct { LexiconTypeID string `json:"$type,omitempty"` // val: The short string name of the value or type of this label. Val string `json:"val"`}
// RecordTypeID implements glex.Record.func (t *LabelDefs_SelfLabel) RecordTypeID() string { return "com.atproto.label.defs#selfLabel" }
func (t *LabelDefs_SelfLabel) 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.label.defs#selfLabel" return glex.MarshalCBOR(w, &cp)}
func (t *LabelDefs_SelfLabel) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// LabelDefs_SelfLabels is a "selfLabels" in the com.atproto.label.defs schema.//// Metadata tags on an atproto record, published by the author within the record.type LabelDefs_SelfLabels struct { LexiconTypeID string `json:"$type,omitempty"` Values []LabelDefs_SelfLabel `json:"values"`}
// RecordTypeID implements glex.Record.func (t *LabelDefs_SelfLabels) RecordTypeID() string { return "com.atproto.label.defs#selfLabels" }
func (t *LabelDefs_SelfLabels) 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.label.defs#selfLabels" return glex.MarshalCBOR(w, &cp)}
func (t *LabelDefs_SelfLabels) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}