Help us shape the future of Go! Take the 2026 Go Developer Survey

envstore

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Format

func Format(values map[string]string) []string

func Marshal added in v0.7.0

func Marshal(values map[string]string) []byte

Marshal 将环境变量写成可被 AgentDock 安装脚本和原生运行时共同读取的格式。

func Merge

func Merge(base map[string]string, overlays ...map[string]string) map[string]string

func MinimalSystemEnv

func MinimalSystemEnv() map[string]string

func ParseFile added in v0.7.0

func ParseFile(path string) (map[string]string, error)

ParseFile 读取受控的 shell 风格环境变量文件。 桌面服务只接受赋值、引号和注释,不执行命令替换或其他 shell 语法。

func ValidateKey

func ValidateKey(key string) error

Types

type Entry

type Entry struct {
	Key        string `json:"key"`
	Configured bool   `json:"configured"`
}

type Scope

type Scope struct {
	Kind   ScopeKind
	Name   string
	Plugin string
}

type ScopeKind

type ScopeKind string
const (
	ScopeSkill       ScopeKind = "skill"
	ScopePluginSkill ScopeKind = "plugin_skill"
	ScopeMCP         ScopeKind = "mcp"
)

type Store

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

func New

func New(agentDockHome string) (*Store, error)

func (*Store) List

func (s *Store) List(scope Scope) ([]Entry, error)

func (*Store) Load

func (s *Store) Load(scope Scope) (map[string]string, error)

func (*Store) Path

func (s *Store) Path(scope Scope) (string, error)

func (*Store) RemovePluginSkillScopes added in v0.9.0

func (s *Store) RemovePluginSkillScopes(plugin string) error

func (*Store) Root

func (s *Store) Root() string

func (*Store) Set

func (s *Store) Set(scope Scope, key, value string) error

func (*Store) Unset

func (s *Store) Unset(scope Scope, key string) (bool, error)

Jump to

Keyboard shortcuts

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