memstore

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a cache client. It is currently implemented through redis.

func New

func New(opts *redis.Options) Client

New creates a new cache client.

func (Client) Close

func (c Client) Close() error

Close closes the client.

func (Client) GetChannelChar

func (c Client) GetChannelChar(ctx context.Context, channelID corde.Snowflake) (discord.MediaCharacter, error)

GetChannelChar gets the currently dropped char in the channel

func (Client) GetInteractionCount

func (c Client) GetInteractionCount(ctx context.Context, channelID corde.Snowflake) (int64, error)

GetInteractionCount gets the interaction count for the given channel/user combo

func (Client) IncrementInteractionCount

func (c Client) IncrementInteractionCount(ctx context.Context, channelID corde.Snowflake) error

IncrementInteractionCount increments the interaction count for the given channel/user combo

func (Client) RemoveChannelChar

func (c Client) RemoveChannelChar(ctx context.Context, channelID corde.Snowflake) error

RemoveChannelChar removes the currently dropped char in the channel

func (Client) ResetInteractionCount

func (c Client) ResetInteractionCount(ctx context.Context, channelID corde.Snowflake) error

ResetInteractionCount resets the interaction count for the given channel/user combo

func (Client) SetChannelChar

func (c Client) SetChannelChar(ctx context.Context, channelID corde.Snowflake, char discord.MediaCharacter) error

SetChannelChar sets the currently dropped char in the channel

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL