state

package
v1.5.18 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: MIT Imports: 16 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

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

func NewStateManager

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

type SStorageState

type SStorageState struct {
	FPrivKey string            `json:"priv_key"`
	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