managedconfig

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: May 20, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Version = "managed-install-v1"
	Mode    = "observe"
	Agent   = "claude"

	DefaultPath = "/Library/Application Support/Kontext/managed.json"
	EnvPath     = "KONTEXT_MANAGED_CONFIG"
)

Variables

View Source
var ErrNotManaged = errors.New("managed config not found")

Functions

func PathFromEnv

func PathFromEnv() string

Types

type Config

type Config struct {
	Version        string      `json:"version"`
	OrganizationID string      `json:"organization_id"`
	CloudURL       string      `json:"cloud_url"`
	Mode           string      `json:"mode"`
	Agent          string      `json:"agent"`
	Credentials    Credentials `json:"credentials"`
	Device         Device      `json:"device,omitempty"`
}

func Parse

func Parse(data []byte) (Config, error)

type Credentials

type Credentials struct {
	InstallTokenRef TokenRef `json:"install_token_ref"`
}

type Device

type Device struct {
	Label string `json:"label,omitempty"`
}

type LoadedConfig

type LoadedConfig struct {
	Config   Config
	Path     string
	Checksum string
}

func Load

func Load() (LoadedConfig, error)

func LoadFile

func LoadFile(path string) (LoadedConfig, error)

type TokenRef

type TokenRef struct {
	Source string
	Name   string
}

func ParseTokenRef

func ParseTokenRef(value string) (TokenRef, error)

func (TokenRef) MarshalJSON

func (r TokenRef) MarshalJSON() ([]byte, error)

func (TokenRef) String

func (r TokenRef) String() string

func (*TokenRef) UnmarshalJSON

func (r *TokenRef) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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