anonymous

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: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Anonymous

type Anonymous interface {
	PluginAPI

	StorePublicKey(userID string, publicKey crypto.PublicKey) error
	GetPublicKey(userID string) (crypto.PublicKey, error)

	IsEncryptionEnabledForChannel(channelID, userID string) bool
	SetEncryptionStatusForChannel(channelID, userID string, status bool) error

	UnverifiedPlugins() []PluginIdentifier
	StartPluginChecks() error
}

Anonymous API for business logic

func New

func New(apiConfig Config) Anonymous

New returns new Anonymous API object

type Config

type Config struct {
	*Dependencies
}

Config Anonymous configuration

type Dependencies

type Dependencies struct {
	PluginAPI
	store.Store
}

Dependencies contains all API dependencies

type PluginAPI

type PluginAPI interface {
	SendEphemeralPost(userID string, post *model.Post) *model.Post
	GetActivePlugins() ([]PluginIdentifier, error)
	GetConfiguration() *config.Config

	GetUsersInChannel(channelID, sortBy string, page, perPage int) ([]*model.User, error)
	PublishWebSocketEvent(event string, payload map[string]interface{}, broadcast *model.WebsocketBroadcast)
	utils_store.API
}

PluginAPI API form mattermost plugin

type PluginIdentifier

type PluginIdentifier struct {
	ID      string
	Version string
}

PluginIdentifier unique plugin identifier

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