internal

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: MPL-2.0 Imports: 34 Imported by: 0

Documentation

Overview

Package internal implements user facing commands for sloctl.

Index

Constants

This section is empty.

Variables

View Source
var (
	BuildGitRevision string
	BuildGitBranch   string
	BuildVersion     string
)

Set during build time.

Functions

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func NewRootCmd

func NewRootCmd() *cobra.Command

NewRootCmd returns the base command when called without any subcommands

func NewVersionCmd

func NewVersionCmd() *cobra.Command

NewVersionCmd returns cobra command version with all flags for it.

func NotifyDryRunFlag

func NotifyDryRunFlag()

func RegisterAutoConfirmationFlag

func RegisterAutoConfirmationFlag(cmd *cobra.Command, storeIn *bool)

func RegisterDryRunFlag

func RegisterDryRunFlag(cmd *cobra.Command, storeIn *bool)

func RegisterFileFlag

func RegisterFileFlag(cmd *cobra.Command, required bool, storeIn *[]string)

func RegisterOutputFormatFlags

func RegisterOutputFormatFlags(cmd *cobra.Command, outputFormat, fieldSeparator, recordSeparator *string)

func RegisterVerboseFlag

func RegisterVerboseFlag(cmd *cobra.Command, storeIn *bool)

Types

type ApplyCmd

type ApplyCmd struct {
	// contains filtered or unexported fields
}

func (ApplyCmd) Run

func (a ApplyCmd) Run(cmd *cobra.Command) error

type AwsIamIdsCmd

type AwsIamIdsCmd struct {
	// contains filtered or unexported fields
}

func (*AwsIamIdsCmd) DataExport

func (a *AwsIamIdsCmd) DataExport(cmd *cobra.Command) error

func (*AwsIamIdsCmd) Direct

func (a *AwsIamIdsCmd) Direct(cmd *cobra.Command) error

type ConfigCmd

type ConfigCmd struct {
	// contains filtered or unexported fields
}

func (*ConfigCmd) AddContextCommand

func (c *ConfigCmd) AddContextCommand() *cobra.Command

AddContextCommand returns cobra command add-context, allows to add context to your configuration file.

func (*ConfigCmd) CurrentContextCommand

func (c *ConfigCmd) CurrentContextCommand() *cobra.Command

CurrentContextCommand returns cobra command current-context, prints current used context.

func (*ConfigCmd) DeleteContextCommand

func (c *ConfigCmd) DeleteContextCommand() *cobra.Command

DeleteContextCommand return cobra command to delete context from configuration file.

func (*ConfigCmd) GetContextsCommand

func (c *ConfigCmd) GetContextsCommand() *cobra.Command

GetContextsCommand returns cobra command to prints all available contexts.

func (*ConfigCmd) RenameContextCommand

func (c *ConfigCmd) RenameContextCommand() *cobra.Command

RenameContextCommand return cobra command to rename one of contexts in configuration file.

func (*ConfigCmd) SetDefaultContextCommand

func (c *ConfigCmd) SetDefaultContextCommand() *cobra.Command

SetDefaultContextCommand return cobra command to set current context in configuration file.

type DeleteCmd

type DeleteCmd struct {
	// contains filtered or unexported fields
}

func (DeleteCmd) Run

func (d DeleteCmd) Run(cmd *cobra.Command) error

type GetCmd

type GetCmd struct {
	// contains filtered or unexported fields
}

func (*GetCmd) RegisterFlags

func (g *GetCmd) RegisterFlags(cmd *cobra.Command)

type ReplayCmd

type ReplayCmd struct {
	// contains filtered or unexported fields
}

func (*ReplayCmd) Run

func (r *ReplayCmd) Run(cmd *cobra.Command) error

func (*ReplayCmd) RunReplays

func (r *ReplayCmd) RunReplays(cmd *cobra.Command, replays []ReplayConfig) (failedReplays int, err error)

type ReplayConfig

type ReplayConfig struct {
	Project string    `json:"project" validate:"required"`
	SLO     string    `json:"slo" validate:"required"`
	From    time.Time `json:"from" validate:"required"`
	// contains filtered or unexported fields
}

func (ReplayConfig) ToReplay

func (r ReplayConfig) ToReplay(timeNow time.Time) sdkModels.Replay

type RootCmd

type RootCmd struct {
	Client *sdk.Client
	Flags  globalFlags
}

func (*RootCmd) GetClient

func (r *RootCmd) GetClient() *sdk.Client

func (*RootCmd) NewApplyCmd

func (r *RootCmd) NewApplyCmd() *cobra.Command

NewApplyCmd returns cobra command apply with all its flags.

func (*RootCmd) NewAwsIamIds

func (r *RootCmd) NewAwsIamIds() *cobra.Command

func (*RootCmd) NewConfigCmd

func (r *RootCmd) NewConfigCmd() *cobra.Command

func (*RootCmd) NewDeleteCmd

func (r *RootCmd) NewDeleteCmd() *cobra.Command

NewDeleteCmd returns cobra command delete with all its flags.

func (*RootCmd) NewGetCmd

func (r *RootCmd) NewGetCmd() *cobra.Command

NewGetCmd returns cobra command get with all flags for it.

func (*RootCmd) NewReplayCmd

func (r *RootCmd) NewReplayCmd() *cobra.Command

type Spinner

type Spinner struct {
	// contains filtered or unexported fields
}

func NewSpinner

func NewSpinner(description string) *Spinner

func (Spinner) Go

func (s Spinner) Go()

func (Spinner) Stop

func (s Spinner) Stop()

type TimeValue

type TimeValue struct{ time.Time }

func (*TimeValue) Set

func (t *TimeValue) Set(s string) (err error)

func (*TimeValue) String

func (t *TimeValue) String() string

func (*TimeValue) Type

func (t *TimeValue) Type() string

Directories

Path Synopsis
Package csv provides a builder for csv data
Package csv provides a builder for csv data
Package printer provides utilities for printing standard structures from api in convenient formats
Package printer provides utilities for printing standard structures from api in convenient formats

Jump to

Keyboard shortcuts

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