profile

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VarOS                = "OS"
	VarArch              = "ARCH"
	VarTarget            = "TARGET"
	VarFeatures          = "FEATURES"
	VarAgentID           = "FJ_AGENT_ID"
	VarServerURL         = "FJ_SERVER_URL"
	VarServerCertificate = "FJ_SERVER_CERTIFICATE"
	VarUserJWT           = "FJ_USER_JWT"
	VarUserKey           = "FJ_USER_KEY"
	VarStream            = "FJ_STREAM"
	VarConsumer          = "FJ_CONSUMER"
	VarInboxPrefix       = "FJ_INBOX_PREFIX"
	VarObjectStore       = "FJ_OBJECT_STORE"
)

Variables

View Source
var (
	ErrParserError     = errors.New("parser error")
	ErrProfileNotFound = errors.New("profile not found")
	ErrProfileExists   = errors.New("profile already exists")
)

Functions

func ParseKVPairs

func ParseKVPairs(pairs []string) map[string]*Var

Types

type Profile

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

func Merge

func Merge(profs ...*Profile) *Profile

func New

func New() *Profile

func (*Profile) Delete

func (p *Profile) Delete(name string)

func (*Profile) Get

func (p *Profile) Get(name string) *Var

func (*Profile) List

func (p *Profile) List() map[string]string

func (*Profile) MarshalJSON

func (p *Profile) MarshalJSON() ([]byte, error)

func (*Profile) Set

func (p *Profile) Set(name string, v *Var)

func (*Profile) SetSourceDir

func (p *Profile) SetSourceDir(dir string)

func (*Profile) SourceDir

func (p *Profile) SourceDir() string

func (*Profile) UnmarshalJSON

func (p *Profile) UnmarshalJSON(b []byte) error

type Profiles

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

func ParseFile

func ParseFile(file string) (*Profiles, error)

func (*Profiles) Add

func (p *Profiles) Add(name string, profile *Profile) error

func (*Profiles) Delete

func (p *Profiles) Delete(name string) error

func (*Profiles) Get

func (p *Profiles) Get(name string) (*Profile, error)

func (*Profiles) List

func (p *Profiles) List() []string

func (*Profiles) MarshalJSON

func (p *Profiles) MarshalJSON() ([]byte, error)

func (*Profiles) UnmarshalJSON

func (p *Profiles) UnmarshalJSON(b []byte) error

func (*Profiles) Update

func (p *Profiles) Update(name string, profile *Profile) error

type Var

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

func NewVar

func NewVar(value string) *Var

func (*Var) Description

func (v *Var) Description() string

func (*Var) MarshalJSON

func (v *Var) MarshalJSON() ([]byte, error)

func (*Var) SetValue

func (v *Var) SetValue(value string)

func (*Var) UnmarshalJSON

func (v *Var) UnmarshalJSON(b []byte) error

func (*Var) Value

func (v *Var) Value() string

Jump to

Keyboard shortcuts

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