audit

package
v0.42.1 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2024 License: GPL-3.0 Imports: 8 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 Audit 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 NewFromMorph added in v0.28.0

func NewFromMorph(cli *client.Client, contract util.Uint160, fee fixedn.Fixed8, opts ...client.StaticClientOption) (*Client, error)

NewFromMorph returns the wrapper instance from the raw morph client.

func (*Client) GetAuditResult

func (c *Client) GetAuditResult(id ResultID) (*auditAPI.Result, error)

GetAuditResult returns audit result structure stored in audit contract.

func (*Client) ListAllAuditResultID added in v0.28.0

func (c *Client) ListAllAuditResultID() ([]ResultID, error)

ListAllAuditResultID returns a list of all audit result IDs inside audit contract.

func (*Client) ListAuditResultIDByCID added in v0.28.0

func (c *Client) ListAuditResultIDByCID(epoch uint64, cnr cid.ID) ([]ResultID, error)

ListAuditResultIDByCID returns a list of audit result IDs inside audit contract for specific epoch number and container ID.

func (*Client) ListAuditResultIDByEpoch added in v0.28.0

func (c *Client) ListAuditResultIDByEpoch(epoch uint64) ([]ResultID, error)

ListAuditResultIDByEpoch returns a list of audit result IDs inside audit contract for specific epoch number.

func (*Client) ListAuditResultIDByNode added in v0.28.0

func (c *Client) ListAuditResultIDByNode(epoch uint64, cnr cid.ID, nodeKey []byte) ([]ResultID, error)

ListAuditResultIDByNode returns a list of audit result IDs inside audit contract for specific epoch number, container ID and inner ring public key.

func (*Client) PutAuditResult

func (c *Client) PutAuditResult(p PutPrm) error

PutAuditResult saves passed audit result structure in NeoFS system through Audit contract call.

Returns encountered error that caused the saving to interrupt.

type PutPrm added in v0.28.0

type PutPrm struct {
	client.InvokePrmOptional
	// contains filtered or unexported fields
}

PutPrm groups parameters of PutAuditResult operation.

func (*PutPrm) SetResult added in v0.28.0

func (p *PutPrm) SetResult(result *auditAPI.Result)

SetResult sets audit result.

type ResultID added in v0.28.0

type ResultID []byte

ResultID is an identity of audit result inside audit contract.

Jump to

Keyboard shortcuts

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