ahclient

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package ahclient provides a typed HTTP client for the agentic-hosting API. It has no dependencies on internal server packages — types are defined independently.

Index

Constants

This section is empty.

Variables

View Source
var ErrNoConfig = errors.New("no configuration found — run 'ahc configure' or set AH_URL and AH_KEY environment variables")

ErrNoConfig is returned by LoadConfig when neither the environment nor a config file supplies any value.

Functions

func DefaultConfigPath

func DefaultConfigPath() (string, error)

DefaultConfigPath returns the default configuration file path (~/.ah/config.json).

func ExecRequestTimeout

func ExecRequestTimeout(execSeconds int) time.Duration

ExecRequestTimeout returns the HTTP timeout for an exec request. The server defaults to 60s and caps at 300s; a 5s response allowance is added.

Types

type APIError

type APIError struct {
	StatusCode int
	Message    string
}

APIError represents a non-2xx response from the API.

func (*APIError) Error

func (e *APIError) Error() string

type APIKey

type APIKey struct {
	ID         string `json:"id"`
	Name       string `json:"name"`
	Prefix     string `json:"prefix"`
	CreatedAt  int64  `json:"created_at"`
	LastUsedAt *int64 `json:"last_used_at,omitempty"`
	ExpiresAt  *int64 `json:"expires_at,omitempty"`
}

APIKey holds API key metadata (no secret value).

type ActivityEvent

type ActivityEvent struct {
	ID           string `json:"id"`
	ResourceType string `json:"resource_type"`
	ResourceID   string `json:"resource_id"`
	ResourceName string `json:"resource_name,omitempty"`
	Action       string `json:"action"`
	Status       string `json:"status,omitempty"`
	Message      string `json:"message"`
	CreatedAt    int64  `json:"created_at"`
	ServiceID    string `json:"service_id,omitempty"`
}

ActivityEvent holds a single activity event.

type ActivityFilter

type ActivityFilter struct {
	ResourceType string
	Action       string
	ServiceID    string
	Since        int64
	Limit        int
	Offset       int
}

ActivityFilter holds optional query parameters for filtering activity events.

type Build

type Build struct {
	ID           string `json:"id"`
	ServiceID    string `json:"service_id"`
	ServiceName  string `json:"service_name,omitempty"`
	TenantID     string `json:"tenant_id"`
	Status       string `json:"status"`
	SourceType   string `json:"source_type"`
	SourceURL    string `json:"source_url,omitempty"`
	SourceRef    string `json:"source_ref"`
	Image        string `json:"image,omitempty"`
	NixpacksPlan string `json:"nixpacks_plan,omitempty"`
	StartedAt    *int64 `json:"started_at,omitempty"`
	FinishedAt   *int64 `json:"finished_at,omitempty"`
	CreatedAt    int64  `json:"created_at"`
}

Build represents a build record.

type Client

type Client struct {
	BaseURL    string
	APIKey     string
	HTTPClient *http.Client
}

Client is a typed HTTP client for the agentic-hosting API.

func NewClient

func NewClient(baseURL, apiKey string) *Client

NewClient creates a new Client.

func NewClientNoTimeout

func NewClientNoTimeout(baseURL, apiKey string) *Client

NewClientNoTimeout creates a client without a request timeout. Use this for streaming endpoints (logs, build output).

func (*Client) CancelBuild

func (c *Client) CancelBuild(serviceID, buildID string) (*StatusResponse, error)

CancelBuild cancels a running or queued build.

func (*Client) CancelDeployment

func (c *Client) CancelDeployment(serviceID, deploymentID string) (*Deployment, error)

CancelDeployment cancels a deployment that has not started yet (status pending).

func (*Client) CreateDatabase

func (c *Client) CreateDatabase(req CreateDatabaseRequest) (*Database, error)

CreateDatabase creates a new database.

func (*Client) CreateEnvironment

func (c *Client) CreateEnvironment(req CreateEnvironmentRequest) (*Environment, error)

CreateEnvironment creates a new environment.

func (*Client) CreateKey

func (c *Client) CreateKey(req CreateKeyRequest) (*CreateKeyResponse, error)

CreateKey creates a new API key.

func (*Client) CreatePreview

func (c *Client) CreatePreview(envID string, req CreatePreviewRequest) (*Preview, error)

CreatePreview creates a preview route for an environment port.

