Documentation
¶
Overview ¶
Package gen provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.8.0 DO NOT EDIT.
Index ¶
- type AccountLinkEvent
- type AnswerEventJSONRequestBody
- type AnswerEventParams
- type AnswerInput
- type AnswerShown
- type AnswerShownShownAs
- type BridgeEventJSONRequestBody
- type BridgeEventParams
- type Button
- type ButtonStyle
- type Capabilities
- type CapabilitiesPrivateAnswers
- type CapabilitiesThreadMessages
- type ChannelCheck
- type ChannelId
- type DirectMessageInput
- type DirectMessageSent
- type EditMessageJSONRequestBody
- type ErrorClass
- type Event
- func (t Event) AsAccountLinkEvent() (AccountLinkEvent, error)
- func (t Event) AsMessageDeletedEvent() (MessageDeletedEvent, error)
- func (t Event) AsPressEvent() (PressEvent, error)
- func (t Event) AsThreadMessageEvent() (ThreadMessageEvent, error)
- func (t Event) Discriminator() (string, error)
- func (t *Event) FromAccountLinkEvent(v AccountLinkEvent) error
- func (t *Event) FromMessageDeletedEvent(v MessageDeletedEvent) error
- func (t *Event) FromPressEvent(v PressEvent) error
- func (t *Event) FromThreadMessageEvent(v ThreadMessageEvent) error
- func (t Event) MarshalJSON() ([]byte, error)
- func (t *Event) MergeAccountLinkEvent(v AccountLinkEvent) error
- func (t *Event) MergeMessageDeletedEvent(v MessageDeletedEvent) error
- func (t *Event) MergePressEvent(v PressEvent) error
- func (t *Event) MergeThreadMessageEvent(v ThreadMessageEvent) error
- func (t *Event) UnmarshalJSON(b []byte) error
- func (t Event) ValueByDiscriminator() (interface{}, error)
- type EventBase
- type EventBatch
- type FindUsersParams
- type Forbidden
- type Gone
- type IdempotencyKey
- type Info
- type InfoEventDelivery
- type InfoProtocolVersion
- type InfoUserLookup
- type Invalid
- type Limits
- type Link
- type Mention
- type MessageContent
- type MessageDeletedEvent
- type MessageEdited
- type MessageId
- type MessageInput
- type MessageKind
- type MessagePosted
- type Person
- type PersonList
- type PollEventsParams
- type PostMessageJSONRequestBody
- type PostMessageParams
- type PressEvent
- type Problem
- type ProblemReason
- type ProblemScope
- type RateLimited
- type ReplyInThreadJSONRequestBody
- type ReplyInThreadParams
- type SendDirectMessageJSONRequestBody
- type SendDirectMessageParams
- type Status
- type ThreadMessageEvent
- type ThreadReplyInput
- type ThreadReplyPosted
- type Transient
- type Unauthorized
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountLinkEvent ¶
type AccountLinkEvent struct {
// Id Stable across retries and polls; Muster handles each id once. Printable ASCII without spaces, so that it can travel as the `webhook-id` header.
Id string `json:"id"`
// OccurredAt When it happened in the messenger, or when the bridge learned of it.
OccurredAt time.Time `json:"occurred_at"`
Token string `json:"token"`
Type interface{} `json:"type"`
User Person `json:"user"`
}
AccountLinkEvent defines model for AccountLinkEvent.
type AnswerEventJSONRequestBody ¶
type AnswerEventJSONRequestBody = AnswerInput
AnswerEventJSONRequestBody defines body for AnswerEvent for application/json ContentType.
type AnswerEventParams ¶
type AnswerEventParams struct {
// IdempotencyKey Identifies the request across retries; a repeated key with the same token returns the first result without creating anything again. Keys are scoped per token.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key"`
}
AnswerEventParams defines parameters for AnswerEvent.
type AnswerInput ¶
type AnswerInput struct {
EventId string `json:"event_id"`
// Text Plain text; a pop-up may shorten it.
Text string `json:"text"`
}
AnswerInput defines model for AnswerInput.
type AnswerShown ¶
type AnswerShown struct {
Replayed bool `json:"replayed"`
// ShownAs Where the person sees the answer.
ShownAs AnswerShownShownAs `json:"shown_as"`
}
AnswerShown defines model for AnswerShown.
type AnswerShownShownAs ¶
type AnswerShownShownAs string
AnswerShownShownAs Where the person sees the answer.
const ( AnswerShownShownAsDirect AnswerShownShownAs = "direct" AnswerShownShownAsEphemeral AnswerShownShownAs = "ephemeral" AnswerShownShownAsPopup AnswerShownShownAs = "popup" AnswerShownShownAsThread AnswerShownShownAs = "thread" )
Defines values for AnswerShownShownAs.
func (AnswerShownShownAs) Valid ¶
func (e AnswerShownShownAs) Valid() bool
Valid indicates whether the value is a known member of the AnswerShownShownAs enum.
type BridgeEventJSONRequestBody ¶
type BridgeEventJSONRequestBody = Event
BridgeEventJSONRequestBody defines body for BridgeEvent for application/json ContentType.
type BridgeEventParams ¶
type BridgeEventParams struct {
// WebhookId The event's `id`, kept across retries.
WebhookId string `json:"webhook-id"`
// WebhookTimestamp Unix time of this attempt, in seconds.
WebhookTimestamp string `json:"webhook-timestamp"`
// WebhookSignature `v1,<base64 HMAC-SHA256>`; several signatures separated by spaces are allowed while a secret is rotated.
WebhookSignature string `json:"webhook-signature"`
}
BridgeEventParams defines parameters for BridgeEvent.
type Button ¶
type Button struct {
// Data Opaque, signed by Muster; return it unchanged with the press.
Data string `json:"data"`
Label string `json:"label"`
// Style A hint; the bridge maps it to the closest style its messenger has, or shows a plain button.
Style ButtonStyle `json:"style"`
}
Button defines model for Button.
type ButtonStyle ¶
type ButtonStyle string
ButtonStyle A hint; the bridge maps it to the closest style its messenger has, or shows a plain button.
const ( Danger ButtonStyle = "danger" Neutral ButtonStyle = "neutral" Primary ButtonStyle = "primary" Success ButtonStyle = "success" )
Defines values for ButtonStyle.
func (ButtonStyle) Valid ¶
func (e ButtonStyle) Valid() bool
Valid indicates whether the value is a known member of the ButtonStyle enum.
type Capabilities ¶
type Capabilities struct {
// Buttons The bridge shows buttons and reports presses on them.
Buttons *struct {
DataMaxBytes int `json:"data_max_bytes"`
// MaxPerMessage Muster sends at most this many, dropping Snooze buttons first: the Snooze presets, then the durations from the longest.
MaxPerMessage int `json:"max_per_message"`
MaxPerRow int `json:"max_per_row"`
// Styles The style hints the messenger can show as such; the bridge maps the others to the closest one, or shows a plain button.
Styles []ButtonStyle `json:"styles"`
} `json:"buttons,omitempty"`
// Delete The bot can delete its own messages (unused by Muster L1).
Delete *struct {
MaxAgeSeconds nullable.Nullable[int] `json:"max_age_seconds"`
} `json:"delete,omitempty"`
// DeletionEvents The bridge reports `message_deleted` when a message of the bot is deleted in the messenger.
DeletionEvents *bool `json:"deletion_events,omitempty"`
// DirectMessages The bot can send direct messages, which Account links by code need.
DirectMessages *struct {
// BotCanStart Whether the bot can write to a person who never wrote to it.
BotCanStart bool `json:"bot_can_start"`
} `json:"direct_messages,omitempty"`
// NativeMentions Mention markers become the messenger's own mentions, which notify the person.
NativeMentions *bool `json:"native_mentions,omitempty"`
// PrivateAnswers How the bridge can show an answer to one person only: an ephemeral message, a pop-up (short plain text), or both.
PrivateAnswers *[]CapabilitiesPrivateAnswers `json:"private_answers,omitempty"`
// QuietMessages The messenger can post a new message without notifying anyone (`notify` false).
QuietMessages *bool `json:"quiet_messages,omitempty"`
// StatusColor The messenger can colour a message by `color`; otherwise the bridge shows `emoji`.
StatusColor *bool `json:"status_color,omitempty"`
// ThreadMessages The bridge reports people's messages in Threads of the bot's messages — every one, or only those that mention the bot. Text commands need it.
ThreadMessages *CapabilitiesThreadMessages `json:"thread_messages,omitempty"`
}
Capabilities The optional features of the bridge. A missing member means the feature is not offered.
type CapabilitiesPrivateAnswers ¶
type CapabilitiesPrivateAnswers string
CapabilitiesPrivateAnswers defines model for Capabilities.PrivateAnswers.
const ( CapabilitiesPrivateAnswersEphemeral CapabilitiesPrivateAnswers = "ephemeral" CapabilitiesPrivateAnswersPopup CapabilitiesPrivateAnswers = "popup" )
Defines values for CapabilitiesPrivateAnswers.
func (CapabilitiesPrivateAnswers) Valid ¶
func (e CapabilitiesPrivateAnswers) Valid() bool
Valid indicates whether the value is a known member of the CapabilitiesPrivateAnswers enum.
type CapabilitiesThreadMessages ¶
type CapabilitiesThreadMessages string
CapabilitiesThreadMessages The bridge reports people's messages in Threads of the bot's messages — every one, or only those that mention the bot. Text commands need it.
const ( All CapabilitiesThreadMessages = "all" MentionsOnly CapabilitiesThreadMessages = "mentions_only" )
Defines values for CapabilitiesThreadMessages.
func (CapabilitiesThreadMessages) Valid ¶
func (e CapabilitiesThreadMessages) Valid() bool
Valid indicates whether the value is a known member of the CapabilitiesThreadMessages enum.
type ChannelCheck ¶
type ChannelCheck struct {
ChannelId string `json:"channel_id"`
// Name The channel's name as people see it; Muster shows it on the Destination.
Name string `json:"name"`
}
ChannelCheck defines model for ChannelCheck.
type DirectMessageInput ¶
type DirectMessageInput struct {
// Body CommonMark.
Body string `json:"body"`
UserExternalId string `json:"user_external_id"`
}
DirectMessageInput defines model for DirectMessageInput.
type DirectMessageSent ¶
type DirectMessageSent struct {
MessageId string `json:"message_id"`
Replayed bool `json:"replayed"`
}
DirectMessageSent defines model for DirectMessageSent.
type EditMessageJSONRequestBody ¶
type EditMessageJSONRequestBody = MessageContent
EditMessageJSONRequestBody defines body for EditMessage for application/json ContentType.
type ErrorClass ¶
type ErrorClass string
ErrorClass defines model for ErrorClass.
const ( ErrorClassForbidden ErrorClass = "forbidden" ErrorClassGone ErrorClass = "gone" ErrorClassInvalid ErrorClass = "invalid" ErrorClassRateLimited ErrorClass = "rate_limited" ErrorClassTransient ErrorClass = "transient" )
Defines values for ErrorClass.
func (ErrorClass) Valid ¶
func (e ErrorClass) Valid() bool
Valid indicates whether the value is a known member of the ErrorClass enum.
type Event ¶
type Event struct {
// contains filtered or unexported fields
}
Event One event; `type` selects the variant. `account_link` events are always sent; the others only with the feature they belong to (`buttons`, `thread_messages`, `deletion_events`).
func (Event) AsAccountLinkEvent ¶
func (t Event) AsAccountLinkEvent() (AccountLinkEvent, error)
AsAccountLinkEvent returns the union data inside the Event as a AccountLinkEvent
func (Event) AsMessageDeletedEvent ¶
func (t Event) AsMessageDeletedEvent() (MessageDeletedEvent, error)
AsMessageDeletedEvent returns the union data inside the Event as a MessageDeletedEvent
func (Event) AsPressEvent ¶
func (t Event) AsPressEvent() (PressEvent, error)
AsPressEvent returns the union data inside the Event as a PressEvent
func (Event) AsThreadMessageEvent ¶
func (t Event) AsThreadMessageEvent() (ThreadMessageEvent, error)
AsThreadMessageEvent returns the union data inside the Event as a ThreadMessageEvent
func (Event) Discriminator ¶
func (*Event) FromAccountLinkEvent ¶
func (t *Event) FromAccountLinkEvent(v AccountLinkEvent) error
FromAccountLinkEvent overwrites any union data inside the Event as the provided AccountLinkEvent
func (*Event) FromMessageDeletedEvent ¶
func (t *Event) FromMessageDeletedEvent(v MessageDeletedEvent) error
FromMessageDeletedEvent overwrites any union data inside the Event as the provided MessageDeletedEvent
func (*Event) FromPressEvent ¶
func (t *Event) FromPressEvent(v PressEvent) error
FromPressEvent overwrites any union data inside the Event as the provided PressEvent
func (*Event) FromThreadMessageEvent ¶
func (t *Event) FromThreadMessageEvent(v ThreadMessageEvent) error
FromThreadMessageEvent overwrites any union data inside the Event as the provided ThreadMessageEvent
func (Event) MarshalJSON ¶
func (*Event) MergeAccountLinkEvent ¶
func (t *Event) MergeAccountLinkEvent(v AccountLinkEvent) error
MergeAccountLinkEvent performs a merge with any union data inside the Event, using the provided AccountLinkEvent
func (*Event) MergeMessageDeletedEvent ¶
func (t *Event) MergeMessageDeletedEvent(v MessageDeletedEvent) error
MergeMessageDeletedEvent performs a merge with any union data inside the Event, using the provided MessageDeletedEvent
func (*Event) MergePressEvent ¶
func (t *Event) MergePressEvent(v PressEvent) error
MergePressEvent performs a merge with any union data inside the Event, using the provided PressEvent
func (*Event) MergeThreadMessageEvent ¶
func (t *Event) MergeThreadMessageEvent(v ThreadMessageEvent) error
MergeThreadMessageEvent performs a merge with any union data inside the Event, using the provided ThreadMessageEvent
func (*Event) UnmarshalJSON ¶
func (Event) ValueByDiscriminator ¶
type EventBase ¶
type EventBase struct {
// Id Stable across retries and polls; Muster handles each id once. Printable ASCII without spaces, so that it can travel as the `webhook-id` header.
Id string `json:"id"`
// OccurredAt When it happened in the messenger, or when the bridge learned of it.
OccurredAt time.Time `json:"occurred_at"`
Type string `json:"type"`
}
EventBase defines model for EventBase.
type EventBatch ¶
type EventBatch struct {
Events []Event `json:"events"`
// NextCursor Send it as `cursor` with the next call; opaque to Muster.
NextCursor string `json:"next_cursor"`
}
EventBatch defines model for EventBatch.
type FindUsersParams ¶
type FindUsersParams struct {
// Handle The handle as the person entered it, in the kind `user_lookup` declares.
Handle string `form:"handle" json:"handle"`
}
FindUsersParams defines parameters for FindUsers.
type Forbidden ¶
type Forbidden = Problem
Forbidden RFC 9457 problem details with the Bridge protocol's members.
type Info ¶
type Info struct {
Bridge struct {
Name string `json:"name"`
Version string `json:"version"`
} `json:"bridge"`
// Capabilities The optional features of the bridge. A missing member means the feature is not offered.
Capabilities Capabilities `json:"capabilities"`
// EventDelivery The event delivery modes the bridge offers; each Connection chooses one.
EventDelivery []InfoEventDelivery `json:"event_delivery"`
Limits Limits `json:"limits"`
// LinkUrlTemplate An `http` or `https` link that opens a chat with the bot and hands it the Account link token, with `{token}` where the token goes, such as `https://chat.example.org/bots/muster?start={token}`. Muster shows the link next to the token in the profile; without one it shows only the token. Another scheme makes `info` fail the Connection check.
LinkUrlTemplate nullable.Nullable[string] `json:"link_url_template,omitempty"`
Messenger struct {
// Name The messenger's name as people know it; Muster shows it on the Connection and the Destinations.
Name string `json:"name"`
} `json:"messenger"`
// ProtocolVersion The major version of this protocol the bridge speaks.
ProtocolVersion InfoProtocolVersion `json:"protocol_version"`
// UserLookup What a person enters to be found for an Account link by code, and what `findUsers` searches by. `none` offers only the token sent to the bot.
UserLookup InfoUserLookup `json:"user_lookup"`
}
Info defines model for Info.
type InfoEventDelivery ¶
type InfoEventDelivery string
InfoEventDelivery defines model for Info.EventDelivery.
const ( Poll InfoEventDelivery = "poll" Push InfoEventDelivery = "push" )
Defines values for InfoEventDelivery.
func (InfoEventDelivery) Valid ¶
func (e InfoEventDelivery) Valid() bool
Valid indicates whether the value is a known member of the InfoEventDelivery enum.
type InfoProtocolVersion ¶
type InfoProtocolVersion string
InfoProtocolVersion The major version of this protocol the bridge speaks.
const (
N1 InfoProtocolVersion = "1"
)
Defines values for InfoProtocolVersion.
func (InfoProtocolVersion) Valid ¶
func (e InfoProtocolVersion) Valid() bool
Valid indicates whether the value is a known member of the InfoProtocolVersion enum.
type InfoUserLookup ¶
type InfoUserLookup string
InfoUserLookup What a person enters to be found for an Account link by code, and what `findUsers` searches by. `none` offers only the token sent to the bot.
const ( Email InfoUserLookup = "email" Login InfoUserLookup = "login" None InfoUserLookup = "none" UserId InfoUserLookup = "user_id" Username InfoUserLookup = "username" )
Defines values for InfoUserLookup.
func (InfoUserLookup) Valid ¶
func (e InfoUserLookup) Valid() bool
Valid indicates whether the value is a known member of the InfoUserLookup enum.
type Invalid ¶
type Invalid = Problem
Invalid RFC 9457 problem details with the Bridge protocol's members.
type Limits ¶
type Limits struct {
// EditMaxAgeSeconds How long after posting the bot can still edit a message; `null` when edits never expire. Muster stops editing a minute earlier.
EditMaxAgeSeconds nullable.Nullable[int] `json:"edit_max_age_seconds"`
// MaxBodyLength The longest `body`, in Unicode code points of the CommonMark Muster sends, that the bridge always accepts for a post and for an edit alike, after its own rendering.
MaxBodyLength int `json:"max_body_length"`
// SendPerSecond A hint for the Connection limiter, over all channels of the bot.
SendPerSecond *float32 `json:"send_per_second,omitempty"`
// SendPerSecondPerChannel A hint for the Destination limiter; `rate_limited` stays the truth.
SendPerSecondPerChannel *float32 `json:"send_per_second_per_channel,omitempty"`
}
Limits defines model for Limits.
type Mention ¶
type Mention struct {
DisplayName string `json:"display_name"`
// ExternalId The account's id in the messenger, as the bridge reported it when the account was linked.
ExternalId string `json:"external_id"`
// Ref Names the marker `muster-mention:<ref>` in the body.
Ref string `json:"ref"`
}
Mention defines model for Mention.
type MessageContent ¶
type MessageContent struct {
// Body CommonMark, as the description of this protocol says; at most `limits.max_body_length` code points.
Body string `json:"body"`
// Buttons In order. Empty when the message has none, always empty without `capabilities.buttons`.
Buttons []Button `json:"buttons"`
// Color The colour of the status, for messengers that colour messages.
Color string `json:"color"`
// Emoji The status as an emoji (🔴 🟠 ⚪ 🟢 ⛈), for messengers without colours.
Emoji string `json:"emoji"`
Link Link `json:"link"`
// Status The status of the Alert Group the message shows; `storm` for a Storm summary.
Status Status `json:"status"`
// Title `#N` and the Alert Group's title, plain text; shown as the heading and linked to `link`.
Title string `json:"title"`
}
MessageContent defines model for MessageContent.
type MessageDeletedEvent ¶
type MessageDeletedEvent struct {
// Id Stable across retries and polls; Muster handles each id once. Printable ASCII without spaces, so that it can travel as the `webhook-id` header.
Id string `json:"id"`
MessageId string `json:"message_id"`
// OccurredAt When it happened in the messenger, or when the bridge learned of it.
OccurredAt time.Time `json:"occurred_at"`
Type interface{} `json:"type"`
}
MessageDeletedEvent defines model for MessageDeletedEvent.
type MessageEdited ¶
type MessageEdited struct {
Truncated bool `json:"truncated"`
}
MessageEdited defines model for MessageEdited.
type MessageInput ¶
type MessageInput struct {
// Body CommonMark, as the description of this protocol says; at most `limits.max_body_length` code points.
Body string `json:"body"`
// Buttons In order. Empty when the message has none, always empty without `capabilities.buttons`.
Buttons []Button `json:"buttons"`
ChannelId string `json:"channel_id"`
// Color The colour of the status, for messengers that colour messages.
Color string `json:"color"`
// Emoji The status as an emoji (🔴 🟠 ⚪ 🟢 ⛈), for messengers without colours.
Emoji string `json:"emoji"`
// Kind A Root message of an Alert Group, a Storm summary, or a test message sent from the Destination page.
Kind MessageKind `json:"kind"`
Link Link `json:"link"`
Mentions []Mention `json:"mentions"`
// Notify Loud (`true`) or Quiet (`false`).
Notify bool `json:"notify"`
// Status The status of the Alert Group the message shows; `storm` for a Storm summary.
Status Status `json:"status"`
// Title `#N` and the Alert Group's title, plain text; shown as the heading and linked to `link`.
Title string `json:"title"`
}
MessageInput defines model for MessageInput.
type MessageKind ¶
type MessageKind string
MessageKind A Root message of an Alert Group, a Storm summary, or a test message sent from the Destination page.
const ( Root MessageKind = "root" StormSummary MessageKind = "storm_summary" Test MessageKind = "test" )
Defines values for MessageKind.
func (MessageKind) Valid ¶
func (e MessageKind) Valid() bool
Valid indicates whether the value is a known member of the MessageKind enum.
type MessagePosted ¶
type MessagePosted struct {
// MessageId Opaque to Muster; it encodes whatever the bridge needs to edit the message and reply under it.
MessageId string `json:"message_id"`
// Replayed The `Idempotency-Key` was seen before, and this is its first result.
Replayed bool `json:"replayed"`
// ThreadRef The message's Thread, when known at once; otherwise the first `replyInThread` returns it.
ThreadRef nullable.Nullable[string] `json:"thread_ref,omitempty"`
// Truncated The bridge shortened the body to fit its messenger.
Truncated bool `json:"truncated"`
// Url A link that opens the message in the messenger, if it has one; Muster shows it on the Alert Group page and links to it from the Thread of an older Root message.
Url nullable.Nullable[string] `json:"url,omitempty"`
}
MessagePosted defines model for MessagePosted.
type Person ¶
type Person struct {
DisplayName string `json:"display_name"`
// ExternalId The account's stable id in the messenger.
ExternalId string `json:"external_id"`
// Handle The account's handle of the kind `user_lookup` declares, when the bridge knows it.
Handle nullable.Nullable[string] `json:"handle,omitempty"`
}
Person defines model for Person.
type PersonList ¶
type PersonList struct {
Items []Person `json:"items"`
}
PersonList defines model for PersonList.
type PollEventsParams ¶
type PollEventsParams struct {
// Cursor The `next_cursor` of the previous answer; opaque to Muster.
Cursor *string `form:"cursor,omitempty" json:"cursor,omitempty"`
// Wait How long to hold the request open when there are no events, in seconds.
Wait *int `form:"wait,omitempty" json:"wait,omitempty"`
}
PollEventsParams defines parameters for PollEvents.
type PostMessageJSONRequestBody ¶
type PostMessageJSONRequestBody = MessageInput
PostMessageJSONRequestBody defines body for PostMessage for application/json ContentType.
type PostMessageParams ¶
type PostMessageParams struct {
// IdempotencyKey Identifies the request across retries; a repeated key with the same token returns the first result without creating anything again. Keys are scoped per token.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key"`
}
PostMessageParams defines parameters for PostMessage.
type PressEvent ¶
type PressEvent struct {
// Data The button's `data`, unchanged.
Data string `json:"data"`
// Id Stable across retries and polls; Muster handles each id once. Printable ASCII without spaces, so that it can travel as the `webhook-id` header.
Id string `json:"id"`
// MessageId The message the button belongs to, a Root message or a Thread reply.
MessageId string `json:"message_id"`
// OccurredAt When it happened in the messenger, or when the bridge learned of it.
OccurredAt time.Time `json:"occurred_at"`
Type interface{} `json:"type"`
User Person `json:"user"`
}
PressEvent defines model for PressEvent.
type Problem ¶
type Problem struct {
Class *ErrorClass `json:"class,omitempty"`
// Detail Shown to the Admin as the reason, as untrusted text; never put a secret in it.
Detail *string `json:"detail,omitempty"`
Instance *string `json:"instance,omitempty"`
// Reason For `gone`, `edit_window_closed` when the messenger refuses the edit only because of the message's age.
Reason *ProblemReason `json:"reason,omitempty"`
// Scope For `rate_limited`, whether the wait holds one channel or every channel of the bot.
Scope *ProblemScope `json:"scope,omitempty"`
Status *int `json:"status,omitempty"`
Title *string `json:"title,omitempty"`
Type *string `json:"type,omitempty"`
}
Problem RFC 9457 problem details with the Bridge protocol's members.
type ProblemReason ¶
type ProblemReason string
ProblemReason For `gone`, `edit_window_closed` when the messenger refuses the edit only because of the message's age.
const (
EditWindowClosed ProblemReason = "edit_window_closed"
)
Defines values for ProblemReason.
func (ProblemReason) Valid ¶
func (e ProblemReason) Valid() bool
Valid indicates whether the value is a known member of the ProblemReason enum.
type ProblemScope ¶
type ProblemScope string
ProblemScope For `rate_limited`, whether the wait holds one channel or every channel of the bot.
const ( Bot ProblemScope = "bot" Channel ProblemScope = "channel" )
Defines values for ProblemScope.
func (ProblemScope) Valid ¶
func (e ProblemScope) Valid() bool
Valid indicates whether the value is a known member of the ProblemScope enum.
type RateLimited ¶
type RateLimited = Problem
RateLimited RFC 9457 problem details with the Bridge protocol's members.
type ReplyInThreadJSONRequestBody ¶
type ReplyInThreadJSONRequestBody = ThreadReplyInput
ReplyInThreadJSONRequestBody defines body for ReplyInThread for application/json ContentType.
type ReplyInThreadParams ¶
type ReplyInThreadParams struct {
// IdempotencyKey Identifies the request across retries; a repeated key with the same token returns the first result without creating anything again. Keys are scoped per token.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key"`
}
ReplyInThreadParams defines parameters for ReplyInThread.
type SendDirectMessageJSONRequestBody ¶
type SendDirectMessageJSONRequestBody = DirectMessageInput
SendDirectMessageJSONRequestBody defines body for SendDirectMessage for application/json ContentType.
type SendDirectMessageParams ¶
type SendDirectMessageParams struct {
// IdempotencyKey Identifies the request across retries; a repeated key with the same token returns the first result without creating anything again. Keys are scoped per token.
IdempotencyKey IdempotencyKey `json:"Idempotency-Key"`
}
SendDirectMessageParams defines parameters for SendDirectMessage.
type Status ¶
type Status string
Status The status of the Alert Group the message shows; `storm` for a Storm summary.
type ThreadMessageEvent ¶
type ThreadMessageEvent struct {
// Id Stable across retries and polls; Muster handles each id once. Printable ASCII without spaces, so that it can travel as the `webhook-id` header.
Id string `json:"id"`
// MessageId The message whose Thread it is in — the `message_id` in the path of `replyInThread`, usually a Root message, never the id of a reply.
MessageId string `json:"message_id"`
// OccurredAt When it happened in the messenger, or when the bridge learned of it.
OccurredAt time.Time `json:"occurred_at"`
// Text The message as plain text, mentions of the bot removed.
Text string `json:"text"`
ThreadRef nullable.Nullable[string] `json:"thread_ref"`
Type interface{} `json:"type"`
User Person `json:"user"`
}
ThreadMessageEvent defines model for ThreadMessageEvent.
type ThreadReplyInput ¶
type ThreadReplyInput struct {
// Body CommonMark, at most `limits.max_body_length` code points.
Body string `json:"body"`
Buttons []Button `json:"buttons"`
Mentions []Mention `json:"mentions"`
// Notify Loud (`true`) or Quiet (`false`).
Notify bool `json:"notify"`
// ThreadRef The last `thread_ref` Muster received for the message — from `postMessage` or an earlier reply — or `null` when it has none.
ThreadRef nullable.Nullable[string] `json:"thread_ref"`
}
ThreadReplyInput defines model for ThreadReplyInput.
type ThreadReplyPosted ¶
type ThreadReplyPosted struct {
// MessageId The reply; presses on its buttons name it.
MessageId string `json:"message_id"`
Replayed bool `json:"replayed"`
ThreadRef string `json:"thread_ref"`
Truncated bool `json:"truncated"`
}
ThreadReplyPosted defines model for ThreadReplyPosted.
type Transient ¶
type Transient = Problem
Transient RFC 9457 problem details with the Bridge protocol's members.
type Unauthorized ¶
type Unauthorized = Problem
Unauthorized RFC 9457 problem details with the Bridge protocol's members.