platformtoken

package
v0.46.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: Apache-2.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

Handler wraps the SDK handler with CLI-specific output conversion.

func NewHandler

func NewHandler(accountClient *httpclient.Client, accountUUID string) *Handler

NewHandler creates a CLI platform token handler.

func (*Handler) Create

func (h *Handler) Create(req PlatformTokenCreate) (*PlatformToken, error)

Create creates a new platform token.

func (*Handler) List

func (h *Handler) List() ([]PlatformToken, error)

List returns all platform tokens.

func (*Handler) Revoke

func (h *Handler) Revoke(tokenID string) error

Revoke revokes (deletes) a platform token by ID.

type PlatformToken

type PlatformToken struct {
	Name           string `json:"name"            table:"NAME"`
	TokenID        string `json:"tokenId"         table:"TOKEN-ID"`
	Status         string `json:"status"          table:"STATUS"`
	ExpirationDate string `json:"expirationDate"  table:"EXPIRES"`
	Scope          string `json:"scope"           table:"SCOPE,wide"`
	Token          string `json:"token,omitempty" table:"-"` // never shown in table
}

PlatformToken is the CLI output struct with table tags.

type PlatformTokenCreate

type PlatformTokenCreate = sdkpt.PlatformTokenCreate

Re-export SDK create type for use in cmd layer.

Jump to

Keyboard shortcuts

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