store

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2022 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DialogSession

type DialogSession struct {
	CallbackID  string
	CreatedAt   time.Time
	RootCommand string
	Command     string
	CommandArgs map[string]string
	ChannelName string
	Username    string
}

type DialogStore

type DialogStore interface {
	Create(slashCommand *model.MMSlashCommand, rootCommand, command string, commandsArgs map[string]string, dialog model.Dialog) (*mmmodel.OpenDialogRequest, error)
	Get(callbackID string) (*DialogSession, error)
	Delete(callbackID string) error
	Count() int
}

func NewInMemoryDialogStore

func NewInMemoryDialogStore() DialogStore

type InMemoryDialogStore

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

func (*InMemoryDialogStore) Count

func (s *InMemoryDialogStore) Count() int

func (*InMemoryDialogStore) Create

func (s *InMemoryDialogStore) Create(
	slashcommand *model.MMSlashCommand,
	rootCommand, command string,
	commandArgs map[string]string,
	dialog model.Dialog,
) (*mmmodel.OpenDialogRequest, error)

func (*InMemoryDialogStore) Delete

func (s *InMemoryDialogStore) Delete(callbackID string) error

func (*InMemoryDialogStore) Get

func (s *InMemoryDialogStore) Get(callbackID string) (*DialogSession, error)

Jump to

Keyboard shortcuts

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