Documentation
¶
Index ¶
- Constants
- func AskForInput(message string) string
- func AskForSecret(message string) string
- func CommaSeparated(values []string) string
- func ConfirmAction(action, resource, id string, force bool)
- func ConfirmTextInput(action, resource, inputName, shouldMatchValue string)
- func ConstructMetadata(m *common.Metadata) map[string]string
- func ErrorMessage(msg string, err error) string
- func ExitWithError(errMsg string, err error)
- func ExitWithNotFoundError(errMsg string, err error)
- func ExitWithWarning(warnMsg string)
- func FooterMessage(msg string) string
- func GetState(cmd *cobra.Command) common.ActiveStateEnum
- func NewTable(cols ...table.Column) table.Model
- func NewTabular(rows ...[]string) table.Model
- func NewUUIDColumn() table.Column
- func PrintSuccessTable(cmd *cobra.Command, id string, t table.Model)
- func ReadFromArgsOrPipe(args []string, pipe *os.File) []byte
- func ReadFromFile(filePath string) []byte
- func ReadFromPipe(in *os.File) []byte
- func SuccessMessage(msg string) string
- func TermWidth() int
- func WarningMessage(msg string) string
- type Color
- type FlagHelper
- func (f FlagHelper) GetOptionalBool(flag string) bool
- func (f FlagHelper) GetOptionalString(flag string) string
- func (f FlagHelper) GetRequiredBool(flag string) bool
- func (f FlagHelper) GetRequiredInt32(flag string) int32
- func (f FlagHelper) GetRequiredString(flag string) string
- func (f FlagHelper) GetStringSlice(flag string, v []string, opts FlagHelperStringSliceOptions) []string
- type FlagHelperStringSliceOptions
- type Printer
- type SimpleAttribute
- type SimpleAttributeValue
Constants ¶
View Source
const ( // top level actions ActionGet = "get" ActionList = "list" ActionCreate = "create" ActionUpdate = "update" ActionUpdateUnsafe = "unsafely update" ActionDeactivate = "deactivate" ActionReactivate = "reactivate" ActionDelete = "delete" // text input names InputNameFQN = "fully qualified name (FQN)" InputNameFQNUpdated = "deprecated fully qualified name (FQN) being altered" )
Variables ¶
This section is empty.
Functions ¶
func AskForInput ¶ added in v0.10.0
func AskForSecret ¶ added in v0.10.0
func CommaSeparated ¶
func ConfirmAction ¶
func ConfirmTextInput ¶
func ConfirmTextInput(action, resource, inputName, shouldMatchValue string)
func ErrorMessage ¶
func ExitWithError ¶
func ExitWithNotFoundError ¶
func ExitWithWarning ¶
func ExitWithWarning(warnMsg string)
func FooterMessage ¶
func GetState ¶
func GetState(cmd *cobra.Command) common.ActiveStateEnum
Transforms into enum value and defaults to active state
func NewTabular ¶
func NewUUIDColumn ¶
func ReadFromFile ¶
func ReadFromPipe ¶
func SuccessMessage ¶
func WarningMessage ¶
Types ¶
type Color ¶
type Color struct { Foreground lipgloss.CompleteAdaptiveColor Background lipgloss.CompleteAdaptiveColor }
type FlagHelper ¶
type FlagHelper struct {
// contains filtered or unexported fields
}
func NewFlagHelper ¶
func NewFlagHelper(cmd *cobra.Command) *FlagHelper
func (FlagHelper) GetOptionalBool ¶
func (f FlagHelper) GetOptionalBool(flag string) bool
func (FlagHelper) GetOptionalString ¶
func (f FlagHelper) GetOptionalString(flag string) string
func (FlagHelper) GetRequiredBool ¶
func (f FlagHelper) GetRequiredBool(flag string) bool
func (FlagHelper) GetRequiredInt32 ¶
func (f FlagHelper) GetRequiredInt32(flag string) int32
func (FlagHelper) GetRequiredString ¶
func (f FlagHelper) GetRequiredString(flag string) string
func (FlagHelper) GetStringSlice ¶
func (f FlagHelper) GetStringSlice(flag string, v []string, opts FlagHelperStringSliceOptions) []string
type Printer ¶ added in v0.10.0
type Printer struct {
// contains filtered or unexported fields
}
func NewPrinter ¶ added in v0.10.0
type SimpleAttribute ¶
type SimpleAttribute struct { Id string Name string Rule string Values []string Namespace string Active string Metadata map[string]string }
func GetSimpleAttribute ¶
func GetSimpleAttribute(a *policy.Attribute) SimpleAttribute
type SimpleAttributeValue ¶
func GetSimpleAttributeValue ¶
func GetSimpleAttributeValue(v *policy.Value) SimpleAttributeValue
Click to show internal directories.
Click to hide internal directories.