Documentation
¶
Index ¶
- Variables
- func NewCompletionCmd() *cobra.Command
- func NewDockerCmd(rootOpts *RootOptions, rootFlags *pflag.FlagSet) *cobra.Command
- func NewImagesCmd(rootOpts *RootOptions, rootFlags *pflag.FlagSet) *cobra.Command
- func NewKubernetesCmd(rootOpts *RootOptions, rootFlags *pflag.FlagSet) *cobra.Command
- func NewKubernetesInClusterCmd(rootOpts *RootOptions, rootFlags *pflag.FlagSet) *cobra.Command
- func RootOptionsLevelValidation(level validator.StructLevel)
- func Start()
- type ConfigOptions
- type KubeOptions
- type OutputOptions
- type RepoOptions
- type RootCmd
- type RootOptions
Constants ¶
This section is empty.
Variables ¶
var Sensitive = []string{
"HOME",
}
Sensitive is a list of sensitive environment variable to replace into the help outputs.
Functions ¶
func NewDockerCmd ¶
func NewDockerCmd(rootOpts *RootOptions, rootFlags *pflag.FlagSet) *cobra.Command
NewDockerCmd creates the `driverkit docker` command.
func NewImagesCmd ¶ added in v0.12.0
func NewImagesCmd(rootOpts *RootOptions, rootFlags *pflag.FlagSet) *cobra.Command
NewImagesCmd creates the `driverkit images` command.
func NewKubernetesCmd ¶
func NewKubernetesCmd(rootOpts *RootOptions, rootFlags *pflag.FlagSet) *cobra.Command
NewKubernetesCmd creates the `driverkit kubernetes` command.
func NewKubernetesInClusterCmd ¶ added in v0.9.7
func NewKubernetesInClusterCmd(rootOpts *RootOptions, rootFlags *pflag.FlagSet) *cobra.Command
NewKubernetesInClusterCmd creates the `driverkit kubernetes` command.
func RootOptionsLevelValidation ¶
func RootOptionsLevelValidation(level validator.StructLevel)
RootOptionsLevelValidation validates KernelConfigData and Target at the same time.
It reports an error when `KernelConfigData` is empty and `Target` is `vanilla`.
Types ¶
type ConfigOptions ¶
type ConfigOptions struct {
ConfigFile string
LogLevel string `validate:"logrus" name:"log level" default:"info"`
Timeout int `validate:"number,min=30" default:"120" name:"timeout"`
ProxyURL string `validate:"omitempty,proxy" name:"proxy url"`
DryRun bool
// contains filtered or unexported fields
}
ConfigOptions represent the persistent configuration flags of driverkit.
func NewConfigOptions ¶
func NewConfigOptions() *ConfigOptions
NewConfigOptions creates an instance of ConfigOptions.
func (*ConfigOptions) Validate ¶
func (co *ConfigOptions) Validate() []error
Validate validates the ConfigOptions fields.
type KubeOptions ¶ added in v0.9.7
type OutputOptions ¶
type OutputOptions struct {
Module string `validate:"required_without=Probe,filepath,omitempty,endswith=.ko" name:"output module path"`
Probe string `validate:"required_without=Module,filepath,omitempty,endswith=.o" name:"output probe path"`
}
OutputOptions wraps the two drivers that driverkit builds.
type RepoOptions ¶ added in v0.10.0
type RootCmd ¶
type RootCmd struct {
// contains filtered or unexported fields
}
RootCmd wraps the main cobra.Command.
func (*RootCmd) StripSensitive ¶
func (r *RootCmd) StripSensitive()
StripSensitive removes sensistive info from default values printed into the help messages.
type RootOptions ¶
type RootOptions struct {
Architecture string `validate:"required,architecture" name:"architecture"`
DriverVersion string `default:"master" validate:"eq=master|sha1|semver" name:"driver version"`
KernelVersion string `default:"1" validate:"omitempty" name:"kernel version"`
ModuleDriverName string `default:"falco" validate:"max=60" name:"kernel module driver name"`
ModuleDeviceName string `default:"falco" validate:"excludes=/,max=255" name:"kernel module device name"`
KernelRelease string `validate:"required,ascii" name:"kernel release"`
Target string `validate:"required,target" name:"target"`
KernelConfigData string `validate:"omitempty,base64" name:"kernel config data"` // fixme > tag "name" does not seem to work when used at struct level, but works when used at inner level
BuilderImage string `validate:"omitempty,imagename" name:"builder image"`
BuilderRepos []string `` /* 205-byte string literal not displayed */
GCCVersion string `validate:"omitempty,semvertolerant" name:"gcc version"`
KernelUrls []string `name:"kernel header urls"`
Repo RepoOptions
Output OutputOptions
}
RootOptions ...
func (*RootOptions) Log ¶
func (ro *RootOptions) Log()
Log emits a log line containing the receiving RootOptions for debugging purposes.
Call it only after validation.
func (*RootOptions) Validate ¶
func (ro *RootOptions) Validate() []error
Validate validates the RootOptions fields.