Documentation
¶
Overview ¶
Package osmose is the idiomatic Go SDK for Osmium bots.
Osmose hides the WebSocket, binary protobuf, handshake, reconnect, and RPC correlation details behind a small typed client API. Advanced users can use Client.Raw to send generated protobuf requests directly.
Index ¶
- Constants
- Variables
- func IsPermanent(err error) bool
- type ChannelDeleteEvent
- type ChannelDeleteHandler
- type ChannelUpdateEvent
- type ChannelUpdateHandler
- type ChatTypingEvent
- type ChatTypingHandler
- type Client
- type CollectorError
- type CollectorResult
- type CommunityDeleteEvent
- type CommunityDeleteHandler
- type CommunityUpdateEvent
- type CommunityUpdateHandler
- type Config
- type ConnectionEvent
- type ConnectionHandler
- type ConversationLastReadEvent
- type ConversationLastReadHandler
- type EndReason
- type EventOverflowHandler
- type HandlerError
- type HandlerErrorHandler
- type InteractionCollector
- type InteractionCollectorOptions
- type InteractionEvent
- type InteractionHandler
- type MemberCreateEvent
- type MemberCreateHandler
- type MemberDeleteEvent
- type MemberDeleteHandler
- type MemberUpdateEvent
- type MemberUpdateHandler
- type MessageCollector
- type MessageCollectorOptions
- type MessageCreateEvent
- type MessageCreateHandler
- type MessageDeleteEvent
- type MessageDeleteHandler
- type MessageReactionsEvent
- type MessageReactionsHandler
- type MessageUpdateEvent
- type MessageUpdateHandler
- type PermanentError
- type RPCError
- type RawClient
- type ReactionCollector
- type ReactionCollectorOptions
- type ReadyEvent
- type ReadyHandler
- type State
- type UnexpectedResultError
- type UpdateEvent
- type UpdateHandler
- type UserUpdateEvent
- type UserUpdateHandler
- type VoiceRoomParticipantEvent
- type VoiceRoomParticipantHandler
- type VoiceRoomStateEvent
- type VoiceRoomStateHandler
Constants ¶
View Source
const ( Disconnected = coreclient.Disconnected Connecting = coreclient.Connecting Initializing = coreclient.Initializing Authenticating = coreclient.Authenticating Ready = coreclient.Ready Closing = coreclient.Closing )
View Source
const ( EndReasonTime = collectors.EndReasonTime EndReasonIdle = collectors.EndReasonIdle EndReasonLimit = collectors.EndReasonLimit EndReasonStopped = collectors.EndReasonStopped EndReasonContext = collectors.EndReasonContext EndReasonOverflow = collectors.EndReasonOverflow EndReasonClosed = collectors.EndReasonClosed )
Variables ¶
View Source
var ( ErrClosed = coreclient.ErrClosed ErrNotConnected = coreclient.ErrNotConnected ErrNotReady = coreclient.ErrNotReady ErrAlreadyRunning = coreclient.ErrAlreadyRunning ErrRunCompleted = coreclient.ErrRunCompleted ErrPermanent = coreclient.ErrPermanent ErrAuthorizationFailed = coreclient.ErrAuthorizationFailed ErrProtocolMismatch = coreclient.ErrProtocolMismatch ErrDisconnected = coreclient.ErrDisconnected ErrUnsupportedRequest = coreclient.ErrUnsupportedRequest ErrEventQueueFull = events.ErrEventQueueFull ErrCollectorEnded = collectors.ErrCollectorEnded ErrCollectorTimeout = collectors.ErrCollectorTimeout ErrCollectorIdle = collectors.ErrCollectorIdle ErrCollectorOverflow = collectors.ErrCollectorOverflow ErrCollectorClosed = collectors.ErrCollectorClosed )
Functions ¶
func IsPermanent ¶
Types ¶
type ChannelDeleteEvent ¶
type ChannelDeleteEvent = events.ChannelDeleteEvent
type ChannelDeleteHandler ¶
type ChannelDeleteHandler = events.ChannelDeleteHandler
type ChannelUpdateEvent ¶
type ChannelUpdateEvent = events.ChannelUpdateEvent
type ChannelUpdateHandler ¶
type ChannelUpdateHandler = events.ChannelUpdateHandler
type ChatTypingEvent ¶
type ChatTypingEvent = events.ChatTypingEvent
type ChatTypingHandler ¶
type ChatTypingHandler = events.ChatTypingHandler
type CollectorError ¶
type CollectorError = collectors.CollectorError
type CollectorResult ¶
type CollectorResult = collectors.CollectorResult
type CommunityDeleteEvent ¶
type CommunityDeleteEvent = events.CommunityDeleteEvent
type CommunityDeleteHandler ¶
type CommunityDeleteHandler = events.CommunityDeleteHandler
type CommunityUpdateEvent ¶
type CommunityUpdateEvent = events.CommunityUpdateEvent
type CommunityUpdateHandler ¶
type CommunityUpdateHandler = events.CommunityUpdateHandler
type Config ¶
type Config = coreclient.Config
type ConnectionEvent ¶
type ConnectionEvent = events.ConnectionEvent
type ConnectionHandler ¶
type ConnectionHandler = events.ConnectionHandler
type ConversationLastReadEvent ¶
type ConversationLastReadEvent = events.ConversationLastReadEvent
type ConversationLastReadHandler ¶
type ConversationLastReadHandler = events.ConversationLastReadHandler
type EndReason ¶
type EndReason = collectors.EndReason
type EventOverflowHandler ¶
type EventOverflowHandler = events.EventOverflowHandler
type HandlerError ¶
type HandlerError = events.HandlerError
type HandlerErrorHandler ¶
type HandlerErrorHandler = events.HandlerErrorHandler
type InteractionCollector ¶
type InteractionCollector = collectors.InteractionCollector
type InteractionCollectorOptions ¶
type InteractionCollectorOptions = collectors.InteractionCollectorOptions
type InteractionEvent ¶
type InteractionEvent = events.InteractionEvent
type InteractionHandler ¶
type InteractionHandler = events.InteractionHandler
type MemberCreateEvent ¶
type MemberCreateEvent = events.MemberCreateEvent
type MemberCreateHandler ¶
type MemberCreateHandler = events.MemberCreateHandler
type MemberDeleteEvent ¶
type MemberDeleteEvent = events.MemberDeleteEvent
type MemberDeleteHandler ¶
type MemberDeleteHandler = events.MemberDeleteHandler
type MemberUpdateEvent ¶
type MemberUpdateEvent = events.MemberUpdateEvent
type MemberUpdateHandler ¶
type MemberUpdateHandler = events.MemberUpdateHandler
type MessageCollector ¶
type MessageCollector = collectors.MessageCollector
type MessageCollectorOptions ¶
type MessageCollectorOptions = collectors.MessageCollectorOptions
type MessageCreateEvent ¶
type MessageCreateEvent = events.MessageCreateEvent
type MessageCreateHandler ¶
type MessageCreateHandler = events.MessageCreateHandler
type MessageDeleteEvent ¶
type MessageDeleteEvent = events.MessageDeleteEvent
type MessageDeleteHandler ¶
type MessageDeleteHandler = events.MessageDeleteHandler
type MessageReactionsEvent ¶
type MessageReactionsEvent = events.MessageReactionsEvent
type MessageReactionsHandler ¶
type MessageReactionsHandler = events.MessageReactionsHandler
type MessageUpdateEvent ¶
type MessageUpdateEvent = events.MessageUpdateEvent
type MessageUpdateHandler ¶
type MessageUpdateHandler = events.MessageUpdateHandler
type PermanentError ¶
type PermanentError = coreclient.PermanentError
type RPCError ¶
type RPCError = coreclient.RPCError
type RawClient ¶
type RawClient = coreclient.RawClient
type ReactionCollector ¶
type ReactionCollector = collectors.ReactionCollector
type ReactionCollectorOptions ¶
type ReactionCollectorOptions = collectors.ReactionCollectorOptions
type ReadyEvent ¶
type ReadyEvent = events.ReadyEvent
type ReadyHandler ¶
type ReadyHandler = events.ReadyHandler
type State ¶
type State = coreclient.State
type UnexpectedResultError ¶
type UnexpectedResultError = coreclient.UnexpectedResultError
type UpdateEvent ¶
type UpdateEvent = events.UpdateEvent
type UpdateHandler ¶
type UpdateHandler = events.UpdateHandler
type UserUpdateEvent ¶
type UserUpdateEvent = events.UserUpdateEvent
type UserUpdateHandler ¶
type UserUpdateHandler = events.UserUpdateHandler
type VoiceRoomParticipantEvent ¶
type VoiceRoomParticipantEvent = events.VoiceRoomParticipantEvent
type VoiceRoomParticipantHandler ¶
type VoiceRoomParticipantHandler = events.VoiceRoomParticipantHandler
type VoiceRoomStateEvent ¶
type VoiceRoomStateEvent = events.VoiceRoomStateEvent
type VoiceRoomStateHandler ¶
type VoiceRoomStateHandler = events.VoiceRoomStateHandler
Directories
¶
| Path | Synopsis |
|---|---|
|
Package collectors provides bounded helpers for waiting on typed events.
|
Package collectors provides bounded helpers for waiting on typed events. |
|
Package events contains the typed event payloads emitted by Osmose.
|
Package events contains the typed event payloads emitted by Osmose. |
|
examples
|
|
|
basic
command
|
|
|
ping
command
|
|
|
internal
|
|
|
client
Package client contains the internal implementation behind the public osmose package.
|
Package client contains the internal implementation behind the public osmose package. |
|
gateway
Package gateway owns the single WebSocket reader and controlled writer used by an Osmium client.
|
Package gateway owns the single WebSocket reader and controlled writer used by an Osmium client. |
|
proto
|
|
|
tools
|
|
|
protogen
command
|
|
|
wrapgen
command
|
|
|
Package types contains the small public models shared by Osmose services and events.
|
Package types contains the small public models shared by Osmose services and events. |
|
Package voice exposes the voice control-plane operations present in the Osmium protocol.
|
Package voice exposes the voice control-plane operations present in the Osmium protocol. |
Click to show internal directories.
Click to hide internal directories.