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

meshstack

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EndpointSetting = setting.Setting[xurl.URL]{
	Env: "MESHSTACK_ENDPOINT",
	Short: func(envKey string) string {
		return fmt.Sprintf("The meshStack API to act against, such as https://api.example.meshcloud.io. Also read from %s.", envKey)
	},
	Long: func(envKey string) string {
		return fmt.Sprintf("The meshStack API to act against, such as `https://api.example.meshcloud.io`, "+
			"also read from `%s` and inferred from current profile if possible.", envKey)
	},
	Parse: setting.ParseTextUnmarshaler[xurl.URL],
}
View Source
var SkipVersionCheckSetting = setting.Setting[bool]{
	Env: "MESHSTACK_SKIP_VERSION_CHECK",
	Short: func(envKey string) string {
		return fmt.Sprintf("Skip version check against meshStack backend. Also read from %s.", envKey)
	},
	Parse: setting.ParseBool,

	Default: setting.StaticDefault("0"),
}

SkipVersionCheckSetting skips both the minimum backend version check and the check for a newer release of the front end itself.

View Source
var WorkspaceSetting = setting.Setting[Workspace]{
	Env: "MESHSTACK_WORKSPACE",
	Short: func(envKey string) string {
		return fmt.Sprintf("The workspace to act in, identified as in meshPanel, such as my-workspace-ab12c. Also read from %s.", envKey)
	},
	Parse: setting.ParseText[Workspace],
}

Functions

func SetWorkspacesInContext

func SetWorkspacesInContext(ctx context.Context, workspacesFunc WorkspacesFunc) context.Context

Types

type MeshWorkspace

type MeshWorkspace struct {
	client.MeshWorkspace
}

func (MeshWorkspace) Matches

func (w MeshWorkspace) Matches(other MeshWorkspace) bool

func (MeshWorkspace) Name

func (w MeshWorkspace) Name() Workspace

func (MeshWorkspace) String

func (w MeshWorkspace) String() string

type Workspace

type Workspace string

Workspace identifies a workspace as meshPanel shows it.

const NoWorkspace Workspace = ""

NoWorkspace means that no workspace is known, or that the authentication is unscoped. It is the zero value, so `omitzero` leaves it out of a stored profile.

func (Workspace) String

func (w Workspace) String() string

type Workspaces

type Workspaces struct {
	Items                   []client.MeshWorkspace
	ProfileDefaultWorkspace Workspace
}

func WorkspacesFromContext

func WorkspacesFromContext(ctx context.Context) (Workspaces, error)

func (Workspaces) All

func (ws Workspaces) All() iter.Seq2[int, MeshWorkspace]

func (Workspaces) ProfileDefault

func (ws Workspaces) ProfileDefault(ctx context.Context) (r *MeshWorkspace)

func (Workspaces) Single

func (ws Workspaces) Single(ctx context.Context) (single *MeshWorkspace)

type WorkspacesFunc

type WorkspacesFunc func() (Workspaces, error)

Jump to

Keyboard shortcuts

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