plugin

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

TODO: all plugins.

Index

Constants

View Source
const (
	KeyPrefixPlugin = "p_"
	KeyAllPlugin    = "all_plugins"
)

Variables

View Source
var (
	ErrPluginExsist          = errors.New("error plugin existed")
	ErrPluginNotExsist       = errors.New("error plugin not existed")
	ErrPluginVersionMismatch = errors.New("error plugin version mismatch")
)

Functions

This section is empty.

Types

type AllPlugins

type AllPlugins map[string]string

func (*AllPlugins) String

func (a *AllPlugins) String() string

type DaprStateOprator

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

func NewDaprStateOperator

func NewDaprStateOperator(storeName string, c dapr.Client) *DaprStateOprator

dapr state.

func (*DaprStateOprator) Create

func (o *DaprStateOprator) Create(ctx context.Context, p *model.Plugin) error

func (*DaprStateOprator) Delete

func (o *DaprStateOprator) Delete(ctx context.Context, pluginID string) (*model.Plugin, error)

func (*DaprStateOprator) Get

func (o *DaprStateOprator) Get(ctx context.Context, pluginID string) (*model.Plugin, error)

func (*DaprStateOprator) List

func (o *DaprStateOprator) List(ctx context.Context) ([]*model.Plugin, error)

func (*DaprStateOprator) Update

func (o *DaprStateOprator) Update(ctx context.Context, p *model.Plugin) error

type Operator

type Operator interface {
	// Create plugin.
	Create(context.Context, *model.Plugin) error
	// Update plugin.
	Update(context.Context, *model.Plugin) error
	// Get plugin with the pluginID.
	Get(ctx context.Context, pluginID string) (*model.Plugin, error)
	// Delete plugin with the pluginID.
	Delete(ctx context.Context, pluginID string) (*model.Plugin, error)
	// List plugin.
	List(context.Context) ([]*model.Plugin, error)
}

Operator contains all operations to plugin.

Jump to

Keyboard shortcuts

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