Documentation ¶
Index ¶
- Constants
- Variables
- func AddDeploymentFilterFlags(flags *pflag.FlagSet)
- func AddDeploymentIDFlags(flags *pflag.FlagSet, opts ...DeploymentIDOption)
- func AddDepositorFlag(flags *pflag.FlagSet)
- func AddGroupIDFlags(flags *pflag.FlagSet, opts ...DeploymentIDOption)
- func CurrentBlockHeight(ctx client.Context) (uint64, error)
- func DepFiltersFromFlags(flags *pflag.FlagSet) (types.DeploymentFilters, error)
- func DeploymentIDFromFlags(flags *pflag.FlagSet, opts ...MarketOption) (types.DeploymentID, error)
- func DeploymentIDFromFlagsForOwner(flags *pflag.FlagSet, owner sdk.Address) (types.DeploymentID, error)
- func DepositorFromFlags(flags *pflag.FlagSet, owner string) (string, error)
- func GetQueryCmd() *cobra.Command
- func GetTxCmd(key string) *cobra.Command
- func GroupIDFromFlags(flags *pflag.FlagSet, opts ...MarketOption) (types.GroupID, error)
- func MarkReqDeploymentIDFlags(cmd *cobra.Command, opts ...DeploymentIDOption)
- func MarkReqGroupIDFlags(cmd *cobra.Command, opts ...DeploymentIDOption)
- func QueryDeploymentExec(clientCtx client.Context, id types.DeploymentID, extraArgs ...string) (sdktest.BufferWriter, error)
- func QueryDeploymentsExec(clientCtx client.Context, extraArgs ...string) (sdktest.BufferWriter, error)
- func QueryGroupExec(clientCtx client.Context, id types.GroupID, extraArgs ...string) (sdktest.BufferWriter, error)
- func TxCloseDeploymentExec(clientCtx client.Context, from fmt.Stringer, extraArgs ...string) (sdktest.BufferWriter, error)
- func TxCloseGroupExec(clientCtx client.Context, groupID types.GroupID, from fmt.Stringer, ...) (sdktest.BufferWriter, error)
- func TxCreateDeploymentExec(clientCtx client.Context, from fmt.Stringer, filePath string, ...) (sdktest.BufferWriter, error)
- func TxDepositDeploymentExec(clientCtx client.Context, deposit sdk.Coin, from fmt.Stringer, ...) (sdktest.BufferWriter, error)
- func TxGrantAuthorizationExec(clientCtx client.Context, granter, grantee sdk.AccAddress, extraArgs ...string) (sdktest.BufferWriter, error)
- func TxRevokeAuthorizationExec(clientCtx client.Context, granter, grantee sdk.AccAddress, extraArgs ...string) (sdktest.BufferWriter, error)
- func TxUpdateDeploymentExec(clientCtx client.Context, from fmt.Stringer, filePath string, ...) (sdktest.BufferWriter, error)
- type DeploymentIDOption
- type DeploymentIDOptions
- type MarketOption
- type MarketOptions
Constants ¶
const ( FlagDepositorAccount = "depositor-account" FlagExpiration = "expiration" )
Variables ¶
var ( ErrStateValue = errors.New("query: invalid state value") DefaultDeposit = types.DefaultDeploymentMinDeposit )
Functions ¶
func AddDeploymentFilterFlags ¶
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 ¶
AddDepositorFlag adds the `--depositor-account` flag
func AddGroupIDFlags ¶
func AddGroupIDFlags(flags *pflag.FlagSet, opts ...DeploymentIDOption)
AddGroupIDFlags add flags for Group
func CurrentBlockHeight ¶
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 ¶
DepositorFromFlags returns the depositor account if one was specified in flags, otherwise it returns the owner's account.
func GetQueryCmd ¶
GetQueryCmd returns the query commands for the deployment module
func GroupIDFromFlags ¶
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)
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 }