func (*Client) CreateService

func (c *Client) CreateService(req CreateServiceRequest) (*Service, error)

CreateService creates a new service.

func (*Client) CreateSnapshot

func (c *Client) CreateSnapshot(serviceID string, req CreateSnapshotRequest) (*Snapshot, error)

CreateSnapshot creates a snapshot of a service.

func (*Client) DeleteDatabase

func (c *Client) DeleteDatabase(dbID string) error

DeleteDatabase deletes a database.

func (*Client) DeleteEnvironment

func (c *Client) DeleteEnvironment(envID string) error

DeleteEnvironment deletes an environment.

func (*Client) DeletePreview

func (c *Client) DeletePreview(envID, previewID string) error

DeletePreview deletes a preview route.

func (*Client) DeleteService

func (c *Client) DeleteService(serviceID string) error

DeleteService deletes a service.

func (*Client) DeleteServiceEnv

func (c *Client) DeleteServiceEnv(serviceID, key string) error

DeleteServiceEnv deletes an env var from a service.

func (*Client) DeleteSnapshot

func (c *Client) DeleteSnapshot(snapshotID string) error

DeleteSnapshot deletes a snapshot.

func (*Client) DeleteTenant

func (c *Client) DeleteTenant() error

DeleteTenant suspends the current tenant account.

func (*Client) EnvironmentExec

func (c *Client) EnvironmentExec(envID string, command []string, workDir string, timeoutSeconds int) (*ExecResult, error)

EnvironmentExec executes a command in an environment.

func (*Client) ExtendEnvironmentLease

func (c *Client) ExtendEnvironmentLease(envID string, durationSeconds int) (*Environment, error)

ExtendEnvironmentLease extends the lease on an environment.

func (*Client) GetBuild

func (c *Client) GetBuild(serviceID, buildID string) (*Build, error)

GetBuild returns a build by ID.

func (*Client) GetBuildLogs

func (c *Client) GetBuildLogs(serviceID, buildID string, follow bool) (io.ReadCloser, error)

GetBuildLogs returns build logs as a streaming reader. If follow is true, the connection stays open until the build completes.

func (*Client) GetDatabase

func (c *Client) GetDatabase(dbID string) (*Database, error)

GetDatabase returns a database by ID.

func (*Client) GetDatabaseConnectionString

func (c *Client) GetDatabaseConnectionString(dbID string) (string, error)

GetDatabaseConnectionString returns the connection string for a database. The access is audit-logged server-side.

func (*Client) GetEnvironment

func (c *Client) GetEnvironment(envID string) (*Environment, error)

GetEnvironment returns an environment by ID.

func (*Client) GetEnvironmentTemplate

func (c *Client) GetEnvironmentTemplate(templateID string) (*EnvironmentTemplate, error)

GetEnvironmentTemplate returns a specific environment template.

func (*Client) GetService

func (c *Client) GetService(serviceID string) (*Service, error)

GetService returns a service by ID.

func (*Client) GetServiceEnv

func (c *Client) GetServiceEnv(serviceID string, reveal bool) (map[string]string, error)

GetServiceEnv returns env vars for a service. Pass reveal=true to return values (audit-logged server-side).

func (*Client) GetServiceLogs

func (c *Client) GetServiceLogs(serviceID string, follow bool, tail int) (io.ReadCloser, error)

GetServiceLogs returns service logs as a streaming reader. If follow is true, the connection stays open for live tailing.

func (*Client) GetSnapshot

func (c *Client) GetSnapshot(snapshotID string, reveal bool) (*Snapshot, error)

GetSnapshot returns a snapshot by ID. Pass reveal=true to include env var values (audit-logged server-side).

func (*Client) GetTenant

func (c *Client) GetTenant() (*Tenant, error)

GetTenant returns the current tenant's details.

func (*Client) GetTenantUsage

func (c *Client) GetTenantUsage() (*TenantUsage, error)

GetTenantUsage returns resource usage for the current tenant.

func (*Client) Health

func (c *Client) Health() (*HealthResponse, error)

Health checks system health (unauthenticated).

func (*Client) HealthDetailed

func (c *Client) HealthDetailed(fresh bool) (*DetailedHealthResponse, error)

HealthDetailed returns detailed system health (authenticated). Pass fresh=true to bypass the server-side cache.

func (*Client) ListActivity

