Documentation ¶
Overview ¶
shorthand package contains the interfaces used by chronogen create shorthand support.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Creator ¶
type Creator[T any] interface { // AddFlags registers the flags on the command. Note that we cannot // set any of the shorthand commands to be required, as we want // to allow `-f` usage. AddFlags(*cobra.Command) // GenerateSpec parses the flag inputs and returns a spec to create the object. GenerateSpec() (T, error) // IsEmpty determines if the feature flags have been used. // If they aren't, then we go ahead and use the file input. IsEmpty() bool }
Creator is the interface for creating entities using CLI flags. All custom logic for parsing flags must go into CreateObject.
func NewMutingRule ¶
func NewMutingRule() Creator[*models.Configv1MutingRule]
NewMutingRule returns a new shorthand create for muting rules
Click to show internal directories.
Click to hide internal directories.