store

package
v0.0.0-...-d1f9358 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// EncryptionStatusStoreKeyPrefix prefix for encryption status data key is kvsotre
	EncryptionStatusStoreKeyPrefix = "es_"
)
View Source
const UserStoreKeyPrefix = "user_"

UserStoreKeyPrefix prefix for user data key is kvsotre

Variables

This section is empty.

Functions

This section is empty.

Types

type EncryptionStatusStore

type EncryptionStatusStore interface {
	IsEncryptionEnabled(channelID, userID string) bool
	SetEncryptionStatus(channelID, userID string, status bool) error
}

EncryptionStatusStore API for encryption statuses in KVStore

type Store

type Store interface {
	UserStore
	EncryptionStatusStore
}

Store encapsulates all store APIs

func NewPluginStore

func NewPluginStore(api store.API) Store

NewPluginStore creates Store object from plugin.API

type User

type User struct {
	MattermostUserID string           `json:"mattermost_user_id"`
	PublicKey        crypto.PublicKey `json:"public_key"`
}

User stores user specific data

type UserStore

type UserStore interface {
	LoadUser(mattermostUserID string) (*User, error)
	StoreUser(user *User) error
	DeleteUser(mattermostUserID string) error
}

UserStore API for user KVStore

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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