gateway

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GatewayAPI

type GatewayAPI 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) *GatewayAPI

func (*GatewayAPI) ClearSleepingQueue

func (gw *GatewayAPI) ClearSleepingQueue(gatewayID, nodeID string) error

func (*GatewayAPI) Delete

func (gw *GatewayAPI) Delete(ids []string) (int64, error)

Delete gateway

func (*GatewayAPI) Disable

func (gw *GatewayAPI) Disable(ids []string) error

Disable gateway

func (*GatewayAPI) Enable

func (gw *GatewayAPI) Enable(ids []string) error

Enable gateway

func (*GatewayAPI) Get

func (gw *GatewayAPI) Get(filters []storageTY.Filter) (*gwTY.Config, error)

Get returns a gateway

func (*GatewayAPI) GetByID

func (gw *GatewayAPI) GetByID(id string) (*gwTY.Config, error)

GetByID returns a gateway details

func (*GatewayAPI) GetByIDs

func (gw *GatewayAPI) GetByIDs(ids []string) ([]gwTY.Config, error)

GetByIDs returns a gateway details by id

func (*GatewayAPI) GetEntityInterface

func (gw *GatewayAPI) GetEntityInterface() interface{}

func (*GatewayAPI) GetGatewaySleepingQueue

func (gw *GatewayAPI) GetGatewaySleepingQueue(gatewayID string) (map[string][]msgTY.Message, error)

returns a sleeping queue from a gateway

func (*GatewayAPI) GetNodeSleepingQueue

func (gw *GatewayAPI) GetNodeSleepingQueue(gatewayID, nodeID string) ([]msgTY.Message, error)

returns a sleeping queue from a node

func (*GatewayAPI) Import

func (gw *GatewayAPI) Import(data interface{}) error

func (*GatewayAPI) List

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

List by filter and pagination

func (*GatewayAPI) LoadAll

func (gw *GatewayAPI) LoadAll()

LoadAll makes gateways alive

func (*GatewayAPI) Reload

func (gw *GatewayAPI) Reload(ids []string) error

Reload gateway

func (*GatewayAPI) Save

func (gw *GatewayAPI) Save(gwCfg *gwTY.Config) error

Save gateway config

func (*GatewayAPI) SaveAndReload

func (gw *GatewayAPI) SaveAndReload(gwCfg *gwTY.Config) error

SaveAndReload gateway

func (*GatewayAPI) SetState

func (gw *GatewayAPI) SetState(id string, state *types.State) error

SetState Updates state data

func (*GatewayAPI) Start

func (gw *GatewayAPI) Start(gwCfg *gwTY.Config) error

Start gateway

func (*GatewayAPI) Stop

func (gw *GatewayAPI) Stop(gwCfg *gwTY.Config) error

Stop gateway

func (*GatewayAPI) UnloadAll

func (gw *GatewayAPI) UnloadAll()

UnloadAll makes stop all gateways

Jump to

Keyboard shortcuts

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