container

package
v0.38.5 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DumpCmd = &cobra.Command{
		Use:   "dump-containers",
		Short: "Dump FrostFS containers to file",
		PreRun: func(cmd *cobra.Command, _ []string) {
			_ = viper.BindPFlag(commonflags.EndpointFlag, cmd.Flags().Lookup(commonflags.EndpointFlag))
		},
		RunE: dumpContainers,
	}

	RestoreCmd = &cobra.Command{
		Use:   "restore-containers",
		Short: "Restore FrostFS containers from file",
		PreRun: func(cmd *cobra.Command, _ []string) {
			_ = viper.BindPFlag(commonflags.AlphabetWalletsFlag, cmd.Flags().Lookup(commonflags.AlphabetWalletsFlag))
			_ = viper.BindPFlag(commonflags.EndpointFlag, cmd.Flags().Lookup(commonflags.EndpointFlag))
		},
		RunE: restoreContainers,
	}

	ListCmd = &cobra.Command{
		Use:   "list-containers",
		Short: "List FrostFS containers",
		PreRun: func(cmd *cobra.Command, _ []string) {
			_ = viper.BindPFlag(commonflags.EndpointFlag, cmd.Flags().Lookup(commonflags.EndpointFlag))
		},
		RunE: listContainers,
	}
)

Functions

This section is empty.

Types

type Container

type Container struct {
	Value     []byte `json:"value"`
	Signature []byte `json:"signature"`
	PublicKey []byte `json:"public_key"`
	Token     []byte `json:"token"`
	EACL      *EACL  `json:"eacl"`
}

Container represents container struct in contract storage.

func (*Container) FromStackItem

func (c *Container) FromStackItem(item stackitem.Item) error

FromStackItem implements stackitem.Convertible.

func (*Container) ToStackItem

func (c *Container) ToStackItem() (stackitem.Item, error)

ToStackItem implements stackitem.Convertible.

type EACL

type EACL struct {
	Value     []byte `json:"value"`
	Signature []byte `json:"signature"`
	PublicKey []byte `json:"public_key"`
	Token     []byte `json:"token"`
}

EACL represents extended ACL struct in contract storage.

func (*EACL) FromStackItem

func (c *EACL) FromStackItem(item stackitem.Item) error

FromStackItem implements stackitem.Convertible.

func (*EACL) ToStackItem

func (c *EACL) ToStackItem() (stackitem.Item, error)

ToStackItem implements stackitem.Convertible.

Jump to

Keyboard shortcuts

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