neofsid

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2021 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is a wrapper over StaticClient which makes calls with the names and arguments of the NeoFS ID contract.

Working client must be created via constructor New. Using the Client that has been created with new(Client) expression (or just declaring a Client variable) is unsafe and can lead to panic.

func New

func New(c *client.StaticClient, opts ...Option) *Client

New creates, initializes and returns the Client instance.

If StaticClient is nil, panic occurs.

Other values are set according to provided options, or by default:

  • key listing method name: key.

If desired option satisfies the default value, it can be omitted. If multiple options of the same config value are supplied, the option with the highest index in the arguments will be used.

func (*Client) AccountKeys

func (x *Client) AccountKeys(args KeyListingArgs) (*KeyListingValues, error)

AccountKeys requests public keys of NeoFS account through method of NeoFS ID contract.

type KeyListingArgs

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

KeyListingArgs groups the arguments of key listing call.

func (*KeyListingArgs) SetOwnerID

func (l *KeyListingArgs) SetOwnerID(v []byte)

SetOwnerID sets the NeoFS account identifier in a binary format.

type KeyListingValues

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

KeyListingValues groups the stack parameters returned by key listing call.

func (*KeyListingValues) Keys

func (l *KeyListingValues) Keys() [][]byte

Keys returns the list of account keys in a binary format.

type Option

type Option func(*cfg)

Option is a client configuration change function.

func WithKeyListingMethod

func WithKeyListingMethod(n string) Option

WithKeyListingMethod returns a client constructor option that specifies the method name of key listing operation.

Ignores empty value.

If option not provided, "key" is used.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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