Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("not found")
ErrNotFound is returned by stores in case of a not found error.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { UserNumber PhoneNumber // key ServerNumber PhoneNumber DiscordToken string }
type AccountStore ¶
type AccountStore interface { // Account returns the account that the store is associated with. Account() Account // NumberIsMuted returns whether a number is muted or not. NumberIsMuted(context.Context) bool // MuteNumber mutes a number until the given time. MuteNumber(context.Context, time.Time) error // UnmuteNumber unmutes a number. UnmuteNumber(context.Context) error // ChannelNickname returns the nickname of a channel. ChannelNickname(context.Context, discord.ChannelID) (string, error) // ChannelNicknames returns all channel nicknames. ChannelNicknames(context.Context) (map[discord.ChannelID]string, error) // ChannelFromNickname returns the channel ID from a nickname. ChannelFromNickname(context.Context, string) (discord.ChannelID, error) // SetChannelNickname sets the nickname of a channel. SetChannelNickname(context.Context, discord.ChannelID, string) error }
type InternalError ¶
type InternalError struct {
Err error
}
InternalError is returned by stores in case of an internal error.
func (InternalError) Error ¶
func (e InternalError) Error() string
func (InternalError) Unwrap ¶
func (e InternalError) Unwrap() error
type PhoneNumber ¶
type PhoneNumber = string
Click to show internal directories.
Click to hide internal directories.