func (c *Client) ListActivity(filter ActivityFilter) ([]ActivityEvent, error)

ListActivity returns activity events, filtered by the given ActivityFilter.

func (*Client) ListBuilds

func (c *Client) ListBuilds() ([]Build, error)

ListBuilds returns all builds for the current tenant.

func (*Client) ListBuildsForService

func (c *Client) ListBuildsForService(serviceID string) ([]Build, error)

ListBuildsForService returns all builds for a specific service.

func (*Client) ListDatabases

func (c *Client) ListDatabases() ([]Database, error)

ListDatabases returns all databases for the current tenant.

func (*Client) ListDeployments

func (c *Client) ListDeployments(serviceID string) ([]Deployment, error)

ListDeployments returns the deployment history for a service.

func (*Client) ListEnvironmentTemplates

func (c *Client) ListEnvironmentTemplates() ([]EnvironmentTemplate, error)

ListEnvironmentTemplates returns all available environment templates.

func (*Client) ListEnvironments

func (c *Client) ListEnvironments() ([]Environment, error)

ListEnvironments returns all environments for the current tenant.

func (*Client) ListKeys

func (c *Client) ListKeys() ([]APIKey, error)

ListKeys returns all non-revoked API keys for the current tenant.

func (*Client) ListPreviews

func (c *Client) ListPreviews(envID string) ([]Preview, error)

ListPreviews returns all preview routes for an environment.

func (*Client) ListServices

func (c *Client) ListServices() ([]Service, error)

ListServices returns all services for the current tenant.

func (*Client) ListSnapshots

func (c *Client) ListSnapshots() ([]Snapshot, error)

ListSnapshots returns all snapshots for the current tenant.

func (*Client) ReactivateTenant

func (c *Client) ReactivateTenant(tenantID, bootstrapToken string) (*ReactivateResponse, error)

ReactivateTenant reactivates a suspended tenant. Requires a bootstrap token.

func (*Client) RecoverKey

func (c *Client) RecoverKey(email, bootstrapToken string) (*KeyRecoverResponse, error)

RecoverKey generates a new API key using the bootstrap token and email.

func (*Client) RedeployService

func (c *Client) RedeployService(serviceID string) (*Service, error)

RedeployService redeploys a service (stops and restarts with current image and env).

func (*Client) Register

func (c *Client) Register(name, email, bootstrapToken string) (*RegisterResponse, error)

Register creates a new tenant. Requires a bootstrap token.

func (*Client) ResetService

func (c *Client) ResetService(serviceID string) (*StatusResponse, error)

ResetService resets the circuit breaker for a service.

func (*Client) RestartService

func (c *Client) RestartService(serviceID string) (*StatusResponse, error)

RestartService restarts a service.

func (*Client) RevokeKey

func (c *Client) RevokeKey(keyID string) error

RevokeKey revokes an API key by ID.

func (*Client) SetServiceEnv

func (c *Client) SetServiceEnv(serviceID string, vars map[string]string) (*StatusResponse, error)

SetServiceEnv sets env vars for a service.

func (*Client) StartBuild

func (c *Client) StartBuild(serviceID string, req StartBuildRequest) (*StartBuildResponse, error)

StartBuild starts a new build for a service.

func (*Client) StartEnvironment

func (c *Client) StartEnvironment(envID string) (*StatusResponse, error)

StartEnvironment starts a stopped environment.

func (*Client) StartService

func (c *Client) StartService(serviceID string) (*StatusResponse, error)

StartService starts a stopped service.

func (*Client) StopEnvironment

func (c *Client) StopEnvironment(envID string) (*StatusResponse, error)

StopEnvironment stops a running environment.

func (*Client) StopService

func (c *Client) StopService(serviceID string) (*StatusResponse, error)

StopService stops a running service.

func (*Client) SyncWorkspace

func (c *Client) SyncWorkspace(envID string, req SyncRequest) (*StatusResponse, error)

SyncWorkspace syncs code from a git URL into an environment.

func (*Client) UpdateService

func (c *Client) UpdateService(serviceID, name string) (*Service, error)

UpdateService renames a service.

func (*Client) UpdateTenant

func (c *Client) UpdateTenant(req UpdateTenantRequest) (*Tenant, error)

UpdateTenant updates the current tenant.

type Config

type Config struct {
	URL string `json:"url"`
	Key string `json:"key"`
}

