Documentation
¶
Overview ¶
Package api provides types for API requests and responses shared between CLI and server.
Package api provides shared utility functions for CLI and API clients.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetManagementToken ¶
GetManagementToken gets the management token from a cobra command or environment.
func ObfuscateKey ¶
ObfuscateKey obfuscates a sensitive key for display.
func ParseTimeHeader ¶
ParseTimeHeader parses a time header in RFC3339Nano format.
Types ¶
type ProjectCreateRequest ¶
ProjectCreateRequest is the request body for creating a project.
type ProjectCreateResponse ¶
type ProjectCreateResponse struct {
ID string `json:"id"`
Name string `json:"name"`
APIKey string `json:"api_key"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
ProjectCreateResponse is the response body for a created project.
type TokenCreateRequest ¶
type TokenCreateRequest struct {
ProjectID string `json:"project_id"`
DurationMinutes int `json:"duration_minutes"`
MaxRequests *int `json:"max_requests,omitempty"`
}
TokenCreateRequest is the request body for creating a token.
Click to show internal directories.
Click to hide internal directories.