workspace

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResolveWorkspaceURL added in v1.1.1

func ResolveWorkspaceURL(accessToken, targetName, baseDomain string) (newURL, newName string, err error)

ResolveWorkspaceURL finds the target workspace in the JWT and builds its full URL.

func ValidateAndBuildWorkspaceURL

func ValidateAndBuildWorkspaceURL(cfg config.Config, targetName string) (newURL, newName string, err error)

ValidateAndBuildWorkspaceURL finds the target workspace in the JWT and builds its full URL.

Types

type Workspace

type Workspace struct {
	SchemaName string `json:"schema_name"`
	Auth0ID    string `json:"auth0_id"`
	Region     string `json:"region"`
}

Workspace represents a workspace entry from the JWT token's workspaces claim.

func GetWorkspacesFromToken

func GetWorkspacesFromToken(accessToken string) ([]Workspace, error)

GetWorkspacesFromToken decodes the JWT access token and extracts the workspaces claim.

type WorkspaceListEntry

type WorkspaceListEntry struct {
	Name    string
	Region  string
	Current string
}

WorkspaceListEntry is used for displaying workspace information in a table.

func GetWorkspaceList

func GetWorkspaceList(cfg config.Config) ([]WorkspaceListEntry, error)

GetWorkspaceList returns a display-ready list of workspaces, marking the current one.

Jump to

Keyboard shortcuts

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