Config holds the URL and API key for the agentic-hosting API.

func LoadConfig

func LoadConfig(opts LoadOptions) (*Config, error)

LoadConfig loads configuration, merging per field. For each of URL and Key the priority is:

  1. Environment variables AH_URL, AH_KEY
  2. Config file at opts.ConfigPath (or ~/.ah/config.json if empty)

(Flags are applied by callers after loading.) A missing file is not an error; an unreadable or malformed file is. Returns ErrNoConfig if nothing is configured.

func (*Config) Save

func (c *Config) Save(cfgPath string) error

Save writes the configuration to cfgPath with 0600 permissions, replacing any existing file atomically (temp file in the same directory + rename). Parent directories are created if they do not exist.

type ConnectionStringResponse

type ConnectionStringResponse struct {
	ConnectionString string `json:"connection_string"`
}

ConnectionStringResponse holds a database connection string.

type CreateDatabaseRequest

type CreateDatabaseRequest struct {
	Name string `json:"name"`
	Type string `json:"type"`
}

CreateDatabaseRequest holds parameters for creating a database.

type CreateEnvironmentRequest

type CreateEnvironmentRequest struct {
	Name                 string `json:"name"`
	TemplateID           string `json:"template_id,omitempty"`
	LeaseDurationSeconds *int   `json:"lease_duration_seconds,omitempty"`
}

CreateEnvironmentRequest holds parameters for creating an environment.

type CreateKeyRequest

type CreateKeyRequest struct {
	Name      string `json:"name"`
	ExpiresIn *int64 `json:"expires_in,omitempty"`
}

CreateKeyRequest holds parameters for creating an API key.

type CreateKeyResponse

type CreateKeyResponse struct {
	ID      string `json:"id"`
	Name    string `json:"name"`
	APIKey  string `json:"api_key"`
	Prefix  string `json:"prefix"`
	Expires *int64 `json:"expires_at,omitempty"`
}

CreateKeyResponse is returned after key creation.

type CreatePreviewRequest

type CreatePreviewRequest struct {
	Name string `json:"name"`
	Port int    `json:"port"`
}

CreatePreviewRequest holds parameters for creating a preview route.

type CreateServiceRequest

type CreateServiceRequest struct {
	Name  string            `json:"name"`
	Image string            `json:"image"`
	Port  int               `json:"port,omitempty"`
	Env   map[string]string `json:"env,omitempty"`
}

CreateServiceRequest holds parameters for creating a service.

type CreateSnapshotRequest

type CreateSnapshotRequest struct {
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
}

CreateSnapshotRequest holds parameters for creating a snapshot.

type Database

type Database struct {
	ID               string `json:"id"`
	TenantID         string `json:"tenant_id"`
	Name             string `json:"name"`
	Type             string `json:"type"`
	Status           string `json:"status"`
	Host             string `json:"host,omitempty"`
	Port             int    `json:"port,omitempty"`
	DBName           string `json:"db_name,omitempty"`
	Username         string `json:"username,omitempty"`
	ConnectionString string `json:"connection_string,omitempty"`
	CreatedAt        int64  `json:"created_at"`
	UpdatedAt        int64  `json:"updated_at"`
}

Database represents a provisioned database.

type Deployment

type Deployment struct {
	ID           string `json:"id"`
	ServiceID    string `json:"service_id"`
	TenantID     string `json:"tenant_id"`
	BuildID      string `json:"build_id,omitempty"`
	Image        string `json:"image"`
	Status       string `json:"status"`
	Trigger      string `json:"trigger"`
	ContainerID  string `json:"container_id,omitempty"`
	ErrorMessage string `json:"error_message,omitempty"`
	StartedAt    int64  `json:"started_at"`
	CompletedAt  *int64 `json:"completed_at,omitempty"`
	CancelledAt  *int64 `json:"cancelled_at,omitempty"`
	CreatedAt    int64  `json:"created_at"`
}

Deployment represents a single deployment event for a service.

type DetailedHealthResponse

type DetailedHealthResponse struct {
	Status          string             `json:"status"`
	Docker          DockerInfo         `json:"docker"`
	GVisor          GVisorInfo         `json:"gvisor"`
	Disk            DiskInfo           `json:"disk"`
	DockerDisk      DiskInfo           `json:"docker_disk"`
	DockerStorage   *DockerStorageInfo `json:"docker_storage,omitempty"`
	TraefikNetworks *int               `json:"traefik_networks,omitempty"`
}

