state

package
v1.5.16 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IStateManager

type IStateManager interface {
	GetConfig() config.IConfig

	IsMyPubKey(asymmetric.IPubKey) bool
	GetPrivKey() asymmetric.IPrivKey

	CreateState([]byte, asymmetric.IPrivKey) error

	StateIsActive() bool
	OpenState([]byte) error
	CloseState() error

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

	SetNetworkKey(string) error

	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 {
	FNetworkKey  string            `json:"network_key"`
	FPrivKey     string            `json:"priv_key"`
	FConnections []string          `json:"connections"`
	FFriends     map[string]string `json:"friends"`
}

type STemplateState

type STemplateState struct {
	FLanguage   utils.ILanguage
	FAuthorized bool
}

Jump to

Keyboard shortcuts

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