sqlstore

package
v0.0.0-...-f8b5f28 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPruneStore

func NewPruneStore(pluginAPI PluginAPIClient, log bot.Logger, sqlStore *SQLStore) app.PruneStore

Types

type ConfigurationAPI

type ConfigurationAPI interface {
	GetConfig() *model.Config
}

type KVAPI

type KVAPI interface {
	Get(key string, out interface{}) error
}

KVAPI is the key value store interface for the pluginkv stores. It is implemented by mattermost-plugin-api/Client.KV, or by the mock KVAPI.

type PluginAPIClient

type PluginAPIClient struct {
	Store         StoreAPI
	KV            KVAPI
	Configuration ConfigurationAPI
}

PluginAPIClient is the struct combining the interfaces defined above, which is everything from pluginapi that the store currently uses.

func NewClient

func NewClient(api *pluginapi.Client) PluginAPIClient

NewClient receives a pluginapi.Client and returns the PluginAPIClient, which is what the store will use to access pluginapi.Client.

type SQLStore

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

func New

func New(pluginAPI PluginAPIClient, log bot.Logger) (*SQLStore, error)

New constructs a new instance of SQLStore.

type StoreAPI

type StoreAPI interface {
	GetMasterDB() (*sql.DB, error)
	DriverName() string
}

StoreAPI is the interface exposing the underlying database, provided by pluginapi It is implemented by mattermost-plugin-api/Client.Store, or by the mock StoreAPI.

Jump to

Keyboard shortcuts

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