cli

package
v0.30.1-rc0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2023 License: Apache-2.0 Imports: 22 Imported by: 4

Documentation

Index

Constants

View Source
const (
	FlagDepositorAccount = "depositor-account"
	FlagExpiration       = "expiration"
)

Variables

View Source
var (
	ErrStateValue     = errors.New("query: invalid state value")
	DefaultDeposit, _ = types.DefaultParams().MinDepositFor("uakt")
)

Functions

func AddDeploymentFilterFlags

func AddDeploymentFilterFlags(flags *pflag.FlagSet)

AddDeploymentFilterFlags add flags to filter for deployment list

func AddDeploymentIDFlags

func AddDeploymentIDFlags(flags *pflag.FlagSet, opts ...DeploymentIDOption)

AddDeploymentIDFlags add flags for deployment except for Owner when NoOwner is set

func AddDepositorFlag

func AddDepositorFlag(flags *pflag.FlagSet)

AddDepositorFlag adds the `--depositor-account` flag

func AddGroupIDFlags

func AddGroupIDFlags(flags *pflag.FlagSet, opts ...DeploymentIDOption)

AddGroupIDFlags add flags for Group

func CurrentBlockHeight

func CurrentBlockHeight(ctx client.Context) (uint64, error)

CurrentBlockHeight returns current block height of node

func DepFiltersFromFlags

func DepFiltersFromFlags(flags *pflag.FlagSet) (types.DeploymentFilters, error)

DepFiltersFromFlags returns DeploymentFilters with given flags and error if occurred

func DeploymentIDFromFlags

func DeploymentIDFromFlags(flags *pflag.FlagSet, opts ...MarketOption) (types.DeploymentID, error)

DeploymentIDFromFlags returns DeploymentID with given flags, owner and error if occurred

func DeploymentIDFromFlagsForOwner

func DeploymentIDFromFlagsForOwner(flags *pflag.FlagSet, owner sdk.Address) (types.DeploymentID, error)

DeploymentIDFromFlagsForOwner returns DeploymentID with given flags, owner and error if occurred

func DepositorFromFlags

func DepositorFromFlags(flags *pflag.FlagSet, owner string) (string, error)

DepositorFromFlags returns the depositor account if one was specified in flags, otherwise it returns the owner's account.

func GetQueryCmd

func GetQueryCmd() *cobra.Command

GetQueryCmd returns the query commands for the deployment module

func GetTxCmd

func GetTxCmd(key string) *cobra.Command

GetTxCmd returns the transaction commands for this module

func GroupIDFromFlags

func GroupIDFromFlags(flags *pflag.FlagSet, opts ...MarketOption) (types.GroupID, error)

GroupIDFromFlags returns GroupID with given flags and error if occurred

func MarkReqDeploymentIDFlags

func MarkReqDeploymentIDFlags(cmd *cobra.Command, opts ...DeploymentIDOption)

MarkReqDeploymentIDFlags marks flags required except for Owner when NoOwner is set

func MarkReqGroupIDFlags

func MarkReqGroupIDFlags(cmd *cobra.Command, opts ...DeploymentIDOption)

MarkReqGroupIDFlags marks flags required for group

func QueryDeploymentExec

func QueryDeploymentExec(clientCtx client.Context, id types.DeploymentID, extraArgs ...string) (sdktest.BufferWriter, error)

QueryDeploymentExec is used for testing deployment query

func QueryDeploymentsExec

func QueryDeploymentsExec(clientCtx client.Context, extraArgs ...string) (sdktest.BufferWriter, error)

QueryDeploymentsExec is used for testing deployments query

func QueryGroupExec

func QueryGroupExec(clientCtx client.Context, id types.GroupID, extraArgs ...string) (sdktest.BufferWriter, error)

QueryGroupExec is used for testing group query

func TxCloseDeploymentExec

func TxCloseDeploymentExec(clientCtx client.Context, from fmt.Stringer, extraArgs ...string) (sdktest.BufferWriter, error)

TxCloseDeploymentExec is used for testing close deployment tx requires --dseq, --fees

func TxCloseGroupExec

func TxCloseGroupExec(clientCtx client.Context, groupID types.GroupID, from fmt.Stringer, extraArgs ...string) (sdktest.BufferWriter, error)

TxCloseGroupExec is used for testing close group tx

func TxCreateDeploymentExec

func TxCreateDeploymentExec(clientCtx client.Context, from fmt.Stringer, filePath string, extraArgs ...string) (sdktest.BufferWriter, error)

TxCreateDeploymentExec is used for testing create deployment tx

func TxDepositDeploymentExec

func TxDepositDeploymentExec(clientCtx client.Context, deposit sdk.Coin, from fmt.Stringer, extraArgs ...string) (sdktest.BufferWriter, error)

TxDepositDeploymentExec is used for testing deposit deployment tx

func TxGrantAuthorizationExec

func TxGrantAuthorizationExec(clientCtx client.Context, granter, grantee sdk.AccAddress, extraArgs ...string) (sdktest.BufferWriter, error)

func TxRevokeAuthorizationExec

func TxRevokeAuthorizationExec(clientCtx client.Context, granter, grantee sdk.AccAddress, extraArgs ...string) (sdktest.BufferWriter, error)

func TxUpdateDeploymentExec

func TxUpdateDeploymentExec(clientCtx client.Context, from fmt.Stringer, filePath string, extraArgs ...string) (sdktest.BufferWriter, error)

TxUpdateDeploymentExec is used for testing update deployment tx

Types

type DeploymentIDOption

type DeploymentIDOption func(*DeploymentIDOptions)

func DeploymentIDOptionNoOwner

func DeploymentIDOptionNoOwner(val bool) DeploymentIDOption

DeploymentIDOptionNoOwner do not add mark as required owner flag

type DeploymentIDOptions

type DeploymentIDOptions struct {
	NoOwner bool
}

type MarketOption

type MarketOption func(*MarketOptions)

func WithOwner

func WithOwner(val sdk.AccAddress) MarketOption

func WithProvider

func WithProvider(val sdk.AccAddress) MarketOption

type MarketOptions

type MarketOptions struct {
	Owner    sdk.AccAddress
	Provider sdk.AccAddress
}

Jump to

Keyboard shortcuts

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