state

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdminProfilesPath

func AdminProfilesPath(root Root) string

func AliasesPath

func AliasesPath(root Root) string

func AppendHistory

func AppendHistory(root Root, action, alias, tunnelID, detail string) error

func EnsureDirs

func EnsureDirs(root Root) error

func HistoryPath

func HistoryPath(root Root) string

func IsSecretReference

func IsSecretReference(value string) bool

func LoadAliases

func LoadAliases(root Root) (map[string]AliasRecord, error)

func LoadProcesses

func LoadProcesses(root Root) (map[string]ProcessRecord, error)

func NewError

func NewError(message string) error

func NormalizeAlias

func NormalizeAlias(alias string) (string, error)

func ProcessesPath

func ProcessesPath(root Root) string

func RejectInlineSecretMaterial

func RejectInlineSecretMaterial(value string, field string) error

func SaveAdminProfiles

func SaveAdminProfiles(root Root, file AdminProfilesFile) error

func SaveAliases

func SaveAliases(root Root, records map[string]AliasRecord) error

func SaveProcesses

func SaveProcesses(root Root, records map[string]ProcessRecord) error

func UTCNow

func UTCNow() string

func ValidateSecretReference

func ValidateSecretReference(value string, field string) error

Types

type AdminProfile

type AdminProfile struct {
	Name                string `json:"name"`
	ControlPlaneBaseURL string `json:"control_plane_base_url"`
	ControlPlaneURLPath string `json:"control_plane_url_path,omitempty"`
	AdminKey            string `json:"admin_key"`
	UpdatedAt           string `json:"updated_at,omitempty"`
}

type AdminProfilesFile

type AdminProfilesFile struct {
	ActiveProfile string                  `json:"active_profile,omitempty"`
	Profiles      map[string]AdminProfile `json:"profiles"`
}

func LoadAdminProfiles

func LoadAdminProfiles(root Root) (AdminProfilesFile, error)

type AliasRecord

type AliasRecord struct {
	Alias           string   `json:"alias"`
	TunnelID        string   `json:"tunnel_id"`
	Name            string   `json:"name"`
	AdminProfile    string   `json:"admin_profile,omitempty"`
	Description     string   `json:"description,omitempty"`
	OrganizationIDs []string `json:"organization_ids,omitempty"`
	WorkspaceIDs    []string `json:"workspace_ids,omitempty"`
	TenantIDs       []string `json:"tenant_ids,omitempty"`
	ConfigPath      string   `json:"config_path,omitempty"`
	ProfileName     string   `json:"profile_name,omitempty"`
	ProfileDir      string   `json:"profile_dir,omitempty"`
	ProfilePath     string   `json:"profile_path,omitempty"`
	HealthURLFile   string   `json:"health_url_file,omitempty"`
	UpdatedAt       string   `json:"updated_at,omitempty"`
}

func AliasRecordFromTunnel

func AliasRecordFromTunnel(
	alias string,
	tunnelID string,
	name string,
	description string,
	organizationIDs []string,
	workspaceIDs []string,
	tenantIDs []string,
	adminProfile string,
	configPath string,
	profileName string,
	profileDir string,
	profilePath string,
	healthURLFile string,
) AliasRecord

type Error

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

func (*Error) Error

func (e *Error) Error() string

type ProcessRecord

type ProcessRecord struct {
	Alias         string `json:"alias"`
	TunnelID      string `json:"tunnel_id"`
	ConfigPath    string `json:"config_path"`
	HealthURLFile string `json:"health_url_file"`
	TargetKind    string `json:"target_kind"`
	TargetValue   string `json:"target_value"`
	Command       string `json:"command"`
	StartedAt     string `json:"started_at"`
	AdminProfile  string `json:"admin_profile,omitempty"`
	ProfileName   string `json:"profile_name,omitempty"`
	ProfileDir    string `json:"profile_dir,omitempty"`
	ProfilePath   string `json:"profile_path,omitempty"`
	Mode          string `json:"mode,omitempty"`
	SessionName   string `json:"session_name,omitempty"`
	PID           int    `json:"pid,omitempty"`
	LogPath       string `json:"log_path,omitempty"`
}

type Root

type Root struct {
	Path string
}

func ResolveRoot

func ResolveRoot(lookupEnv func(string) (string, bool)) Root

Jump to

Keyboard shortcuts

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