ir

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2020 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const ErrNilStorage = internal.Error("inner ring storage is nil")

ErrNilStorage is returned by functions that expect a non-nil Storage, but received nil.

Variables

This section is empty.

Functions

func BinaryKeyList

func BinaryKeyList(storage Storage) ([][]byte, error)

BinaryKeyList returns the list of binary public key of IR nodes.

If passed Storage is nil, ErrNilStorage returns.

func IsInnerRingKey

func IsInnerRingKey(storage Storage, key []byte) (bool, error)

IsInnerRingKey checks if the passed argument is the key of one of IR nodes.

Uses BinaryKeyList function to receive the key list of IR nodes internally.

If passed key slice is empty, crypto.ErrEmptyPublicKey returns immediately.

Types

type GetInfoParams

type GetInfoParams struct {
}

GetInfoParams is a structure that groups the parameters for IR info receiving operation.

type GetInfoResult

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

GetInfoResult is a structure that groups values returned by IR info receiving operation.

func (GetInfoResult) Info

func (s GetInfoResult) Info() Info

Info is an IR info getter.

func (*GetInfoResult) SetInfo

func (s *GetInfoResult) SetInfo(v Info)

SetInfo is an IR info setter.

type Info

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

Info is a structure that groups the information about inner ring.

func (Info) Nodes

func (s Info) Nodes() []Node

Nodes is an IR node list getter.

func (*Info) SetNodes

func (s *Info) SetNodes(v []Node)

SetNodes is an IR node list setter.

type Node

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

Node is a structure that groups the information about IR node.

func (Node) Key

func (s Node) Key() []byte

Key is an IR node public key getter.

func (*Node) SetKey

func (s *Node) SetKey(v []byte)

SetKey is an IR node public key setter.

type Storage

type Storage interface {
	GetIRInfo(GetInfoParams) (*GetInfoResult, error)
}

Storage is an interface of the storage of info about NeoFS IR.

Jump to

Keyboard shortcuts

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