scopekey

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Workspace

func Workspace(defaultWorkspace, requested string, wildcardAll bool) string

Workspace trims a requested workspace and falls back to defaultWorkspace when the request is blank. When wildcardAll is true, "*" maps to the empty workspace used by list/audit queries to mean all workspaces.

Types

type Scope

type Scope struct {
	WorkspaceID string
	ProfileID   string
	Peer        string
}

Scope is the normalized workspace/profile/peer key used by team/action records.

func Normalize

func Normalize(defaultWorkspace, workspaceID, profileID, peer string) Scope

Normalize trims scope fields and falls back to defaultWorkspace when workspaceID is blank.

func (Scope) Complete

func (s Scope) Complete() bool

Complete reports whether the workspace and peer identity are present.

Jump to

Keyboard shortcuts

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