Documentation
¶
Index ¶
- func Apply(body, query, header []byte) ([]byte, []byte, []byte, error)
- func Clear()
- func Register(kind MutationKind, path string, value interface{})
- type JSONAnyFlag
- type JSONBoolFlag
- type JSONConfig
- type JSONDateFlag
- type JSONDatetimeFlag
- type JSONFileFlag
- type JSONFloatFlag
- type JSONIntFlag
- type JSONStringFlag
- type JsonDateValueCreator
- type JsonFileValueCreator
- type JsonValueCreator
- type Mutation
- type MutationKind
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(kind MutationKind, path string, value interface{})
Types ¶
type JSONAnyFlag ¶
type JSONAnyFlag = cli.FlagBase[interface{}, JSONConfig, JsonValueCreator[interface{}]]
type JSONBoolFlag ¶
type JSONBoolFlag = cli.FlagBase[bool, JSONConfig, JsonValueCreator[bool]]
type JSONConfig ¶
type JSONConfig struct {
Kind MutationKind
Path string
// For boolean flags that set a specific value when present
SetValue interface{}
}
type JSONDateFlag ¶
type JSONDateFlag = cli.FlagBase[time.Time, JSONConfig, JsonDateValueCreator]
type JSONDatetimeFlag ¶
type JSONDatetimeFlag = cli.FlagBase[time.Time, JSONConfig, JsonValueCreator[time.Time]]
type JSONFileFlag ¶
type JSONFileFlag = cli.FlagBase[string, JSONConfig, JsonFileValueCreator]
type JSONFloatFlag ¶
type JSONFloatFlag = cli.FlagBase[float64, JSONConfig, JsonValueCreator[float64]]
type JSONIntFlag ¶
type JSONIntFlag = cli.FlagBase[int, JSONConfig, JsonValueCreator[int]]
type JSONStringFlag ¶
type JSONStringFlag = cli.FlagBase[string, JSONConfig, JsonValueCreator[string]]
type JsonDateValueCreator ¶
type JsonDateValueCreator struct{}
JsonDateValueCreator is a specialized creator for date-only values
func (JsonDateValueCreator) Create ¶
func (c JsonDateValueCreator) Create(val time.Time, dest *time.Time, config JSONConfig) cli.Value
type JsonFileValueCreator ¶
type JsonFileValueCreator struct{}
JsonFileValueCreator handles file-based flags that read content and register with mutations
func (JsonFileValueCreator) Create ¶
func (c JsonFileValueCreator) Create(val string, dest *string, config JSONConfig) cli.Value
func (JsonFileValueCreator) ToString ¶
func (c JsonFileValueCreator) ToString(val string) string
type JsonValueCreator ¶
type JsonValueCreator[T any] struct{}
func (JsonValueCreator[T]) Create ¶
func (c JsonValueCreator[T]) Create(val T, dest *T, config JSONConfig) cli.Value
func (JsonValueCreator[T]) ToString ¶
func (c JsonValueCreator[T]) ToString(val T) string
type Mutation ¶
type Mutation struct {
Kind MutationKind
Path string
Value interface{}
}
type MutationKind ¶
type MutationKind string
const ( Body MutationKind = "body" Query MutationKind = "query" Header MutationKind = "header" )
Click to show internal directories.
Click to hide internal directories.