Documentation
¶
Index ¶
- Constants
- func Create(ctx context.Context, args ...object.Object) object.Object
- func Module() *object.Module
- func NewMessages(client *slack.Client, msgs []slack.Msg) *object.List
- type Channel
- func (b *Channel) Cost() int
- func (c *Channel) Equals(other object.Object) object.Object
- func (c *Channel) GetAttr(name string) (object.Object, bool)
- func (c *Channel) Inspect() string
- func (b *Channel) Interface() interface{}
- func (b *Channel) IsTruthy() bool
- func (c *Channel) MarshalJSON() ([]byte, error)
- func (b *Channel) RunOperation(opType op.BinaryOpType, right object.Object) object.Object
- func (b *Channel) SetAttr(name string, value object.Object) error
- func (b *Channel) Type() object.Type
- type Client
- func (c *Client) AddReaction(ctx context.Context, args ...object.Object) object.Object
- func (b *Client) Cost() int
- func (c *Client) CreateConversation(ctx context.Context, args ...object.Object) object.Object
- func (c *Client) DeleteMessage(ctx context.Context, args ...object.Object) object.Object
- func (c *Client) Equals(other object.Object) object.Object
- func (c *Client) GetAttr(name string) (object.Object, bool)
- func (c *Client) GetConversationHistory(ctx context.Context, args ...object.Object) object.Object
- func (c *Client) GetConversationInfo(ctx context.Context, args ...object.Object) object.Object
- func (c *Client) GetConversationMembers(ctx context.Context, args ...object.Object) object.Object
- func (c *Client) GetConversations(ctx context.Context, args ...object.Object) object.Object
- func (c *Client) GetUserGroups(ctx context.Context, args ...object.Object) object.Object
- func (c *Client) GetUserInfo(ctx context.Context, args ...object.Object) object.Object
- func (c *Client) GetUsers(ctx context.Context, args ...object.Object) object.Object
- func (c *Client) Inspect() string
- func (b *Client) Interface() interface{}
- func (b *Client) IsTruthy() bool
- func (c *Client) MessageBuilder(ctx context.Context, args ...object.Object) object.Object
- func (c *Client) PostEphemeralMessage(ctx context.Context, args ...object.Object) object.Object
- func (c *Client) PostMessage(ctx context.Context, args ...object.Object) object.Object
- func (c *Client) RemoveReaction(ctx context.Context, args ...object.Object) object.Object
- func (b *Client) RunOperation(opType op.BinaryOpType, right object.Object) object.Object
- func (b *Client) SetAttr(name string, value object.Object) error
- func (b *Client) Type() object.Type
- func (c *Client) UpdateMessage(ctx context.Context, args ...object.Object) object.Object
- func (c *Client) UploadFile(ctx context.Context, args ...object.Object) object.Object
- type GenericIterator
- func NewConversationIterator(ctx context.Context, client *slack.Client, ...) *GenericIterator
- func NewConversationMembersIterator(ctx context.Context, client *slack.Client, ...) *GenericIterator
- func NewGenericIterator(iterType string, nextFn NextFn) *GenericIterator
- func NewMessageIterator(ctx context.Context, client *slack.Client, ...) *GenericIterator
- func (i *GenericIterator) Cost() int
- func (i *GenericIterator) Entry() (object.IteratorEntry, bool)
- func (i *GenericIterator) Equals(other object.Object) object.Object
- func (i *GenericIterator) GetAttr(name string) (object.Object, bool)
- func (i *GenericIterator) Inspect() string
- func (i *GenericIterator) Interface() interface{}
- func (i *GenericIterator) IsTruthy() bool
- func (i *GenericIterator) Next(ctx context.Context) (object.Object, bool)
- func (i *GenericIterator) RunOperation(opType op.BinaryOpType, right object.Object) object.Object
- func (i *GenericIterator) SetAttr(name string, value object.Object) error
- func (i *GenericIterator) Type() object.Type
- type Message
- func (b *Message) Cost() int
- func (m *Message) Equals(other object.Object) object.Object
- func (m *Message) GetAttr(name string) (object.Object, bool)
- func (m *Message) GetConversation(ctx context.Context, args ...object.Object) object.Object
- func (m *Message) GetTimestamp(ctx context.Context, args ...object.Object) object.Object
- func (m *Message) Inspect() string
- func (b *Message) Interface() interface{}
- func (m *Message) IsBotMessage() bool
- func (b *Message) IsTruthy() bool
- func (m *Message) MarshalJSON() ([]byte, error)
- func (b *Message) RunOperation(opType op.BinaryOpType, right object.Object) object.Object
- func (b *Message) SetAttr(name string, value object.Object) error
- func (m *Message) Text() string
- func (b *Message) Type() object.Type
- func (m *Message) Username() string
- func (m *Message) Value() *slack.Message
- type MessageBuilder
- func (b *MessageBuilder) AddDivider(ctx context.Context, args ...object.Object) object.Object
- func (b *MessageBuilder) AddHeader(ctx context.Context, args ...object.Object) object.Object
- func (b *MessageBuilder) AddSection(ctx context.Context, args ...object.Object) object.Object
- func (b *MessageBuilder) Build(ctx context.Context, args ...object.Object) object.Object
- func (b *MessageBuilder) Cost() int
- func (b *MessageBuilder) Equals(other object.Object) object.Object
- func (b *MessageBuilder) GetAttr(name string) (object.Object, bool)
- func (b *MessageBuilder) Inspect() string
- func (b *MessageBuilder) Interface() interface{}
- func (b *MessageBuilder) IsTruthy() bool
- func (b *MessageBuilder) RunOperation(opType op.BinaryOpType, right object.Object) object.Object
- func (b *MessageBuilder) Send(ctx context.Context, args ...object.Object) object.Object
- func (b *MessageBuilder) SetAttr(name string, value object.Object) error
- func (b *MessageBuilder) Type() object.Type
- type NextFn
- type User
- func (b *User) Cost() int
- func (u *User) Equals(other object.Object) object.Object
- func (u *User) GetAttr(name string) (object.Object, bool)
- func (u *User) Inspect() string
- func (b *User) Interface() interface{}
- func (b *User) IsTruthy() bool
- func (u *User) MarshalJSON() ([]byte, error)
- func (b *User) RunOperation(opType op.BinaryOpType, right object.Object) object.Object
- func (b *User) SetAttr(name string, value object.Object) error
- func (b *User) Type() object.Type
- type UserProfile
- func (b *UserProfile) Cost() int
- func (p *UserProfile) Equals(other object.Object) object.Object
- func (p *UserProfile) GetAttr(name string) (object.Object, bool)
- func (p *UserProfile) Inspect() string
- func (b *UserProfile) Interface() interface{}
- func (b *UserProfile) IsTruthy() bool
- func (p *UserProfile) MarshalJSON() ([]byte, error)
- func (b *UserProfile) RunOperation(opType op.BinaryOpType, right object.Object) object.Object
- func (b *UserProfile) SetAttr(name string, value object.Object) error
- func (b *UserProfile) Type() object.Type
Constants ¶
const CHANNEL object.Type = "slack.channel"
const CLIENT object.Type = "slack.client"
const MESSAGE object.Type = "slack.message"
const MESSAGE_BUILDER object.Type = "slack.message_builder"
const USER object.Type = "slack.user"
const USER_PROFILE object.Type = "slack.user_profile"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Channel ¶
type Channel struct {
// contains filtered or unexported fields
}
func (*Channel) MarshalJSON ¶
func (*Channel) RunOperation ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) AddReaction ¶
AddReaction adds an emoji reaction to a message
func (*Client) CreateConversation ¶
CreateConversation creates a new channel, either public or private
func (*Client) DeleteMessage ¶
DeleteMessage deletes a message from a channel
func (*Client) GetConversationHistory ¶
GetConversationHistory gets the history of a conversation
func (*Client) GetConversationInfo ¶
GetConversationInfo gets information about a conversation
func (*Client) GetConversationMembers ¶
GetConversationMembers gets members of a conversation
func (*Client) GetConversations ¶
GetConversations gets all conversations for a user
func (*Client) GetUserGroups ¶
GetUserGroups gets all user groups for the team
func (*Client) GetUserInfo ¶
GetUserInfo gets information about a user
func (*Client) MessageBuilder ¶
func (*Client) PostEphemeralMessage ¶
PostEphemeralMessage sends a message to a channel that is only visible to a single user
func (*Client) PostMessage ¶
PostMessage sends a message to a channel
func (*Client) RemoveReaction ¶
RemoveReaction removes an emoji reaction from a message
func (*Client) RunOperation ¶
func (*Client) UpdateMessage ¶
UpdateMessage updates a message in a channel
type GenericIterator ¶
type GenericIterator struct {
// contains filtered or unexported fields
}
GenericIterator implements a Risor iterator that can be used for any paginated results
func NewConversationIterator ¶
func NewConversationIterator(ctx context.Context, client *slack.Client, params *slack.GetConversationsParameters) *GenericIterator
NewConversationIterator creates a new iterator for Slack conversations
func NewConversationMembersIterator ¶
func NewConversationMembersIterator(ctx context.Context, client *slack.Client, params *slack.GetUsersInConversationParameters) *GenericIterator
NewConversationMembersIterator creates a new iterator for members of a Slack conversation
func NewGenericIterator ¶
func NewGenericIterator(iterType string, nextFn NextFn) *GenericIterator
NewGenericIterator creates a new generic iterator with the given type and next function
func NewMessageIterator ¶
func NewMessageIterator(ctx context.Context, client *slack.Client, params *slack.GetConversationHistoryParameters) *GenericIterator
NewMessageIterator creates a new iterator for messages in a channel
func (*GenericIterator) Cost ¶
func (i *GenericIterator) Cost() int
func (*GenericIterator) Entry ¶
func (i *GenericIterator) Entry() (object.IteratorEntry, bool)
func (*GenericIterator) Equals ¶
func (i *GenericIterator) Equals(other object.Object) object.Object
func (*GenericIterator) GetAttr ¶
func (i *GenericIterator) GetAttr(name string) (object.Object, bool)
func (*GenericIterator) Inspect ¶
func (i *GenericIterator) Inspect() string
func (*GenericIterator) Interface ¶
func (i *GenericIterator) Interface() interface{}
func (*GenericIterator) IsTruthy ¶
func (i *GenericIterator) IsTruthy() bool
func (*GenericIterator) Next ¶
Next method returns the next value in the iteration, along with a boolean indicating whether there are more items to iterate over.
func (*GenericIterator) RunOperation ¶
func (i *GenericIterator) RunOperation(opType op.BinaryOpType, right object.Object) object.Object
func (*GenericIterator) SetAttr ¶
func (i *GenericIterator) SetAttr(name string, value object.Object) error
func (*GenericIterator) Type ¶
func (i *GenericIterator) Type() object.Type
type Message ¶
type Message struct {
// contains filtered or unexported fields
}
Message represents a Slack message
func (*Message) GetConversation ¶
GetConversation retrieves the conversation thread for this message
func (*Message) GetTimestamp ¶
func (*Message) IsBotMessage ¶
func (*Message) MarshalJSON ¶
func (*Message) RunOperation ¶
type MessageBuilder ¶
type MessageBuilder struct {
// contains filtered or unexported fields
}
MessageBuilder helps build rich Slack messages
func NewMessageBuilder ¶
func NewMessageBuilder(client *Client) *MessageBuilder
func (*MessageBuilder) AddDivider ¶
AddDivider adds a divider block to the message
func (*MessageBuilder) AddSection ¶
AddSection adds a section block to the message
func (*MessageBuilder) GetAttr ¶
func (b *MessageBuilder) GetAttr(name string) (object.Object, bool)
func (*MessageBuilder) Inspect ¶
func (b *MessageBuilder) Inspect() string
func (*MessageBuilder) Interface ¶
func (b *MessageBuilder) Interface() interface{}
func (*MessageBuilder) RunOperation ¶
type User ¶
type User struct {
// contains filtered or unexported fields
}
func (*User) MarshalJSON ¶
func (*User) RunOperation ¶
type UserProfile ¶
type UserProfile struct {
// contains filtered or unexported fields
}
func NewUserProfile ¶
func NewUserProfile(profile *slack.UserProfile) *UserProfile
func (*UserProfile) Inspect ¶
func (p *UserProfile) Inspect() string
func (*UserProfile) MarshalJSON ¶
func (p *UserProfile) MarshalJSON() ([]byte, error)