state

package
v1.5.8 Latest Latest
Warning

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

Go to latest
Published: May 7, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IState

type IState interface {
	GetClient() iClient
	GetStorage() storage.IKeyValueStorage
	GetWrapperDB() database.IWrapperDB

	IsActive() bool
	GetTemplate() *STemplateState

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

	AddConnection(string) error
	DelConnection(string) error

	CreateState([]byte, asymmetric.IPrivKey) error
	UpdateState([]byte) error
	ClearActiveState() error
}

func NewState

func NewState(
	pStorage storage.IKeyValueStorage,
	pDatabase database.IWrapperDB,
	pHlsClient hls_client.IClient,
	pHltClient hlt_client.IClient,
	pPathTo string,
) IState

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