Documentation ¶
Index ¶
- func GenerateConfig(username, password, config string) error
- type Attachment
- type ChimeClient
- type Contact
- type ContactsClient
- type Conversation
- type ConversationListOptions
- type ConversationsClient
- func (r *ConversationsClient) Create(profiles []string) (*Conversation, error)
- func (r *ConversationsClient) DeleteMessage(conversationID, messageID string) error
- func (r *ConversationsClient) Get(id string) (*Conversation, error)
- func (r *ConversationsClient) List(opts *ConversationListOptions) ([]Conversation, string, error)
- func (r *ConversationsClient) Messages(id string, opts *MessageListOptions) ([]Message, string, error)
- func (r *ConversationsClient) Page(opts *ConversationListOptions, handler func([]Conversation) bool) error
- func (r *ConversationsClient) Post(conversationID string, msg PostInput) (*Message, error)
- type Device
- type DeviceClient
- type ListOptions
- type Member
- type Mention
- type Message
- type MessageListOptions
- type PostInput
- type PresenceSettings
- type Profile
- type Room
- type RoomClient
- func (r *RoomClient) AddMember(roomID, profileID string) error
- func (r *RoomClient) Create(name string) (*Room, error)
- func (r *RoomClient) Delete(roomID string) error
- func (r *RoomClient) DeleteMessage(roomID, messageID string) error
- func (r *RoomClient) Get(roomID string) (*Room, error)
- func (r *RoomClient) List(opts *RoomListOptions) ([]Room, string, error)
- func (r *RoomClient) Memberships(roomID string) (RoomMemberships, error)
- func (r *RoomClient) Message(roomID, messageID string) (*Message, error)
- func (r *RoomClient) Messages(roomID string, opts *MessageListOptions) ([]Message, string, error)
- func (r *RoomClient) Post(roomID string, msg PostInput) (*Message, error)
- func (r *RoomClient) Visibility(roomID, visibility string) (*Room, error)
- type RoomListOptions
- type RoomMembership
- type RoomMemberships
- type Session
- type WebSocketsClient
- type WebsocketConversationEvent
- type WebsocketConversationMembershipEvent
- type WebsocketConversationMessageEvent
- type WebsocketJoinableMeetingsEvent
- type WebsocketPresenceEvent
- type WebsocketPushEvent
- type WebsocketRoomEvent
- type WebsocketRoomMessageEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateConfig ¶
Types ¶
type Attachment ¶
type ChimeClient ¶
type ChimeClient struct { Session *Session Rooms *RoomClient Conversations *ConversationsClient Contacts *ContactsClient Device *DeviceClient WebSockets *WebSocketsClient // contains filtered or unexported fields }
func New ¶
func New(config string) (*ChimeClient, error)
func (*ChimeClient) PeriodicRefresh ¶
func (c *ChimeClient) PeriodicRefresh() error
func (*ChimeClient) RefreshSession ¶
func (c *ChimeClient) RefreshSession() (*time.Time, error)
func (*ChimeClient) Shutdown ¶
func (c *ChimeClient) Shutdown()
func (*ChimeClient) SignOut ¶
func (c *ChimeClient) SignOut() error
func (*ChimeClient) Upload ¶
func (c *ChimeClient) Upload(r io.Reader, contentType string) (*Attachment, error)
type ContactsClient ¶
type ContactsClient struct {
// contains filtered or unexported fields
}
func (*ContactsClient) AutoComplete ¶
func (r *ContactsClient) AutoComplete(needle string) ([]Contact, error)
func (*ContactsClient) List ¶
func (r *ContactsClient) List() ([]Contact, error)
type Conversation ¶
type Conversation struct { Channel string ConversationId string CreatedOn time.Time Favorite bool LastSent time.Time LastMessage *Message Members []Member Name string UpdatedOn time.Time Visibility string Preferences struct { NotificationPreferences struct { DesktopNotificationPreferences string MobileNotificationPreferences string } } }
type ConversationListOptions ¶
type ConversationsClient ¶
type ConversationsClient struct {
// contains filtered or unexported fields
}
func (*ConversationsClient) Create ¶
func (r *ConversationsClient) Create(profiles []string) (*Conversation, error)
func (*ConversationsClient) DeleteMessage ¶
func (r *ConversationsClient) DeleteMessage(conversationID, messageID string) error
func (*ConversationsClient) Get ¶
func (r *ConversationsClient) Get(id string) (*Conversation, error)
func (*ConversationsClient) List ¶
func (r *ConversationsClient) List(opts *ConversationListOptions) ([]Conversation, string, error)
func (*ConversationsClient) Messages ¶
func (r *ConversationsClient) Messages(id string, opts *MessageListOptions) ([]Message, string, error)
func (*ConversationsClient) Page ¶
func (r *ConversationsClient) Page(opts *ConversationListOptions, handler func([]Conversation) bool) error
type Device ¶
type Device struct { Capabilities int DeviceToken string Platform string PlatformDeviceId string // part of API responses IsEnabled bool UaChannelToken string SessionClaims map[string]string CapabilitiesV2 map[string]string Channel string LastKnownActivityTime time.Time }
func (Device) DeviceType ¶
type DeviceClient ¶
type DeviceClient struct {
// contains filtered or unexported fields
}
func (*DeviceClient) PresenceSettings ¶
func (c *DeviceClient) PresenceSettings() (*PresenceSettings, error)
func (*DeviceClient) SetPresenceSettings ¶
func (c *DeviceClient) SetPresenceSettings(presence *PresenceSettings) error
func (*DeviceClient) SetStatus ¶
func (c *DeviceClient) SetStatus(status string) error
type ListOptions ¶
type Mention ¶
func ParseMessage ¶
ParseMessage inspects a message and extracts all mentions, if any
type MessageListOptions ¶
type MessageListOptions struct { ListOptions After *time.Time }
type PostInput ¶
type PostInput struct { Content string Attachment *Attachment }
type PresenceSettings ¶
type Room ¶
type Room struct { Channel string CreatedOn string LastMentioned string LastRead string LastSent string Name string Open bool Preferences struct { NotificationPreferences struct { DesktopNotificationPreferences string MobileNotificationPreferences string } } Privacy string RoomId string Type string UpdatedOn string Visibility string }
type RoomClient ¶
type RoomClient struct {
// contains filtered or unexported fields
}
func (*RoomClient) AddMember ¶
func (r *RoomClient) AddMember(roomID, profileID string) error
func (*RoomClient) Delete ¶
func (r *RoomClient) Delete(roomID string) error
func (*RoomClient) DeleteMessage ¶
func (r *RoomClient) DeleteMessage(roomID, messageID string) error
func (*RoomClient) List ¶
func (r *RoomClient) List(opts *RoomListOptions) ([]Room, string, error)
func (*RoomClient) Memberships ¶
func (r *RoomClient) Memberships(roomID string) (RoomMemberships, error)
func (*RoomClient) Message ¶
func (r *RoomClient) Message(roomID, messageID string) (*Message, error)
func (*RoomClient) Messages ¶
func (r *RoomClient) Messages(roomID string, opts *MessageListOptions) ([]Message, string, error)
func (*RoomClient) Visibility ¶
func (r *RoomClient) Visibility(roomID, visibility string) (*Room, error)
type RoomListOptions ¶
type RoomListOptions struct { ListOptions Visibility *string }
type RoomMembership ¶
type RoomMemberships ¶
type RoomMemberships map[string]RoomMembership
type WebSocketsClient ¶
type WebSocketsClient struct {
// contains filtered or unexported fields
}
func (*WebSocketsClient) Connect ¶
func (w *WebSocketsClient) Connect(parent context.Context, subscriptions []string) (<-chan WebsocketPushEvent, error)
type WebsocketConversationEvent ¶
type WebsocketConversationEvent struct { Channel string Members []Member Preferences struct { NotificationPreferences struct { DesktopNotificationPreferences string MobileNotificationPreferences string } } ConversationID string `json:"ConversationId"` Name string Visibility string CreatedOn time.Time Favorite bool LastSent time.Time UpdatedOn time.Time }
klass == Conversation
type WebsocketJoinableMeetingsEvent ¶
type WebsocketJoinableMeetingsEvent struct { Klass string `json:"klass"` Meetings interface{} `json:"meetings"` }
klass == JoinableMeetings
type WebsocketPresenceEvent ¶
type WebsocketPresenceEvent struct { ProfileID string `json:"ProfileId"` Revision int64 Availability int64 }
klass == Presence
type WebsocketPushEvent ¶
type WebsocketPushEvent struct { Channel string `json:"channel"` Data struct { ID string `json:"id"` Klass string `json:"klass"` Record json.RawMessage `json:"record"` ParsedRecord interface{} Type string `json:"type"` Metadata struct { IsNoisy bool } `json:"metadata"` TraceID string `json:"trace_id"` } `json:"data"` }
type WebsocketRoomEvent ¶
type WebsocketRoomEvent struct { Open bool Preferences struct { NotificationPreferences struct { DesktopNotificationPreferences string MobileNotificationPreferences string } } Channel string Type string RoomID string `json:"RoomId"` Name string Visibility string Privacy string Favorite bool CreatedOn time.Time LastRead time.Time LastSent time.Time UpdatedOn time.Time }
klass == Room
Source Files ¶
Click to show internal directories.
Click to hide internal directories.