Documentation ¶
Index ¶
- func IterateCursor(ctx context.Context, iter CursorIterator) error
- func Timestamp(t *time.Time) string
- func Users(ctx context.Context, token string) ([]*slacklog.User, error)
- type ConversationsHistoryParams
- type ConversationsHistoryResponse
- type ConversationsParams
- type ConversationsResponse
- type Cursor
- type CursorIterator
- type CursorIteratorFunc
- type Error
- type NextCursor
- type UsersResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IterateCursor ¶
func IterateCursor(ctx context.Context, iter CursorIterator) error
IterateCursor iterates CursorIterator until returning empty cursor.
Types ¶
type ConversationsHistoryParams ¶
type ConversationsHistoryParams struct { Cursor Cursor `json:"cursor,omitempty"` Inclusive bool `json:"inclusive,omitempty"` Latest *time.Time `json:"latest,omitempty"` Limit int `json:"limit,omitempty"` Oldest *time.Time `json:"oldest,omitempty"` }
ConversationsHistoryParams is optional parameters for ConversationsHistory
type ConversationsHistoryResponse ¶
type ConversationsHistoryResponse struct { Ok bool `json:"ok"` Messages []*slacklog.Message `json:"messages,omitempty"` HasMore bool `json:"has_more"` PinCount int `json:"pin_count"` ResponseMetadata *NextCursor `json:"response_metadata"` }
ConversationsHistoryResponse is response for ConversationsHistory
func ConversationsHistory ¶
func ConversationsHistory(ctx context.Context, token, channel string, params ConversationsHistoryParams) (*ConversationsHistoryResponse, error)
ConversationsHistory gets conversation messages in a channel.
type ConversationsParams ¶
type ConversationsParams struct { Cursor Cursor `json:"cursor,omitempty"` Limit int `json:"limit,omitempty"` ExcludeArchived bool `json:"excludeArchived,omitempty"` Types []string `json:"types,omitempty"` }
ConversationsParams is optional parameters for Conversations
type ConversationsResponse ¶
type ConversationsResponse struct { Ok bool `json:"ok"` Channels []*slacklog.Channel `json:"channels,omitempty"` ResponseMetadata *NextCursor `json:"response_metadata"` }
ConversationsResponse is response for Conversations
func Conversations ¶
func Conversations(ctx context.Context, token string, params ConversationsParams) (*ConversationsResponse, error)
Conversations gets conversation channels in a channel.
type CursorIterator ¶
CursorIterator is requirements of IterateCursor iterates with cursor.
type CursorIteratorFunc ¶
CursorIteratorFunc is a function which implements CursorIterator.
type NextCursor ¶
type NextCursor struct {
NextCursor Cursor `json:"next_cursor"`
}
NextCursor is cursor for next request.
type UsersResponse ¶
UsersResponse is response for Conversations