DetailedHealthResponse holds full system health info.

type DiskInfo

type DiskInfo struct {
	TotalGB     float64 `json:"total_gb"`
	FreeGB      float64 `json:"free_gb"`
	UsedPercent float64 `json:"used_percent"`
}

DiskInfo holds disk usage info.

type DockerInfo

type DockerInfo struct {
	Available bool   `json:"available"`
	Version   string `json:"version,omitempty"`
}

DockerInfo holds Docker availability info.

type DockerStorageInfo

type DockerStorageInfo struct {
	ImagesSizeBytes     int64   `json:"images_size_bytes"`
	ContainersSizeBytes int64   `json:"containers_size_bytes"`
	VolumesSizeBytes    int64   `json:"volumes_size_bytes"`
	BuildCacheSizeBytes int64   `json:"build_cache_size_bytes"`
	TotalSizeGB         float64 `json:"total_size_gb"`
}

DockerStorageInfo holds Docker object-level storage sizes.

type Environment

type Environment struct {
	ID                   string `json:"id"`
	TenantID             string `json:"tenant_id"`
	Name                 string `json:"name"`
	TemplateID           string `json:"template_id"`
	Status               string `json:"status"`
	ContainerID          string `json:"container_id,omitempty"`
	LeaseExpiresAt       *int64 `json:"lease_expires_at,omitempty"`
	LeaseDurationSeconds int    `json:"lease_duration_seconds"`
	LastActivityAt       *int64 `json:"last_activity_at,omitempty"`
	CreatedAt            int64  `json:"created_at"`
	UpdatedAt            int64  `json:"updated_at"`
}

Environment represents a sandboxed dev environment.

type EnvironmentTemplate

type EnvironmentTemplate struct {
	ID           string `json:"id"`
	Name         string `json:"name"`
	BaseImage    string `json:"base_image"`
	Description  string `json:"description"`
	MemoryMB     int    `json:"memory_mb"`
	CPUMillis    int    `json:"cpu_millicores"`
	DiskMB       int    `json:"disk_mb"`
	EgressPolicy string `json:"egress_policy"`
	CreatedAt    int64  `json:"created_at"`
	UpdatedAt    int64  `json:"updated_at"`
}

EnvironmentTemplate describes a pre-configured environment type.

type ExecResult

type ExecResult struct {
	ExitCode   int    `json:"exit_code"`
	Stdout     string `json:"stdout"`
	Stderr     string `json:"stderr"`
	Truncated  bool   `json:"truncated"`
	TimedOut   bool   `json:"timed_out"`
	DurationMs int64  `json:"duration_ms"`
}

ExecResult holds the result of a command execution in an environment.

type GVisorInfo

type GVisorInfo struct {
	Available bool   `json:"available"`
	Version   string `json:"version,omitempty"`
}

GVisorInfo holds gVisor availability info.

type HealthResponse

type HealthResponse struct {
	Status string `json:"status"`
}

HealthResponse is the minimal health check response.

type KeyRecoverRequest

type KeyRecoverRequest struct {
	Email          string `json:"email"`
	BootstrapToken string `json:"bootstrap_token"`
}

KeyRecoverRequest holds parameters for recovering an API key.

type KeyRecoverResponse

type KeyRecoverResponse struct {
	ID           string `json:"id"`
	Key          string `json:"key"`
	Name         string `json:"name"`
	CreatedAt    int64  `json:"created_at"`
	Warning      string `json:"warning,omitempty"`
	RevokedKeyID string `json:"revoked_key_id,omitempty"`
}

KeyRecoverResponse is returned after key recovery.

type LoadOptions

type LoadOptions struct {
	// ConfigPath overrides the default config file location.
	// Leave empty to use the default: ~/.ah/config.json.
	ConfigPath string
}

LoadOptions controls where LoadConfig looks for configuration. ConfigPath, if non-empty, overrides the default ~/.ah/config.json path.

type Preview

type Preview struct {
	ID            string `json:"id"`
	EnvironmentID string `json:"environment_id"`
	TenantID      string `json:"tenant_id"`
	Name          string `json:"name"`
	Port          int    `json:"port"`
	DNSLabel      string `json:"dns_label"`
	URL           string `json:"url,omitempty"`
	CreatedAt     int64  `json:"created_at"`
	UpdatedAt     int64  `json:"updated_at"`
}

