state

package
v1.5.14 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IClient

type IClient interface {
	Service() hls_client.IClient
	Traffic() hlt_client.IClient
}

type IStateManager

type IStateManager interface {
	GetConfig() config.IConfig
	StateIsActive() bool

	CreateState([]byte, asymmetric.IPrivKey) error
	OpenState([]byte) error
	CloseState() error

	GetClient() IClient
	GetWrapperDB() database.IWrapperDB
	GetTemplate() *STemplateState

	AddFriend(string, asymmetric.IPubKey) error
	DelFriend(string) error

	AddConnection(string) error
	DelConnection(string) error
}

func NewStateManager

func NewStateManager(
	pConfig config.IConfig,
	pPathTo string,
) IStateManager

type SStorageState

type SStorageState struct {
	FPrivKey     string            `json:"priv_key"`
	FConnections []string          `json:"connections"`
	FFriends     map[string]string `json:"friends"`
}

type STemplateState

type STemplateState struct {
	FAuthorized bool
}

Jump to

Keyboard shortcuts

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