flags

package
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 5, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileArg

func FileArg(cmd *cobra.Command, args []string) error

Types

type ClientMode

type ClientMode types.ClientMode

configMode is a custom type for use as a CLI flag representing the type of config mode being applied

func (*ClientMode) AsClientMode

func (i *ClientMode) AsClientMode() types.ClientMode

func (*ClientMode) Set

func (i *ClientMode) Set(c string) error

func (*ClientMode) String

func (i *ClientMode) String() string

func (*ClientMode) Type

func (i *ClientMode) Type() string

type RuleInfoFlags

type RuleInfoFlags struct {
	RuleType   *RuleType
	Identifier *string
	FilePath   *string
}

func (*RuleInfoFlags) AddRuleInfoFlags

func (r *RuleInfoFlags) AddRuleInfoFlags(cmd *cobra.Command)

type RulePolicy

type RulePolicy types.Policy

rulePolicy is a custom type for use as a CLI flag representing the type of rule policy being applied

func (*RulePolicy) AsRulePolicy

func (i *RulePolicy) AsRulePolicy() types.Policy

func (*RulePolicy) Set

func (i *RulePolicy) Set(s string) error

func (*RulePolicy) String

func (i *RulePolicy) String() string

func (*RulePolicy) Type

func (i *RulePolicy) Type() string

type RuleTargetFlags

type RuleTargetFlags struct {
	RuleTypeArg  types.RuleType
	IsGlobal     bool
	MachineIdArg string
	SHA256Arg    string
	FilepathArg  string
}

type RuleType

type RuleType types.RuleType

ruleType is a custom type for use as a CLI flag representing the type of rule being applied

func (*RuleType) AsRuleType

func (i *RuleType) AsRuleType() types.RuleType

func (*RuleType) Set

func (i *RuleType) Set(s string) error

func (*RuleType) String

func (i *RuleType) String() string

func (*RuleType) Type

func (i *RuleType) Type() string

type RuleUpdateFlags

type RuleUpdateFlags struct {
	RulePolicy *RulePolicy
}

func (*RuleUpdateFlags) AddRuleUpdateFlags

func (r *RuleUpdateFlags) AddRuleUpdateFlags(cmd *cobra.Command)

type TargetFlags

type TargetFlags struct {
	MachineID     string
	IsGlobal      bool
	SelfMachineID string
}

func (*TargetFlags) AddTargetFlags

func (t *TargetFlags) AddTargetFlags(cmd *cobra.Command)

func (*TargetFlags) AddTargetFlagsRules

func (t *TargetFlags) AddTargetFlagsRules(cmd *cobra.Command)

func (TargetFlags) GetMachineID

func (t TargetFlags) GetMachineID() (string, error)

func (TargetFlags) IsTargetSelf

func (t TargetFlags) IsTargetSelf() bool

WARNING: This is best-effort as if you don't call getSelfMachineID first, it'll just always return false.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL