token

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package token holds the main logic for token commands.

Index

Constants

View Source
const SecretName = "everest-token"

SecretName stores the name of the secret to store Everest token.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reset

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

Reset implements the main logic for command.

func NewReset

func NewReset(c ResetConfig, l *zap.SugaredLogger) (*Reset, error)

NewReset returns a new Reset struct.

func (*Reset) Run

func (r *Reset) Run(ctx context.Context) (*ResetResponse, error)

Run runs the reset command.

type ResetConfig

type ResetConfig struct {
	// KubeconfigPath is a path to a kubeconfig
	KubeconfigPath string `mapstructure:"kubeconfig"`
	// Namespace defines the namespace token shall be reset in.
	Namespace string
}

ResetConfig stores configuration for the reset command.

type ResetResponse

type ResetResponse struct {
	// Token is plain-text token generated by the command.
	Token string `json:"token,omitempty"`
}

ResetResponse is a response from the reset command.

func (ResetResponse) String

func (r ResetResponse) String() string

Jump to

Keyboard shortcuts

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