Documentation ¶
Overview ¶
Package defaultstore provides thread-safe store implementations that store state values in memory.
Index ¶
- func DiffMessage(src discord.Message, dst *discord.Message)
- func New() store.Cabinet
- type Channel
- func (s *Channel) Channel(id discord.ChannelID) (*discord.Channel, error)
- func (s *Channel) ChannelRemove(channel discord.Channel) error
- func (s *Channel) ChannelSet(channel discord.Channel) error
- func (s *Channel) Channels(guildID discord.GuildID) ([]discord.Channel, error)
- func (s *Channel) CreatePrivateChannel(recipient discord.UserID) (*discord.Channel, error)
- func (s *Channel) PrivateChannels() ([]discord.Channel, error)
- func (s *Channel) Reset() error
- type Emoji
- type Guild
- type Me
- type Member
- func (s *Member) Member(guildID discord.GuildID, userID discord.UserID) (*discord.Member, error)
- func (s *Member) MemberRemove(guildID discord.GuildID, userID discord.UserID) error
- func (s *Member) MemberSet(guildID discord.GuildID, member discord.Member) error
- func (s *Member) Members(guildID discord.GuildID) ([]discord.Member, error)
- func (s *Member) Reset() error
- type Message
- func (s *Message) MaxMessages() int
- func (s *Message) Message(chID discord.ChannelID, mID discord.MessageID) (*discord.Message, error)
- func (s *Message) MessageRemove(channelID discord.ChannelID, messageID discord.MessageID) error
- func (s *Message) MessageSet(message discord.Message) error
- func (s *Message) Messages(channelID discord.ChannelID) ([]discord.Message, error)
- func (s *Message) Reset() error
- type Presence
- func (s *Presence) Presence(gID discord.GuildID, uID discord.UserID) (*gateway.Presence, error)
- func (s *Presence) PresenceRemove(guildID discord.GuildID, userID discord.UserID) error
- func (s *Presence) PresenceSet(guildID discord.GuildID, presence gateway.Presence) error
- func (s *Presence) Presences(guildID discord.GuildID) ([]gateway.Presence, error)
- func (s *Presence) Reset() error
- type Role
- func (s *Role) Reset() error
- func (s *Role) Role(guildID discord.GuildID, roleID discord.RoleID) (*discord.Role, error)
- func (s *Role) RoleRemove(guildID discord.GuildID, roleID discord.RoleID) error
- func (s *Role) RoleSet(guildID discord.GuildID, role discord.Role) error
- func (s *Role) Roles(guildID discord.GuildID) ([]discord.Role, error)
- type VoiceState
- func (s *VoiceState) Reset() error
- func (s *VoiceState) VoiceState(guildID discord.GuildID, userID discord.UserID) (*discord.VoiceState, error)
- func (s *VoiceState) VoiceStateRemove(guildID discord.GuildID, userID discord.UserID) error
- func (s *VoiceState) VoiceStateSet(guildID discord.GuildID, voiceState discord.VoiceState) error
- func (s *VoiceState) VoiceStates(guildID discord.GuildID) ([]discord.VoiceState, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DiffMessage ¶
DiffMessage fills non-empty fields from src to dst.
Types ¶
type Channel ¶
type Channel struct {
// contains filtered or unexported fields
}
func NewChannel ¶
func NewChannel() *Channel
func (*Channel) ChannelSet ¶
ChannelSet sets the Direct Message or Guild channel into the state.
func (*Channel) CreatePrivateChannel ¶
func (*Channel) PrivateChannels ¶
PrivateChannels returns a list of Direct Message channels randomly ordered.
type Emoji ¶
type Emoji struct {
// contains filtered or unexported fields
}
type Member ¶
type Member struct {
// contains filtered or unexported fields
}
func (*Member) MemberRemove ¶
type Message ¶
type Message struct {
// contains filtered or unexported fields
}
func NewMessage ¶
func (*Message) MaxMessages ¶
func (*Message) MessageRemove ¶
type Presence ¶
type Presence struct {
// contains filtered or unexported fields
}
func NewPresence ¶
func NewPresence() *Presence
func (*Presence) PresenceRemove ¶
func (*Presence) PresenceSet ¶
type Role ¶
type Role struct {
// contains filtered or unexported fields
}
func (*Role) RoleRemove ¶
type VoiceState ¶
type VoiceState struct {
// contains filtered or unexported fields
}
func NewVoiceState ¶
func NewVoiceState() *VoiceState
func (*VoiceState) Reset ¶
func (s *VoiceState) Reset() error
func (*VoiceState) VoiceState ¶
func (s *VoiceState) VoiceState( guildID discord.GuildID, userID discord.UserID) (*discord.VoiceState, error)
func (*VoiceState) VoiceStateRemove ¶
func (*VoiceState) VoiceStateSet ¶
func (s *VoiceState) VoiceStateSet(guildID discord.GuildID, voiceState discord.VoiceState) error
func (*VoiceState) VoiceStates ¶
func (s *VoiceState) VoiceStates(guildID discord.GuildID) ([]discord.VoiceState, error)
Click to show internal directories.
Click to hide internal directories.