// Code generated by glex; DO NOT EDIT. // Lexicon schema: place.stream.server.defs package placestream import ( "io" glex "github.com/streamplace/glex/runtime" cbg "github.com/whyrusleeping/cbor-gen" ) // ServerDefs_RewriteRule is a "rewriteRule" in the place.stream.server.defs schema. type ServerDefs_RewriteRule struct { LexiconTypeID string `json:"$type,omitempty"` // from: Text to search for and replace. From string `json:"from"` // to: Text to replace with. To string `json:"to"` } // RecordTypeID implements glex.Record. func (t *ServerDefs_RewriteRule) RecordTypeID() string { return "place.stream.server.defs#rewriteRule" } func (t *ServerDefs_RewriteRule) 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 = "place.stream.server.defs#rewriteRule" return glex.MarshalCBOR(w, &cp) } func (t *ServerDefs_RewriteRule) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t) } // ServerDefs_Storage is a "storage" in the place.stream.server.defs schema. // // S3 storage configuration for backups. type ServerDefs_Storage struct { LexiconTypeID string `json:"$type,omitempty"` // isActive: Whether backup storage is currently active. IsActive bool `json:"isActive"` // url: S3 storage URL with masked secret key in format: s3+https://ACCESS_KEY:***@endpoint/bucket Url string `json:"url"` } // RecordTypeID implements glex.Record. func (t *ServerDefs_Storage) RecordTypeID() string { return "place.stream.server.defs#storage" } func (t *ServerDefs_Storage) 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 = "place.stream.server.defs#storage" return glex.MarshalCBOR(w, &cp) } func (t *ServerDefs_Storage) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t) } // ServerDefs_Webhook is a "webhook" in the place.stream.server.defs schema. // // A webhook configuration for receiving Streamplace events. type ServerDefs_Webhook struct { LexiconTypeID string `json:"$type,omitempty"` // active: Whether this webhook is currently active. Active bool `json:"active"` // createdAt: When this webhook was created. CreatedAt string `json:"createdAt"` // description: A description of what this webhook is used for. Description *string `json:"description,omitempty"` // errorCount: Number of consecutive errors for this webhook. ErrorCount *int64 `json:"errorCount,omitempty"` // events: The types of events this webhook should receive. Events []string `json:"events"` // id: Unique identifier for this webhook. Id string `json:"id"` // lastTriggered: When this webhook was last triggered. LastTriggered *string `json:"lastTriggered,omitempty"` // muteWords: Words to filter out from chat messages. Messages containing any of these words will not be forwarded. MuteWords []string `json:"muteWords,omitempty"` // name: A user-friendly name for this webhook. Name *string `json:"name,omitempty"` // prefix: Text to prepend to webhook messages. Prefix *string `json:"prefix,omitempty"` // rewrite: Text replacement rules for webhook messages. Rewrite []ServerDefs_RewriteRule `json:"rewrite,omitempty"` // suffix: Text to append to webhook messages. Suffix *string `json:"suffix,omitempty"` // updatedAt: When this webhook was last updated. UpdatedAt *string `json:"updatedAt,omitempty"` // url: The webhook URL where events will be sent. Url string `json:"url"` } // RecordTypeID implements glex.Record. func (t *ServerDefs_Webhook) RecordTypeID() string { return "place.stream.server.defs#webhook" } func (t *ServerDefs_Webhook) 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 = "place.stream.server.defs#webhook" return glex.MarshalCBOR(w, &cp) } func (t *ServerDefs_Webhook) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t) }