neofsid

package
v0.25.1 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 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 AddKeysArgs added in v0.21.0

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

AddKeysArgs groups the arguments of key binding call.

func (*AddKeysArgs) SetKeys added in v0.21.0

func (x *AddKeysArgs) SetKeys(v [][]byte)

SetKeys sets list of public keys in a binary format.

func (*AddKeysArgs) SetOwnerID added in v0.21.0

func (x *AddKeysArgs) SetOwnerID(v []byte)

SetOwnerID sets NeoFS account identifier.

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.

func (*Client) AddKeys added in v0.21.0

func (x *Client) AddKeys(args AddKeysArgs) error

AddKeys invokes the call of key adding method of NeoFS contract.

func (*Client) RemoveKeys added in v0.21.0

func (x *Client) RemoveKeys(args RemoveKeysArgs) error

RemoveKeys invokes the call of key removing method of NeoFS 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 WithAddKeysMethod added in v0.21.0

func WithAddKeysMethod(n string) Option

WithAddKeysMethod returns a client constructor option that specifies the method name of adding key operation.

Ignores empty value.

If option not provided, "addKey" is used.

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.

func WithRemoveKeysMethod added in v0.21.0

func WithRemoveKeysMethod(n string) Option

WithRemoveKeysMethod returns a client constructor option that specifies the method name of removing key operation.

Ignores empty value.

If option not provided, "removeKey" is used.

type RemoveKeysArgs added in v0.21.0

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

RemoveKeysArgs groups the arguments of key unbinding call.

func (*RemoveKeysArgs) SetKeys added in v0.21.0

func (x *RemoveKeysArgs) SetKeys(v [][]byte)

SetKeys sets list of public keys in a binary format.

func (*RemoveKeysArgs) SetOwnerID added in v0.21.0

func (x *RemoveKeysArgs) SetOwnerID(v []byte)

SetOwnerID sets NeoFS account identifier.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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