storage

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2021 License: GPL-3.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("private token not found")

Functions

This section is empty.

Types

type PrivateToken

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

PrivateToken represents private session info.

func (*PrivateToken) SessionKey

func (t *PrivateToken) SessionKey() *ecdsa.PrivateKey

SessionKey returns the private session key.

type TokenStore

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

func New

func New() *TokenStore

New creates, initializes and returns a new TokenStore instance.

The elements of the instance are stored in the map.

func (*TokenStore) Create

func (*TokenStore) Get

func (s *TokenStore) Get(ownerID *owner.ID, tokenID []byte) *PrivateToken

Get returns private token corresponding to the given identifiers.

Returns nil is there is no element in storage.

Jump to

Keyboard shortcuts

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