flags

package
v0.0.0-...-989e0f7 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Implements the common flags used by multiple commands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OptionalInt32

func OptionalInt32(v int32) optional.Int32

func OptionalInt64

func OptionalInt64(v int64) optional.Int64

func OptionalString

func OptionalString(v string) optional.String

Types

type GlobalFlags

type GlobalFlags struct {
	PagingFlags
	ConfigFile string // Configuration file
	ChainId    string // Chain ID
	ParamFile  string // Param file
}

This struct holds the global flags used by all or most commands.

var Flags GlobalFlags

func (*GlobalFlags) RegisterChainIdParameter

func (f *GlobalFlags) RegisterChainIdParameter(flagSet *pflag.FlagSet)

func (*GlobalFlags) RegisterParamFileParameter

func (f *GlobalFlags) RegisterParamFileParameter(flagSet *pflag.FlagSet)

func (*GlobalFlags) RequireChainId

func (f *GlobalFlags) RequireChainId() error

func (*GlobalFlags) RequireParamFile

func (f *GlobalFlags) RequireParamFile() error

type PagingFlags

type PagingFlags struct {
	// Paging
	Page        int32
	PageSize    int32
	LastToFirst bool
}

This struct holds the global flags used by all or most commands.

func (*PagingFlags) OptionalLastToFirst

func (f *PagingFlags) OptionalLastToFirst() optional.Bool

func (*PagingFlags) OptionalPage

func (f *PagingFlags) OptionalPage() optional.Int32

func (*PagingFlags) OptionalPageSize

func (f *PagingFlags) OptionalPageSize() optional.Int32

func (*PagingFlags) RegisterPagingParams

func (f *PagingFlags) RegisterPagingParams(flagSet *pflag.FlagSet)

func (*PagingFlags) RegisterPagingReverseParams

func (f *PagingFlags) RegisterPagingReverseParams(flagSet *pflag.FlagSet)

Jump to

Keyboard shortcuts

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