subnetevents

package
v0.0.0-...-79ba347 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Put

type Put interface {

	// ReadCreator reads the user ID of the subnet creator.
	// Returns an error if the ID is missing.
	ReadCreator(id *user.ID) error

	// ReadInfo reads information about a subnet to be created.
	ReadInfo(info *subnet.Info) error
	// contains filtered or unexported methods
}

Put represents a notification about FrostFS subnet creation. Generated by a contract when intending to create a subnet.

type PutValidator

type PutValidator struct{}

PutValidator asserts intent to create a subnet.

func (PutValidator) Assert

func (x PutValidator) Assert(event Put) error

Assert processes the attempt to create a subnet. It approves the creation through nil return.

All read errors of Put are forwarded.

It returns an error on:

  • zero subnet creation;
  • empty ID or different from the one wired into info;
  • empty owner ID or different from the one wired into info.

Jump to

Keyboard shortcuts

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