clicontext

package
v2.11.2 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2026 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LocalContextName = "local"
)

Variables

View Source
var (
	ErrNotFound      = errors.New("context not found")
	ErrAlreadyExists = errors.New("context already exists")
)

Functions

This section is empty.

Types

type Context

type Context struct {
	Name           string `json:"name"`
	Description    string `json:"description,omitempty"`
	ServerURL      string `json:"server_url"`
	APIKey         string `json:"api_key,omitempty"`
	SkipTLSVerify  bool   `json:"skip_tls_verify,omitempty"`
	TimeoutSeconds int    `json:"timeout_seconds,omitempty"`
}

type Store

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

func NewStore

func NewStore(baseDir string, enc *crypto.Encryptor) (*Store, error)

func (*Store) Create

func (s *Store) Create(_ context.Context, ctx *Context) error

func (*Store) Current

func (s *Store) Current(_ context.Context) (string, error)

func (*Store) Delete

func (s *Store) Delete(_ context.Context, name string) error

func (*Store) Get

func (s *Store) Get(_ context.Context, name string) (*Context, error)

func (*Store) List

func (s *Store) List(_ context.Context) ([]*Context, error)

func (*Store) Update

func (s *Store) Update(_ context.Context, ctx *Context) error

func (*Store) Use

func (s *Store) Use(ctx context.Context, name string) error

func (*Store) ValidateContext

func (s *Store) ValidateContext(ctx *Context) error

Jump to

Keyboard shortcuts

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