Documentation
¶
Index ¶
- type Channel
- type CreateChannelRequest
- type CreateChannelResponse
- type ListChannelsRequest
- type ListChannelsResponse
- type ListMessagesRequest
- type ListMessagesResponse
- type Message
- type SendMessageRequest
- type SendMessageResponse
- type StreamService
- func (t *StreamService) CreateChannel(request *CreateChannelRequest) (*CreateChannelResponse, error)
- func (t *StreamService) ListChannels(request *ListChannelsRequest) (*ListChannelsResponse, error)
- func (t *StreamService) ListMessages(request *ListMessagesRequest) (*ListMessagesResponse, error)
- func (t *StreamService) SendMessage(request *SendMessageRequest) (*SendMessageResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateChannelRequest ¶ added in v0.22.0
type CreateChannelResponse ¶ added in v0.22.0
type CreateChannelResponse struct {
}
type ListChannelsRequest ¶ added in v0.22.0
type ListChannelsRequest struct {
}
type ListChannelsResponse ¶ added in v0.22.0
type ListChannelsResponse struct {
Channels []Channel `json:"channels"`
}
type ListMessagesRequest ¶ added in v0.22.0
type ListMessagesResponse ¶ added in v0.22.0
type Message ¶ added in v0.22.0
type Message struct {
// the channel name
Channel string `json:"channel"`
// id of the message
Id string `json:"id"`
// the associated metadata
Metadata map[string]string `json:"metadata"`
// text of the message
Text string `json:"text"`
// time of message creation
Timestamp string `json:"timestamp"`
}
type SendMessageRequest ¶ added in v0.22.0
type SendMessageResponse ¶ added in v0.22.0
type SendMessageResponse struct {
}
type StreamService ¶
type StreamService struct {
// contains filtered or unexported fields
}
func NewStreamService ¶
func NewStreamService(token string) *StreamService
func (*StreamService) CreateChannel ¶ added in v0.22.0
func (t *StreamService) CreateChannel(request *CreateChannelRequest) (*CreateChannelResponse, error)
Create a channel with a given name and description. Channels are created automatically but this allows you to specify a description that's persisted for the lifetime of the channel.
func (*StreamService) ListChannels ¶ added in v0.22.0
func (t *StreamService) ListChannels(request *ListChannelsRequest) (*ListChannelsResponse, error)
List all the active channels
func (*StreamService) ListMessages ¶ added in v0.22.0
func (t *StreamService) ListMessages(request *ListMessagesRequest) (*ListMessagesResponse, error)
List messages for a given channel
func (*StreamService) SendMessage ¶ added in v0.22.0
func (t *StreamService) SendMessage(request *SendMessageRequest) (*SendMessageResponse, error)
Send a message to the stream.
Click to show internal directories.
Click to hide internal directories.