MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / APITokenCreate

Struct APITokenCreate

internal/models/api_token.go:19–24  ·  view source on GitHub ↗

APITokenCreate is the input for creating a new API token.

Source from the content-addressed store, hash-verified

17
18// APITokenCreate is the input for creating a new API token.
19type APITokenCreate struct {
20 Name string `json:"name"`
21 Scopes string `json:"scopes,omitempty"`
22 WorkspaceID string `json:"workspace_id,omitempty"` // optional scope
23 ExpiresIn int `json:"expires_in,omitempty"` // expiry in days (0 = use platform default)
24}
25
26// APITokenWithSecret is returned only on creation and includes the
27// plaintext token. The token is never stored and cannot be retrieved again.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected