util

package
v0.36.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2023 License: GPL-3.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &cobra.Command{
	Use:   "util",
	Short: "Utility operations",
	PersistentPreRun: func(cmd *cobra.Command, args []string) {
		flags := cmd.Flags()

		_ = viper.BindPFlag(commonflags.GenerateKey, flags.Lookup(commonflags.GenerateKey))
		_ = viper.BindPFlag(commonflags.WalletPath, flags.Lookup(commonflags.WalletPath))
		_ = viper.BindPFlag(commonflags.Account, flags.Lookup(commonflags.Account))
	},
}

Functions

func ParseEACLRule

func ParseEACLRule(table *eacl.Table, rule string) error

ParseEACLRule parses eACL table from the following form: <action> <operation> [<filter1> ...] [<target1> ...]

Examples: allow get req:X-Header=123 obj:Attr=value others:0xkey1,key2 system:key3 user:key4

func ParseEACLRules

func ParseEACLRules(table *eacl.Table, rules []string) error

ParseEACLRules parses eACL table. Uses ParseEACLRule.

func PrettyPrintTableBACL

func PrettyPrintTableBACL(cmd *cobra.Command, bacl *acl.Basic)

PrettyPrintTableBACL print basic ACL in table format.

func PrettyPrintTableEACL

func PrettyPrintTableEACL(cmd *cobra.Command, table *eacl.Table)

PrettyPrintTableEACL print extended ACL in table format.

Types

This section is empty.

Jump to

Keyboard shortcuts

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