handler

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HandlerAPI

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

func New

func New(ctx context.Context, logger *zap.Logger, storage storageTY.Plugin, enc *encryptionAPI.Encryption, bus busTY.Plugin) *HandlerAPI

func (*HandlerAPI) Delete

func (h *HandlerAPI) Delete(ids []string) (int64, error)

Delete Service

func (*HandlerAPI) Disable

func (h *HandlerAPI) Disable(ids []string) error

Disable notifyHandler

func (*HandlerAPI) Enable

func (h *HandlerAPI) Enable(ids []string) error

Enable notifyHandler

func (*HandlerAPI) Get

Get a config

func (*HandlerAPI) GetByID

func (h *HandlerAPI) GetByID(ID string) (*handlerTY.Config, error)

GetByID returns a handler by id

func (*HandlerAPI) GetByTypeName

func (h *HandlerAPI) GetByTypeName(handlerPluginType, name string) (*handlerTY.Config, error)

GetByTypeName returns a handler by type and name

func (*HandlerAPI) GetEntityInterface

func (h *HandlerAPI) GetEntityInterface() interface{}

func (*HandlerAPI) Import

func (h *HandlerAPI) Import(data interface{}) error

func (*HandlerAPI) List

func (h *HandlerAPI) List(filters []storageTY.Filter, pagination *storageTY.Pagination) (*storageTY.Result, error)

List by filter and pagination

func (*HandlerAPI) LoadAll

func (h *HandlerAPI) LoadAll()

LoadAll makes notifyHandlers alive

func (*HandlerAPI) Reload

func (h *HandlerAPI) Reload(ids []string) error

Reload notifyHandler

func (*HandlerAPI) Save

func (h *HandlerAPI) Save(cfg *handlerTY.Config) error

Save config

func (*HandlerAPI) SaveAndReload

func (h *HandlerAPI) SaveAndReload(cfg *handlerTY.Config) error

SaveAndReload handler

func (*HandlerAPI) SetState

func (h *HandlerAPI) SetState(id string, state *types.State) error

SetState Updates state data

func (*HandlerAPI) Start

func (h *HandlerAPI) Start(cfg *handlerTY.Config) error

Start notifyHandler

func (*HandlerAPI) Stop

func (h *HandlerAPI) Stop(cfg *handlerTY.Config) error

Stop notifyHandler

func (*HandlerAPI) UnloadAll

func (h *HandlerAPI) UnloadAll()

UnloadAll makes stop all notifyHandlers

Jump to

Keyboard shortcuts

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