Versions in this module Expand all Collapse all v1 v1.1.0 Nov 28, 2023 Changes in this version + func AddFlags(cmd *cobra.Command, desc FlagDesc) + func AddQueryCmd[Q proto.Message, querier any](cmd *cobra.Command, newQueryClientFn func(grpc1.ClientConn) querier, ...) + func AddTxCmd[M sdk.Msg](cmd *cobra.Command, f func() (*TxCliDesc, M)) + func BuildQueryCli[reqP proto.Message, querier any](desc *QueryDescriptor, newQueryClientFn func(grpc1.ClientConn) querier) *cobra.Command + func BuildTxCli[M sdk.Msg](desc *TxCliDesc) *cobra.Command + func FormatLongDesc(longString string, meta *LongMetadata) string + func FormatLongDescDirect(longString, moduleName string) string + func GetParams[reqP proto.Message, querier any](moduleName string, newQueryClientFn func(grpc1.ClientConn) querier) *cobra.Command + func IndexCmd(moduleName string) *cobra.Command + func ParseCoin(arg, fieldName string) (sdk.Coin, error) + func ParseCoins(arg, fieldName string) (sdk.Coins, error) + func ParseDenom(arg, _ string) (string, error) + func ParseExpectedQueryFnName[reqP any]() string + func ParseField(v reflect.Value, t reflect.Type, fieldIndex int, arg string, ...) (bool, error) + func ParseFieldFromArg(fVal reflect.Value, fType reflect.StructField, arg string) error + func ParseFieldFromFlag(fVal reflect.Value, fType reflect.StructField, flagAdvice FlagAdvice, ...) (bool, error) + func ParseFieldsFromFlagsAndArgs[reqP any](flagAdvice FlagAdvice, flags *pflag.FlagSet, args []string) (reqP, error) + func ParseFloat(arg, fieldName string) (float64, error) + func ParseHasPagination[reqP any]() bool + func ParseInt(arg, fieldName string) (int64, error) + func ParseIntMaybeNegative(arg, fieldName string) (int64, error) + func ParseNumFields[reqP any]() int + func ParseSdkDec(arg, fieldName string) (sdk.Dec, error) + func ParseSdkInt(arg, fieldName string) (math.Int, error) + func ParseUint(arg, fieldName string) (uint64, error) + func ParseUnixTime(arg, fieldName string) (time.Time, error) + func QueryIndexCmd(moduleName string) *cobra.Command + func RunQueryTestCase[Q proto.Message](t *testing.T, desc *QueryDescriptor, tc QueryCliTestCase[Q]) + func RunQueryTestCases[Q proto.Message](t *testing.T, desc *QueryDescriptor, testcases map[string]QueryCliTestCase[Q]) + func RunTxTestCase[M sdk.Msg](t *testing.T, desc *TxCliDesc, tc TxCliTestCase[M]) + func RunTxTestCases[M sdk.Msg](t *testing.T, desc *TxCliDesc, testcases map[string]TxCliTestCase[M]) + func SimpleQueryCmd[reqP proto.Message, querier any](use, short, long string, moduleName string, ...) *cobra.Command + func TxIndexCmd(moduleName string) *cobra.Command + type CustomFieldParserFn = func(arg string, flags *pflag.FlagSet) (valueToSet any, usedArg FieldReadLocation, err error) + func FlagOnlyParser[v any](f func(fs *pflag.FlagSet) (v, error)) CustomFieldParserFn + type FieldReadLocation = bool + const UsedArg + const UsedFlag + func ParseUintArray(arg string, _ *pflag.FlagSet) (any, FieldReadLocation, error) + type FlagAdvice struct + CustomFieldParsers map[string]CustomFieldParserFn + CustomFlagOverrides map[string]string + FromValue string + HasPagination bool + IsTx bool + TxSenderFieldName string + func (f FlagAdvice) Sanitize() FlagAdvice + type FlagDesc struct + OptionalFlags []*pflag.FlagSet + RequiredFlags []*pflag.FlagSet + type LongMetadata struct + BinaryName string + CommandPrefix string + ExampleHeader string + Short string + func NewLongMetadata(moduleName string) *LongMetadata + func (m *LongMetadata) WithShort(short string) *LongMetadata + type QueryCliTestCase struct + Cmd string + ExpectedErr bool + ExpectedQuery Q + type QueryDescriptor struct + CustomFieldParsers map[string]CustomFieldParserFn + CustomFlagOverrides map[string]string + Flags FlagDesc + HasPagination bool + Long string + ModuleName string + ParseQuery func(args []string, flags *pflag.FlagSet) (proto.Message, error) + QueryFnName string + Short string + Use string + func (desc *QueryDescriptor) FormatLong(moduleName string) + type TxCliDesc struct + CustomFieldParsers map[string]CustomFieldParserFn + CustomFlagOverrides map[string]string + Example string + Flags FlagDesc + Long string + NumArgs int + ParseAndBuildMsg func(clientCtx client.Context, args []string, flags *pflag.FlagSet) (sdk.Msg, error) + Short string + TxSignerFieldName string + Use string + func (desc TxCliDesc) BuildCommandCustomFn() *cobra.Command + type TxCliTestCase struct + Cmd string + ExpectedErr bool + ExpectedMsg M + OnlyCheckValidateBasic bool Other modules containing this package github.com/neutron-org/neutron/v2 github.com/neutron-org/neutron/v3 github.com/neutron-org/neutron/v4 github.com/neutron-org/neutron/v5