pluginstore

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsErrNotFound

func IsErrNotFound(err error) bool

IsErrNotFound returns true if the error is of type ErrNotFound, even if wrapped.

Types

type ErrNotFound

type ErrNotFound struct {
	Message string
}

func NewErrNotFound

func NewErrNotFound(msg string) *ErrNotFound

NewErrNotFound creates a new ErrNotFound with the given message.

func (*ErrNotFound) Error

func (e *ErrNotFound) Error() string

type PluginStore

type PluginStore struct {
	API plugin.API
}

func NewPluginStore

func NewPluginStore(api plugin.API) *PluginStore

func (*PluginStore) DeleteIcon

func (s *PluginStore) DeleteIcon(iconType string) error

DeleteIcon removes icon data from the KV store

func (*PluginStore) GetAppID

func (s *PluginStore) GetAppID(tenantID string) (string, error)

func (*PluginStore) GetIcon

func (s *PluginStore) GetIcon(iconType string) ([]byte, error)

GetIcon retrieves icon data from the KV store

func (*PluginStore) GetUser

func (s *PluginStore) GetUser(mattermostUserID string) (*User, error)

func (*PluginStore) StoreAppID

func (s *PluginStore) StoreAppID(tenantID, appID string) error

func (*PluginStore) StoreIcon

func (s *PluginStore) StoreIcon(iconType string, data []byte) error

StoreIcon stores icon data in the KV store

func (*PluginStore) StoreUser

func (s *PluginStore) StoreUser(user *User) error

func (*PluginStore) UserExists

func (s *PluginStore) UserExists(mattermostUserID string) (bool, error)

UserExists checks if a user exists in the plugin store.

type Store

type Store interface {
	StoreUser(user *User) error
	GetUser(mattermostUserID string) (*User, error)
	StoreAppID(tenantID, appID string) error
	GetAppID(tenantID string) (string, error)
	UserExists(mattermostUserID string) (bool, error)
	StoreIcon(iconType string, data []byte) error
	GetIcon(iconType string) ([]byte, error)
	DeleteIcon(iconType string) error
}

type User

type User struct {
	MattermostUserID string
	TeamsObjectID    string
	TeamsSSOUsername string
}

func NewUser

func NewUser(mattermostUserID, teamsObjectID, teamsSSOUsername string) *User

Jump to

Keyboard shortcuts

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