util

package
v0.12.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2020 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type CommonPrm

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

func CommonPrmFromV2

func CommonPrmFromV2(req interface {
	GetMetaHeader() *session.RequestMetaHeader
}) *CommonPrm

func (*CommonPrm) LocalOnly

func (p *CommonPrm) LocalOnly() bool

func (*CommonPrm) SessionToken

func (p *CommonPrm) SessionToken() *token.SessionToken

func (*CommonPrm) WithLocalOnly

func (p *CommonPrm) WithLocalOnly(v bool) *CommonPrm

func (*CommonPrm) WithSessionToken

func (p *CommonPrm) WithSessionToken(token *token.SessionToken) *CommonPrm

type KeyStorage

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

KeyStorage represents private key storage of the local node.

func NewKeyStorage

func NewKeyStorage(localKey *ecdsa.PrivateKey, tokenStore *storage.TokenStore) *KeyStorage

NewKeyStorage creates, initializes and returns new KeyStorage instance.

func (*KeyStorage) GetKey

func (s *KeyStorage) GetKey(token *token.SessionToken) (*ecdsa.PrivateKey, error)

GetKey returns private key of the node.

If token is not nil, session private key is returned. Otherwise, node private key is returned.

type RangeTraverser

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

func NewRangeTraverser

func NewRangeTraverser(originSize uint64, rightElement *object.Object, rngSeek *objectSDK.Range) *RangeTraverser

func (*RangeTraverser) Next

func (c *RangeTraverser) Next() (id *objectSDK.ID, rng *objectSDK.Range)

func (*RangeTraverser) PushHeader

func (c *RangeTraverser) PushHeader(obj *object.Object)

func (*RangeTraverser) PushSuccessSize

func (c *RangeTraverser) PushSuccessSize(sz uint64)

func (*RangeTraverser) SetSeekRange

func (c *RangeTraverser) SetSeekRange(r *objectSDK.Range)

SetSeekRange moves the chain to the specified range. The range is expected to be within the filled chain.

Jump to

Keyboard shortcuts

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