Documentation
¶
Index ¶
- Constants
- func ConfigDir(configDirOverride string) string
- func ConfigFilePath(context string, configDirOverride string) string
- func ExtractJSON200(response interface{}) (interface{}, error)
- func GetLastSeenDevice(ctx context.Context, c *apiclient.ClientWithResponses, name string) (interface{}, error)
- func GetRenderedDevice(ctx context.Context, c *apiclient.ClientWithResponses, name string) (interface{}, error)
- func GetSingleResource(ctx context.Context, c *apiclient.ClientWithResponses, kind, name string) (interface{}, error)
- func GetTemplateVersion(ctx context.Context, c *apiclient.ClientWithResponses, fleetName, name string) (interface{}, error)
- func NewCmdApply() *cobra.Command
- func NewCmdApprove() *cobra.Command
- func NewCmdCSRConfig() *cobra.Command
- func NewCmdCertificate() *cobra.Command
- func NewCmdCompletion() *cobra.Command
- func NewCmdConfig() *cobra.Command
- func NewCmdConfigCurrentOrganization() *cobra.Command
- func NewCmdConfigSetOrganization() *cobra.Command
- func NewCmdDecommission() *cobra.Command
- func NewCmdDelete() *cobra.Command
- func NewCmdDeny() *cobra.Command
- func NewCmdEdit() *cobra.Command
- func NewCmdEnrollmentConfig() *cobra.Command
- func NewCmdGet() *cobra.Command
- func NewCmdLogin() *cobra.Command
- func NewCmdResume() *cobra.Command
- func NewCmdVersion() *cobra.Command
- func NewConsoleCmd() *cobra.Command
- type ApplyOptions
- type ApproveOptions
- type CSRConfigOptions
- type CertificateOptions
- type CompletionOptions
- type ConfigOptions
- type ConsoleOptions
- func (o *ConsoleOptions) Bind(fs *pflag.FlagSet)
- func (o *ConsoleOptions) Complete(cmd *cobra.Command, args []string) error
- func (o *ConsoleOptions) Run(ctx context.Context, flagArgs, passThroughArgs []string) error
- func (o *ConsoleOptions) SetupTTY() k8sTerm.TTY
- func (o *ConsoleOptions) Validate(args []string) error
- type DecommissionOptions
- type DeleteOptions
- type DenyOptions
- type EditOptions
- type EnrollmentConfigOptions
- type GetOptions
- type GlobalOptions
- func (o *GlobalOptions) Bind(fs *pflag.FlagSet)
- func (o *GlobalOptions) BuildClient() (*apiclient.ClientWithResponses, error)
- func (o *GlobalOptions) Complete(cmd *cobra.Command, args []string) error
- func (o *GlobalOptions) GetEffectiveOrganization() string
- func (o *GlobalOptions) Validate(args []string) error
- func (o *GlobalOptions) ValidateCmd(args []string) error
- func (o *GlobalOptions) WithTimeout(ctx context.Context) (context.Context, context.CancelFunc)
- type LoginOptions
- type ResumeOptions
- type VersionOptions
Constants ¶
const ( CertificateSigningRequestKind = "certificatesigningrequest" DeviceKind = "device" EnrollmentRequestKind = "enrollmentrequest" EventKind = "event" FleetKind = "fleet" OrganizationKind = "organization" RepositoryKind = "repository" ResourceSyncKind = "resourcesync" TemplateVersionKind = "templateversion" )
const (
NoneString = "<none>"
)
Variables ¶
This section is empty.
Functions ¶
func ConfigFilePath ¶
func ExtractJSON200 ¶ added in v0.10.0
func ExtractJSON200(response interface{}) (interface{}, error)
ExtractJSON200 extracts the JSON200 data from a response after validating it. This function centralizes the common pattern of validating and extracting JSON200 data.
func GetLastSeenDevice ¶ added in v0.10.0
func GetLastSeenDevice(ctx context.Context, c *apiclient.ClientWithResponses, name string) (interface{}, error)
GetLastSeenDevice fetches the last seen timestamp for a device.
func GetRenderedDevice ¶ added in v0.10.0
func GetRenderedDevice(ctx context.Context, c *apiclient.ClientWithResponses, name string) (interface{}, error)
GetRenderedDevice fetches a rendered device configuration.
func GetSingleResource ¶ added in v0.10.0
func GetSingleResource(ctx context.Context, c *apiclient.ClientWithResponses, kind, name string) (interface{}, error)
GetSingleResource fetches a single resource by kind and name. This function centralizes the resource fetching logic used by both get and edit commands.
func GetTemplateVersion ¶ added in v0.10.0
func GetTemplateVersion(ctx context.Context, c *apiclient.ClientWithResponses, fleetName, name string) (interface{}, error)
GetTemplateVersion fetches a template version with the specified fleet name.
func NewCmdApply ¶
func NewCmdApprove ¶
func NewCmdCSRConfig ¶ added in v0.2.0
func NewCmdCertificate ¶ added in v0.3.0
func NewCmdCompletion ¶
func NewCmdConfig ¶ added in v0.10.0
func NewCmdConfigCurrentOrganization ¶ added in v0.10.0
NewCmdConfigCurrentOrganization creates a command to display the current organization
func NewCmdConfigSetOrganization ¶ added in v0.10.0
NewCmdConfigSetOrganization creates a command to set the current organization
func NewCmdDecommission ¶ added in v0.4.0
func NewCmdDelete ¶
func NewCmdDeny ¶
func NewCmdEdit ¶ added in v0.10.0
func NewCmdEnrollmentConfig ¶ added in v0.2.0
func NewCmdLogin ¶
func NewCmdResume ¶ added in v0.10.0
func NewCmdVersion ¶
func NewConsoleCmd ¶
Types ¶
type ApplyOptions ¶
type ApplyOptions struct {
GlobalOptions
Filenames []string
DryRun bool
Recursive bool
}
func DefaultApplyOptions ¶
func DefaultApplyOptions() *ApplyOptions
func (*ApplyOptions) Bind ¶
func (o *ApplyOptions) Bind(fs *pflag.FlagSet)
func (*ApplyOptions) Complete ¶
func (o *ApplyOptions) Complete(cmd *cobra.Command, args []string) error
func (*ApplyOptions) Validate ¶
func (o *ApplyOptions) Validate(args []string) error
type ApproveOptions ¶
type ApproveOptions struct {
GlobalOptions
ApproveLabels []string
}
func DefaultApproveOptions ¶
func DefaultApproveOptions() *ApproveOptions
func (*ApproveOptions) Bind ¶
func (o *ApproveOptions) Bind(fs *pflag.FlagSet)
func (*ApproveOptions) Complete ¶
func (o *ApproveOptions) Complete(cmd *cobra.Command, args []string) error
func (*ApproveOptions) Validate ¶
func (o *ApproveOptions) Validate(args []string) error
type CSRConfigOptions ¶ added in v0.2.0
type CSRConfigOptions struct {
GlobalOptions
CertSigningRequestFile string
Output string
Name string
ExpirationSeconds string
Overwrite bool
}
func DefaultCSRConfigOptions ¶ added in v0.2.0
func DefaultCSRConfigOptions() *CSRConfigOptions
func (*CSRConfigOptions) Bind ¶ added in v0.2.0
func (o *CSRConfigOptions) Bind(fs *pflag.FlagSet)
func (*CSRConfigOptions) Complete ¶ added in v0.2.0
func (o *CSRConfigOptions) Complete(cmd *cobra.Command, args []string) error
func (*CSRConfigOptions) Run ¶ added in v0.2.0
func (o *CSRConfigOptions) Run(ctx context.Context, args []string) error
func (*CSRConfigOptions) Validate ¶ added in v0.2.0
func (o *CSRConfigOptions) Validate(args []string) error
type CertificateOptions ¶ added in v0.3.0
type CertificateOptions struct {
GlobalOptions
Name string
Expiration string
Output string
OutputDir string
EncryptKey bool
SignerName string
}
func DefaultCertificateOptions ¶ added in v0.3.0
func DefaultCertificateOptions() *CertificateOptions
func (*CertificateOptions) Bind ¶ added in v0.3.0
func (o *CertificateOptions) Bind(fs *pflag.FlagSet)
func (*CertificateOptions) Complete ¶ added in v0.3.0
func (o *CertificateOptions) Complete(cmd *cobra.Command, args []string) error
func (*CertificateOptions) Run ¶ added in v0.3.0
func (o *CertificateOptions) Run(ctx context.Context, args []string) error
func (*CertificateOptions) Validate ¶ added in v0.3.0
func (o *CertificateOptions) Validate(args []string) error
type CompletionOptions ¶
type CompletionOptions struct {
GlobalOptions
Shell string
}
func DefaultCompletionOptions ¶
func DefaultCompletionOptions() *CompletionOptions
func (*CompletionOptions) Complete ¶
func (o *CompletionOptions) Complete(cmd *cobra.Command, args []string) error
func (*CompletionOptions) Validate ¶
func (o *CompletionOptions) Validate(args []string) error
type ConfigOptions ¶ added in v0.10.0
type ConfigOptions struct {
GlobalOptions
}
func DefaultConfigOptions ¶ added in v0.10.0
func DefaultConfigOptions() *ConfigOptions
func (*ConfigOptions) Bind ¶ added in v0.10.0
func (o *ConfigOptions) Bind(fs *pflag.FlagSet)
func (*ConfigOptions) Complete ¶ added in v0.10.0
func (o *ConfigOptions) Complete(cmd *cobra.Command, args []string) error
func (*ConfigOptions) RunCurrentOrganization ¶ added in v0.10.0
func (o *ConfigOptions) RunCurrentOrganization(ctx context.Context, args []string) error
func (*ConfigOptions) RunSetOrganization ¶ added in v0.10.0
func (o *ConfigOptions) RunSetOrganization(ctx context.Context, args []string) error
type ConsoleOptions ¶
type ConsoleOptions struct {
GlobalOptions
// contains filtered or unexported fields
}
func DefaultConsoleOptions ¶
func DefaultConsoleOptions() *ConsoleOptions
func (*ConsoleOptions) Bind ¶
func (o *ConsoleOptions) Bind(fs *pflag.FlagSet)
func (*ConsoleOptions) Complete ¶
func (o *ConsoleOptions) Complete(cmd *cobra.Command, args []string) error
func (*ConsoleOptions) Run ¶
func (o *ConsoleOptions) Run(ctx context.Context, flagArgs, passThroughArgs []string) error
func (*ConsoleOptions) SetupTTY ¶ added in v0.6.0
func (o *ConsoleOptions) SetupTTY() k8sTerm.TTY
func (*ConsoleOptions) Validate ¶
func (o *ConsoleOptions) Validate(args []string) error
type DecommissionOptions ¶ added in v0.4.0
type DecommissionOptions struct {
GlobalOptions
DecommissionTarget string
}
func DefaultDecommissionOptions ¶ added in v0.4.0
func DefaultDecommissionOptions() *DecommissionOptions
func (*DecommissionOptions) Bind ¶ added in v0.4.0
func (o *DecommissionOptions) Bind(fs *pflag.FlagSet)
func (*DecommissionOptions) Complete ¶ added in v0.4.0
func (o *DecommissionOptions) Complete(cmd *cobra.Command, args []string) error
func (*DecommissionOptions) Run ¶ added in v0.4.0
func (o *DecommissionOptions) Run(ctx context.Context, args []string) error
func (*DecommissionOptions) Validate ¶ added in v0.4.0
func (o *DecommissionOptions) Validate(args []string) error
type DeleteOptions ¶
type DeleteOptions struct {
GlobalOptions
FleetName string
}
func DefaultDeleteOptions ¶
func DefaultDeleteOptions() *DeleteOptions
func (*DeleteOptions) Bind ¶
func (o *DeleteOptions) Bind(fs *pflag.FlagSet)
func (*DeleteOptions) Complete ¶
func (o *DeleteOptions) Complete(cmd *cobra.Command, args []string) error
func (*DeleteOptions) Validate ¶
func (o *DeleteOptions) Validate(args []string) error
type DenyOptions ¶
type DenyOptions struct {
GlobalOptions
}
func DefaultDenyOptions ¶
func DefaultDenyOptions() *DenyOptions
func (*DenyOptions) Bind ¶
func (o *DenyOptions) Bind(fs *pflag.FlagSet)
func (*DenyOptions) Complete ¶
func (o *DenyOptions) Complete(cmd *cobra.Command, args []string) error
func (*DenyOptions) Validate ¶
func (o *DenyOptions) Validate(args []string) error
type EditOptions ¶ added in v0.10.0
type EditOptions struct {
GlobalOptions
FleetName string
Editor string
Output string
}
func DefaultEditOptions ¶ added in v0.10.0
func DefaultEditOptions() *EditOptions
func (*EditOptions) Bind ¶ added in v0.10.0
func (o *EditOptions) Bind(fs *pflag.FlagSet)
func (*EditOptions) Complete ¶ added in v0.10.0
func (o *EditOptions) Complete(cmd *cobra.Command, args []string) error
func (*EditOptions) Run ¶ added in v0.10.0
func (o *EditOptions) Run(ctx context.Context, args []string) error
func (*EditOptions) Validate ¶ added in v0.10.0
func (o *EditOptions) Validate(args []string) error
type EnrollmentConfigOptions ¶ added in v0.2.0
type EnrollmentConfigOptions struct {
GlobalOptions
PrivateKey string
}
func DefaultEnrollmentConfigOptions ¶ added in v0.2.0
func DefaultEnrollmentConfigOptions() *EnrollmentConfigOptions
func (*EnrollmentConfigOptions) Bind ¶ added in v0.2.0
func (o *EnrollmentConfigOptions) Bind(fs *pflag.FlagSet)
func (*EnrollmentConfigOptions) Complete ¶ added in v0.2.0
func (o *EnrollmentConfigOptions) Complete(cmd *cobra.Command, args []string) error
func (*EnrollmentConfigOptions) Run ¶ added in v0.2.0
func (o *EnrollmentConfigOptions) Run(ctx context.Context, args []string) error
func (*EnrollmentConfigOptions) Validate ¶ added in v0.2.0
func (o *EnrollmentConfigOptions) Validate(args []string) error
type GetOptions ¶
type GetOptions struct {
GlobalOptions
LabelSelector string
FieldSelector string
Output string
Limit int32
Continue string
FleetName string
Rendered bool
Summary bool
SummaryOnly bool
LastSeen bool
}
func DefaultGetOptions ¶
func DefaultGetOptions() *GetOptions
func (*GetOptions) Bind ¶
func (o *GetOptions) Bind(fs *pflag.FlagSet)
func (*GetOptions) Complete ¶
func (o *GetOptions) Complete(cmd *cobra.Command, args []string) error
func (*GetOptions) Validate ¶
func (o *GetOptions) Validate(args []string) error
type GlobalOptions ¶
type GlobalOptions struct {
ConfigDir string
ConfigFilePath string
Context string
Organization string
RequestTimeout int
}
func DefaultGlobalOptions ¶
func DefaultGlobalOptions() GlobalOptions
func (*GlobalOptions) Bind ¶
func (o *GlobalOptions) Bind(fs *pflag.FlagSet)
func (*GlobalOptions) BuildClient ¶ added in v0.10.0
func (o *GlobalOptions) BuildClient() (*apiclient.ClientWithResponses, error)
BuildClient constructs a FlightCTL API client using configuration derived from the global options (config file path, organization override, etc.).
func (*GlobalOptions) Complete ¶
func (o *GlobalOptions) Complete(cmd *cobra.Command, args []string) error
func (*GlobalOptions) GetEffectiveOrganization ¶ added in v0.10.0
func (o *GlobalOptions) GetEffectiveOrganization() string
GetEffectiveOrganization returns the organization ID to use for API requests.
func (*GlobalOptions) Validate ¶
func (o *GlobalOptions) Validate(args []string) error
func (*GlobalOptions) ValidateCmd ¶ added in v0.4.0
func (o *GlobalOptions) ValidateCmd(args []string) error
ValidateCmd Validates GlobalOptions without requiring ConfigFilePath to exist. This is useful for any CLI cmd that does not require user login.
func (*GlobalOptions) WithTimeout ¶ added in v0.6.0
func (o *GlobalOptions) WithTimeout(ctx context.Context) (context.Context, context.CancelFunc)
type LoginOptions ¶
type LoginOptions struct {
GlobalOptions
AccessToken string
Web bool
ClientId string
InsecureSkipVerify bool
CAFile string
AuthCAFile string
Username string
Password string
// contains filtered or unexported fields
}
func DefaultLoginOptions ¶
func DefaultLoginOptions() *LoginOptions
func (*LoginOptions) Bind ¶
func (o *LoginOptions) Bind(fs *pflag.FlagSet)
func (*LoginOptions) Complete ¶
func (o *LoginOptions) Complete(cmd *cobra.Command, args []string) error
func (*LoginOptions) Init ¶ added in v0.6.0
func (o *LoginOptions) Init(args []string) error
func (*LoginOptions) Validate ¶
func (o *LoginOptions) Validate(args []string) error
type ResumeOptions ¶ added in v0.10.0
type ResumeOptions struct {
GlobalOptions
LabelSelector string
FieldSelector string
All bool
// contains filtered or unexported fields
}
func DefaultResumeOptions ¶ added in v0.10.0
func DefaultResumeOptions() *ResumeOptions
func (*ResumeOptions) Bind ¶ added in v0.10.0
func (o *ResumeOptions) Bind(fs *pflag.FlagSet)
func (*ResumeOptions) Complete ¶ added in v0.10.0
func (o *ResumeOptions) Complete(cmd *cobra.Command, args []string) error
func (*ResumeOptions) Run ¶ added in v0.10.0
func (o *ResumeOptions) Run(ctx context.Context, args []string) error
func (*ResumeOptions) Validate ¶ added in v0.10.0
func (o *ResumeOptions) Validate(args []string) error
type VersionOptions ¶
type VersionOptions struct {
GlobalOptions
Output string
}
func DefaultVersionOptions ¶
func DefaultVersionOptions() *VersionOptions
func (*VersionOptions) Bind ¶ added in v0.3.0
func (o *VersionOptions) Bind(fs *pflag.FlagSet)
func (*VersionOptions) Complete ¶ added in v0.3.0
func (o *VersionOptions) Complete(cmd *cobra.Command, args []string) error
func (*VersionOptions) Validate ¶ added in v0.3.0
func (o *VersionOptions) Validate(args []string) error