Preview represents a preview route exposing an environment port via Traefik.

type ReactivateResponse

type ReactivateResponse struct {
	TenantID string `json:"tenant_id"`
	APIKey   string `json:"api_key"`
	Status   string `json:"status"`
}

ReactivateResponse is returned after reactivating a tenant.

type RegisterRequest

type RegisterRequest struct {
	Name  string `json:"name"`
	Email string `json:"email"`
}

RegisterRequest holds parameters for registering a tenant.

type RegisterResponse

type RegisterResponse struct {
	TenantID string `json:"tenant_id"`
	APIKey   string `json:"api_key"`
}

RegisterResponse is returned after tenant registration.

type Service

type Service struct {
	ID            string `json:"id"`
	TenantID      string `json:"tenant_id"`
	Name          string `json:"name"`
	DNSLabel      string `json:"dns_label,omitempty"`
	Status        string `json:"status"`
	Image         string `json:"image"`
	ContainerID   string `json:"container_id,omitempty"`
	Port          int    `json:"port"`
	URL           string `json:"url,omitempty"`
	LastError     string `json:"last_error,omitempty"`
	CrashCount    int    `json:"crash_count"`
	CircuitOpen   bool   `json:"circuit_open"`
	LastCrashedAt int64  `json:"last_crashed_at,omitempty"`
	CreatedAt     int64  `json:"created_at"`
	UpdatedAt     int64  `json:"updated_at"`
}

Service represents a deployed service.

type Snapshot

type Snapshot struct {
	ID             string            `json:"id"`
	TenantID       string            `json:"tenant_id"`
	ServiceID      string            `json:"service_id"`
	Name           string            `json:"name"`
	Description    string            `json:"description,omitempty"`
	ImageRef       string            `json:"image_ref"`
	ResourceConfig string            `json:"resource_config,omitempty"`
	Port           int               `json:"port"`
	EnvVars        map[string]string `json:"env_vars,omitempty"`
	CreatedAt      int64             `json:"created_at"`
}

Snapshot represents a point-in-time capture of a service.

type StartBuildRequest

type StartBuildRequest struct {
	SourceType string `json:"source_type"`
	SourceURL  string `json:"source_url"`
	SourceRef  string `json:"source_ref,omitempty"`
}

StartBuildRequest holds parameters for starting a build.

type StartBuildResponse

type StartBuildResponse struct {
	BuildID string `json:"build_id"`
	Status  string `json:"status"`
	Image   string `json:"image"`
}

StartBuildResponse is returned by the start build endpoint.

type StatusResponse

type StatusResponse struct {
	Status string `json:"status"`
	Note   string `json:"note,omitempty"`
}

StatusResponse is used for simple status responses.

type SyncRequest

type SyncRequest struct {
	GitURL string `json:"git_url"`
	GitRef string `json:"git_ref,omitempty"`
}

SyncRequest holds parameters for syncing code into an environment.

type Tenant

type Tenant struct {
	ID        string `json:"id"`
	Name      string `json:"name"`
	Email     string `json:"email"`
	Status    string `json:"status"`
	CreatedAt int64  `json:"created_at"`
	UpdatedAt int64  `json:"updated_at"`
}

Tenant holds tenant information.

type TenantUsage

type TenantUsage struct {
	Services  UsageBucket `json:"services"`
	Databases UsageBucket `json:"databases"`
	APIKeys   UsageBucket `json:"api_keys"`
	MemoryMB  int         `json:"memory_mb"`
	CPUCores  float64     `json:"cpu_cores"`
	DiskGB    int         `json:"disk_gb"`
	RateLimit int         `json:"rate_limit"`
}

TenantUsage holds tenant resource usage.

type UpdateServiceRequest

type UpdateServiceRequest struct {
	Name string `json:"name"`
}

UpdateServiceRequest holds parameters for renaming a service.

type UpdateTenantRequest

type UpdateTenantRequest struct {
	Name *string `json:"name,omitempty"`
}

UpdateTenantRequest holds parameters for updating a tenant.

type UsageBucket

type UsageBucket struct {
	Used int `json:"used"`
	Max  int `json:"max"`
}

UsageBucket holds used/max counts for a resource.

Jump to

Keyboard shortcuts

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