identity

package
v0.12.6 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2022 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotSupported = errors.New("Action not supported for StubMode")
	ErrMissingParam = errors.New("Paramater is missing.")
)
View Source
var File_proto_protocols_identity_proto protoreflect.FileDescriptor
View Source
var (
	PROFILE_KEY = []byte("profile")
)

Bucket Constant Keys

Functions

This section is empty.

Types

type IdentityProtocol

type IdentityProtocol struct {
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, node node.NodeImpl, options ...Option) (*IdentityProtocol, error)

New creates a new IdentityProtocol

func (*IdentityProtocol) AddRecent

func (p *IdentityProtocol) AddRecent(profile *common.Profile) error

AddRecent stores the profile for recents in desk and returns list of recent profiles

func (*IdentityProtocol) GetRecents

func (n *IdentityProtocol) GetRecents() (*common.ProfileList, error)

GetRecents returns the list of recent profiles

func (*IdentityProtocol) Peer

func (p *IdentityProtocol) Peer() (*common.Peer, error)

Peer method returns the peer of the node

func (*IdentityProtocol) Profile

func (n *IdentityProtocol) Profile() (*common.Profile, error)

Profile returns the profile for the user from diskDB

func (*IdentityProtocol) SetProfile

func (n *IdentityProtocol) SetProfile(profile *common.Profile) error

SetProfile stores the profile for the user in diskDB

type Option

type Option func(*options)

Option is a function that can be applied to IdentityProtocol config

func WithProfile

func WithProfile(profile *common.Profile) Option

WithProfile sets the profile to use

type RecentsHistory

type RecentsHistory map[string]*common.ProfileList

RecentsHistory is a list of recent Peers.

Jump to

Keyboard shortcuts

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