context

package
v0.0.49 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	Directory     string
	ApiURL        string
	Name          string
	CertBundle    string
	Ca            *bytes.Buffer `json:"-"`
	Cert          *bytes.Buffer `json:"-"`
	PrivateKey    *bytes.Buffer `json:"-"`
	ActiveContext string        `json:"-"`
	ActiveGroup   string        `json:"-"`
	Client        *http.Client  `json:"-"`
}

func NewContext

func NewContext(projectDir string) *Context

func (*Context) ConnectionTest added in v0.0.3

func (context *Context) ConnectionTest() bool

func (*Context) Export added in v0.0.35

func (context *Context) Export(API string) (string, string, error)

func (*Context) GenerateHttpClient

func (context *Context) GenerateHttpClient(CertBundle []byte) (*http.Client, error)

func (*Context) GetActiveContext

func (context *Context) GetActiveContext() bool

func (*Context) Import added in v0.0.35

func (context *Context) Import(encrypted string, key string) error

func (*Context) ImportCertificates added in v0.0.41

func (context *Context) ImportCertificates(key string) error

func (*Context) LoadContext added in v0.0.35

func (context *Context) LoadContext() *Context

func (*Context) ReadFromFile

func (context *Context) ReadFromFile() bool

func (*Context) SaveToFile

func (context *Context) SaveToFile() bool

func (*Context) SetActiveContext

func (context *Context) SetActiveContext(contextName string) bool

Jump to

Keyboard shortcuts

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