cli

package
v0.0.0-...-eeb3e7f Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NoTokenErrMsg     = "token contains an invalid number of segments"
	UnauthorizeErrMsg = "unauthorized"
)

Variables

View Source
var (
	UnreachableDaemonErr = errors.New("Daemon seems to be unreachable")
	UnauthorizedErr      = errors.New("You seem to not be logged in")
	LocalCertificates    = map[string]string{
		"CERT":         "https://gist.githubusercontent.com/mrturkmen06/c53edc50ca777bcece6fca8c21d62ce1/raw/f13ca172eb70c84e0abdfc957cdb563a9a072dcc/localhost.crt",
		"CERT_KEY":     "https://gist.githubusercontent.com/mrturkmen06/2b11591ddda806ce8fa2036693ee347b/raw/2b17c484b520380935102c5268de9911ef2a16eb/localhost.key",
		"CERT_CA_FILE": "https://gist.githubusercontent.com/mrturkmen06/5de6d51cd398be1c3d7df691fc0e4c71/raw/fb557eba6e55ab753b7ac73f32c5e02e820ed802/haaukins-store.com.crt",
	}
)
View Source
var (
	UnableCreateUListErr = errors.New("Failed to create users list")
	PasswordsNoMatchErr  = errors.New("Passwords do not match, so cancelling signup :-(")
)
View Source
var (
	UnableCreateEListErr = errors.New("Failed to create event list")
)
View Source
var Version string

Functions

func Execute

func Execute()

func PrintError

func PrintError(err error)

func PrintWarning

func PrintWarning(s string)

func ReadSecret

func ReadSecret(inputHint string) (string, error)

func TranslateRPCErr

func TranslateRPCErr(err error) error

Types

type Client

type Client struct {
	TokenFile string
	Token     string
	// contains filtered or unexported fields
}

func NewClient

func NewClient() (*Client, error)

func (*Client) Close

func (c *Client) Close()

func (*Client) CmdAddExercise

func (c *Client) CmdAddExercise() *cobra.Command

func (*Client) CmdAddNotification

func (c *Client) CmdAddNotification() *cobra.Command

func (*Client) CmdDeleteTeam

func (c *Client) CmdDeleteTeam() *cobra.Command

func (*Client) CmdDestroyUser

func (c *Client) CmdDestroyUser() *cobra.Command

func (*Client) CmdEvent

func (c *Client) CmdEvent() *cobra.Command

func (*Client) CmdEventCreate

func (c *Client) CmdEventCreate() *cobra.Command

func (*Client) CmdEventList

func (c *Client) CmdEventList() *cobra.Command

func (*Client) CmdEventLoadTest

func (c *Client) CmdEventLoadTest() *cobra.Command

func (*Client) CmdEventResume

func (c *Client) CmdEventResume() *cobra.Command

func (*Client) CmdEventStop

func (c *Client) CmdEventStop() *cobra.Command

func (*Client) CmdEventSuspend

func (c *Client) CmdEventSuspend() *cobra.Command

func (*Client) CmdEventTeamRestart

func (c *Client) CmdEventTeamRestart() *cobra.Command

func (*Client) CmdEventTeams

func (c *Client) CmdEventTeams() *cobra.Command

func (*Client) CmdEvents

func (c *Client) CmdEvents() *cobra.Command

func (*Client) CmdExercise

func (c *Client) CmdExercise() *cobra.Command

func (*Client) CmdExerciseList

func (c *Client) CmdExerciseList() *cobra.Command

func (*Client) CmdExerciseReset

func (c *Client) CmdExerciseReset() *cobra.Command

func (*Client) CmdExercises

func (c *Client) CmdExercises() *cobra.Command

func (*Client) CmdFrontend

func (c *Client) CmdFrontend() *cobra.Command

func (*Client) CmdFrontendList

func (c *Client) CmdFrontendList() *cobra.Command

func (*Client) CmdFrontendReset

func (c *Client) CmdFrontendReset() *cobra.Command

func (*Client) CmdFrontendSet

func (c *Client) CmdFrontendSet() *cobra.Command

func (*Client) CmdFrontendSetCpu

func (c *Client) CmdFrontendSetCpu() *cobra.Command

func (*Client) CmdFrontendSetMemory

func (c *Client) CmdFrontendSetMemory() *cobra.Command

func (*Client) CmdFrontends

func (c *Client) CmdFrontends() *cobra.Command

func (*Client) CmdHost

func (c *Client) CmdHost() *cobra.Command

func (*Client) CmdHostMonitor

func (c *Client) CmdHostMonitor() *cobra.Command

func (*Client) CmdInviteUser

func (c *Client) CmdInviteUser() *cobra.Command

func (*Client) CmdListUsers

func (c *Client) CmdListUsers() *cobra.Command

func (*Client) CmdLoginUser

func (c *Client) CmdLoginUser() *cobra.Command

func (*Client) CmdSignupUser

func (c *Client) CmdSignupUser() *cobra.Command

func (*Client) CmdSolveChallenge

func (c *Client) CmdSolveChallenge() *cobra.Command

func (*Client) CmdTeam

func (c *Client) CmdTeam() *cobra.Command

func (*Client) CmdTeamFlags

func (c *Client) CmdTeamFlags() *cobra.Command

func (*Client) CmdTeamInfo

func (c *Client) CmdTeamInfo() *cobra.Command

func (*Client) CmdTeamResume

func (c *Client) CmdTeamResume() *cobra.Command

func (*Client) CmdTeamSuspend

func (c *Client) CmdTeamSuspend() *cobra.Command

func (*Client) CmdUpdatePasswd

func (c *Client) CmdUpdatePasswd() *cobra.Command

func (*Client) CmdUpdateTeamPassword

func (c *Client) CmdUpdateTeamPassword() *cobra.Command

func (*Client) CmdUser

func (c *Client) CmdUser() *cobra.Command

func (*Client) CmdVersion

func (c *Client) CmdVersion() *cobra.Command

func (*Client) CmdVersionClient

func (c *Client) CmdVersionClient() *cobra.Command

func (*Client) CmdVersionDaemon

func (c *Client) CmdVersionDaemon() *cobra.Command

func (*Client) LoadToken

func (c *Client) LoadToken() error

func (*Client) SaveToken

func (c *Client) SaveToken() error

type Creds

type Creds struct {
	Token    string
	Insecure bool
}

func (Creds) GetRequestMetadata

func (c Creds) GetRequestMetadata(context.Context, ...string) (map[string]string, error)

func (Creds) RequireTransportSecurity

func (c Creds) RequireTransportSecurity() bool

type Formatter

type Formatter interface {
	Write(data []formatElement) (string, error)
}

type IncorrectVersonFmt

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

func (*IncorrectVersonFmt) Error

func (ivf *IncorrectVersonFmt) Error() string

Jump to

Keyboard shortcuts

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