Documentation
¶
Overview ¶
Package client isolates provider models from zerops-go v1.0.24.
Index ¶
- Constants
- func CollectPages[T any](ctx context.Context, fetch func(context.Context, PageQuery) (Page[T], error)) ([]T, error)
- func CreatedProject(req *http.Request, response []byte) (id, name string, err error)
- func EqualPrometheusConfigs(a, b []PrometheusConfig) bool
- func IsNotFound(err error, codes ...string) bool
- func RecordIPv4(path, id, address, source string) error
- func RecordProject(path, id, name, source string) error
- func VPNEncodedKey(key string) string
- func ValidateTargetEndpoint(target Target, endpoint string) error
- func ValidateUploadURL(target Target, value string) error
- type API
- type APIError
- type AppVersion
- type Autoscaling
- type AutoscalingWrite
- type BackupConfig
- type BackupConfigWrite
- type BackupRetentionPolicy
- type Client
- func (c *Client) AllProjectProcesses(ctx context.Context, id string) ([]Process, error)
- func (c *Client) AllServiceProcesses(ctx context.Context, id string) ([]Process, error)
- func (c *Client) CreateAppVersion(ctx context.Context, id string, name string) (UploadVersion, error)
- func (c *Client) CreateHTTPRoute(ctx context.Context, id string, v HTTPRouteWrite) (HTTPRoute, error)
- func (c *Client) CreateIntegrationToken(ctx context.Context, org string, v IntegrationTokenWrite) (IntegrationTokenRaw, error)
- func (c *Client) CreateObjectStorage(ctx context.Context, id string, v StorageCreate) (ServiceProcess, error)
- func (c *Client) CreatePortRoute(ctx context.Context, id string, v PortRouteWrite) (PortRoute, error)
- func (c *Client) CreateProject(ctx context.Context, id string, v ProjectCreate) (Project, error)
- func (c *Client) CreateProjectEnv(ctx context.Context, id string, v EnvWrite) (Process, error)
- func (c *Client) CreateService(ctx context.Context, id string, v ServiceCreate) (ServiceProcess, error)
- func (c *Client) CreateUserData(ctx context.Context, id string, v EnvWrite) (Process, error)
- func (c *Client) CreateVPNPeer(ctx context.Context, id, key string) (VPNPeer, error)
- func (c *Client) DeleteHTTPRoute(ctx context.Context, id string) error
- func (c *Client) DeleteIntegrationToken(ctx context.Context, org, id string) error
- func (c *Client) DeletePortRoute(ctx context.Context, id string) error
- func (c *Client) DeleteProject(ctx context.Context, id string) (Process, error)
- func (c *Client) DeleteProjectEnv(ctx context.Context, id string) (Process, error)
- func (c *Client) DeleteService(ctx context.Context, id string) (Process, error)
- func (c *Client) DeleteUserData(ctx context.Context, id string) (Process, error)
- func (c *Client) DeleteVPNPeer(ctx context.Context, id, key string) error
- func (c *Client) DeployAppVersion(ctx context.Context, id string, v DeployRequest, build bool) (Process, error)
- func (c *Client) ExportProject(ctx context.Context, id string, reveal bool) (string, error)
- func (c *Client) GetAppVersion(ctx context.Context, id string) (AppVersion, error)
- func (c *Client) GetBackupConfig(ctx context.Context, id string) (BackupConfig, error)
- func (c *Client) GetGitIntegration(ctx context.Context, id string) (GitIntegrationStatus, error)
- func (c *Client) GetHTTPRoute(ctx context.Context, id string) (HTTPRoute, error)
- func (c *Client) GetIntegrationToken(ctx context.Context, org, id string) (IntegrationToken, error)
- func (c *Client) GetL7BalancerConfig(ctx context.Context, id string) (L7BalancerConfig, error)
- func (c *Client) GetObjectStorage(ctx context.Context, id string) (StorageInfo, error)
- func (c *Client) GetPortRoute(ctx context.Context, id string) (PortRoute, error)
- func (c *Client) GetProcess(ctx context.Context, id string) (Process, error)
- func (c *Client) GetProject(ctx context.Context, id string) (Project, error)
- func (c *Client) GetProjectByName(ctx context.Context, org, name string, statuses []string) (Project, error)
- func (c *Client) GetProjectEnv(ctx context.Context, id string) (Env, error)
- func (c *Client) GetService(ctx context.Context, id string) (Service, error)
- func (c *Client) GetServiceByName(ctx context.Context, id string, name string) (Service, error)
- func (c *Client) GetUserData(ctx context.Context, id string) (Env, error)
- func (c *Client) GetVPNPeer(ctx context.Context, id, key string) (VPNPeer, error)
- func (c *Client) ImportProject(ctx context.Context, organizationID, yaml string) (ProjectImport, error)
- func (c *Client) ListAppVersions(ctx context.Context, id string, q PageQuery) (Page[AppVersion], error)
- func (c *Client) ListHTTPRoutes(ctx context.Context, id string, q PageQuery) (Page[HTTPRoute], error)
- func (c *Client) ListOrganizations(ctx context.Context) ([]Organization, error)
- func (c *Client) ListPortRoutes(ctx context.Context, id string, q PageQuery) (Page[PortRoute], error)
- func (c *Client) ListProjectEnv(ctx context.Context, id string) ([]Env, error)
- func (c *Client) ListProjectProcesses(ctx context.Context, id string, q PageQuery) (Page[Process], error)
- func (c *Client) ListProjects(ctx context.Context, id string, q ProjectQuery) (Page[Project], error)
- func (c *Client) ListServiceEnv(ctx context.Context, id string) ([]Env, error)
- func (c *Client) ListServiceProcesses(ctx context.Context, id string, q PageQuery) (Page[Process], error)
- func (c *Client) ListServices(ctx context.Context, id string, q ServiceQuery) (Page[Service], error)
- func (c *Client) ListUserData(ctx context.Context, id string, q UserDataQuery) (Page[Env], error)
- func (c *Client) RegenerateIntegrationToken(ctx context.Context, org, id string) (IntegrationTokenRaw, error)
- func (c *Client) Regions(ctx context.Context) ([]Region, error)
- func (c *Client) RequestDedicatedIPv4(ctx context.Context, id string) (Process, error)
- func (c *Client) RestartService(ctx context.Context, id string) (Process, error)
- func (c *Client) RestoreHTTPRoute(ctx context.Context, id string) (HTTPRoute, error)
- func (c *Client) RestorePortRoute(ctx context.Context, id string) (PortRoute, error)
- func (c *Client) RevealProjectEnv(ctx context.Context, id string) (string, error)
- func (c *Client) RevealUserData(ctx context.Context, id string) (string, error)
- func (c *Client) SetAutoscaling(ctx context.Context, id string, v AutoscalingWrite) (*Process, error)
- func (c *Client) SetBackupConfig(ctx context.Context, id string, v BackupConfigWrite) (*Process, error)
- func (c *Client) SetGitIntegration(ctx context.Context, id string, v GitIntegrationStatus) (*Process, error)
- func (c *Client) SetHTTPLocations(ctx context.Context, id string, locations []HTTPLocation) (HTTPRoute, error)
- func (c *Client) SetL7BalancerConfig(ctx context.Context, id string, values map[string]*string) (Process, error)
- func (c *Client) SetPrometheusConfig(ctx context.Context, id string, configs []PrometheusConfig) (*Process, error)
- func (c *Client) SetRemoteLogging(ctx context.Context, id string, v RemoteLoggingWrite) (Process, error)
- func (c *Client) SetSharedIPv4(ctx context.Context, id string, enabled bool) (Project, error)
- func (c *Client) SetStorageCDN(ctx context.Context, id string, enabled bool) (Process, error)
- func (c *Client) SetSubdomainAccess(ctx context.Context, id string, enabled bool) (Process, error)
- func (c *Client) Settings(ctx context.Context, id string) (Settings, error)
- func (c *Client) StartService(ctx context.Context, id string) (Process, error)
- func (c *Client) StopService(ctx context.Context, id string) (Process, error)
- func (c *Client) SyncHTTPRoutes(ctx context.Context, id string) (Process, error)
- func (c *Client) SyncPortRoutes(ctx context.Context, id string) (Process, error)
- func (c *Client) TriggerGitPipeline(ctx context.Context, id string, v GitPipelineRequest) (PipelineProcess, error)
- func (c *Client) TriggerHTTPDomainsDNSCheck(ctx context.Context, id string) error
- func (c *Client) UpdateHTTPRoute(ctx context.Context, id string, v HTTPRouteWrite) (HTTPRoute, error)
- func (c *Client) UpdateIntegrationToken(ctx context.Context, org, id string, v IntegrationTokenWrite) (IntegrationToken, error)
- func (c *Client) UpdateObjectStorage(ctx context.Context, id string, v StorageWrite) (Process, error)
- func (c *Client) UpdatePortRoute(ctx context.Context, id string, v PortRouteWrite) (PortRoute, error)
- func (c *Client) UpdateProject(ctx context.Context, id string, v ProjectUpdate) (Project, error)
- func (c *Client) UpdateProjectEnv(ctx context.Context, id string, v EnvWrite) (Process, error)
- func (c *Client) UpdateUserData(ctx context.Context, id string, v EnvWrite) (Process, error)
- func (c *Client) UpgradeProject(ctx context.Context, id string, mode string) (*Process, error)
- func (c *Client) UploadArchive(ctx context.Context, signedURL string, archive io.Reader, size int64) error
- type Config
- type DeployRequest
- type DevTransport
- type Env
- type EnvWrite
- type GitIntegration
- type GitIntegrationStatus
- type GitPipelineRequest
- type HTTPDomain
- type HTTPLocation
- type HTTPRoute
- type HTTPRouteWrite
- type HorizontalAutoscaling
- type IntegrationToken
- type IntegrationTokenProject
- type IntegrationTokenRaw
- type IntegrationTokenWrite
- type L7BalancerConfig
- type L7BalancerValue
- type L7BalancerWrite
- type Ledger
- type Location
- type Organization
- type Page
- type PageQuery
- type PipelineProcess
- type PipelineRequest
- type Port
- type PortRoute
- type PortRouteWrite
- type Process
- type ProcessError
- type ProdTransport
- type Project
- type ProjectCreate
- type ProjectImport
- type ProjectImportService
- type ProjectQuery
- type ProjectUpdate
- type ProjectUserRole
- type PrometheusConfig
- type PrometheusReader
- type PrometheusState
- type Region
- type RemoteLoggingWrite
- type ScalingMinFreeResource
- type ScalingResource
- type Service
- type ServiceCreate
- type ServiceProcess
- type ServiceQuery
- type ServiceType
- type ServiceTypeConfig
- type ServiceTypeInfo
- type ServiceTypeVersion
- type Settings
- type StorageCreate
- type StorageInfo
- type StorageWrite
- type Target
- type TransportError
- type UploadVersion
- type UserDataQuery
- type VPNPeer
- type VPNPeerAddress
- type VerticalAutoscaling
Constants ¶
const ( ProcessStatusFinished = "FINISHED" ProcessStatusFailed = "FAILED" ProcessStatusCanceled = "CANCELED" ProcessStatusPending = "PENDING" ProcessStatusRunning = "RUNNING" ServiceStatusActive = "ACTIVE" ServiceStatusStopped = "STOPPED" ServiceStatusReadyToDeploy = "READY_TO_DEPLOY" ProjectStatusActive = "ACTIVE" AppVersionStatusActive = "ACTIVE" )
const ProductionEndpoint = "https://api.app-prg1.zerops.io"
Variables ¶
This section is empty.
Functions ¶
func CollectPages ¶
func CollectPages[T any](ctx context.Context, fetch func(context.Context, PageQuery) (Page[T], error)) ([]T, error)
CollectPages advances by actual item count, not the requested page size.
func CreatedProject ¶
CreatedProject shares create/import response parsing with shell tooling. req must contain the original creation body, not a consumed network stream.
func EqualPrometheusConfigs ¶
func EqualPrometheusConfigs(a, b []PrometheusConfig) bool
func IsNotFound ¶
func RecordIPv4 ¶
RecordIPv4 can fill in the address after the acquisition recorded an empty one.
func RecordProject ¶
func VPNEncodedKey ¶
VPNEncodedKey encodes the textual standard-base64 key, retaining URL-base64 padding.
func ValidateTargetEndpoint ¶
func ValidateUploadURL ¶
Types ¶
type API ¶
type API interface {
CreateProject(ctx context.Context, id string, v ProjectCreate) (Project, error)
GetProject(ctx context.Context, id string) (Project, error)
ListProjects(ctx context.Context, id string, q ProjectQuery) (Page[Project], error)
UpdateProject(ctx context.Context, id string, v ProjectUpdate) (Project, error)
UpgradeProject(ctx context.Context, id string, mode string) (*Process, error)
DeleteProject(ctx context.Context, id string) (Process, error)
ListProjectEnv(ctx context.Context, id string) ([]Env, error)
GetProjectEnv(ctx context.Context, id string) (Env, error)
CreateProjectEnv(ctx context.Context, id string, v EnvWrite) (Process, error)
UpdateProjectEnv(ctx context.Context, id string, v EnvWrite) (Process, error)
DeleteProjectEnv(ctx context.Context, id string) (Process, error)
RevealProjectEnv(ctx context.Context, id string) (string, error)
GetUserData(ctx context.Context, id string) (Env, error)
CreateUserData(ctx context.Context, id string, v EnvWrite) (Process, error)
UpdateUserData(ctx context.Context, id string, v EnvWrite) (Process, error)
DeleteUserData(ctx context.Context, id string) (Process, error)
RevealUserData(ctx context.Context, id string) (string, error)
CreateService(ctx context.Context, id string, v ServiceCreate) (ServiceProcess, error)
GetService(ctx context.Context, id string) (Service, error)
GetServiceByName(ctx context.Context, id string, name string) (Service, error)
ListServices(ctx context.Context, id string, q ServiceQuery) (Page[Service], error)
SetAutoscaling(ctx context.Context, id string, v AutoscalingWrite) (*Process, error)
StartService(ctx context.Context, id string) (Process, error)
StopService(ctx context.Context, id string) (Process, error)
DeleteService(ctx context.Context, id string) (Process, error)
ListServiceEnv(ctx context.Context, id string) ([]Env, error)
ListUserData(ctx context.Context, id string, q UserDataQuery) (Page[Env], error)
CreateObjectStorage(ctx context.Context, id string, v StorageCreate) (ServiceProcess, error)
GetObjectStorage(ctx context.Context, id string) (StorageInfo, error)
UpdateObjectStorage(ctx context.Context, id string, v StorageWrite) (Process, error)
ListHTTPRoutes(ctx context.Context, id string, q PageQuery) (Page[HTTPRoute], error)
GetHTTPRoute(ctx context.Context, id string) (HTTPRoute, error)
CreateHTTPRoute(ctx context.Context, id string, v HTTPRouteWrite) (HTTPRoute, error)
UpdateHTTPRoute(ctx context.Context, id string, v HTTPRouteWrite) (HTTPRoute, error)
DeleteHTTPRoute(ctx context.Context, id string) error
RestoreHTTPRoute(ctx context.Context, id string) (HTTPRoute, error)
SyncHTTPRoutes(ctx context.Context, id string) (Process, error)
ListPortRoutes(ctx context.Context, id string, q PageQuery) (Page[PortRoute], error)
GetPortRoute(ctx context.Context, id string) (PortRoute, error)
CreatePortRoute(ctx context.Context, id string, v PortRouteWrite) (PortRoute, error)
UpdatePortRoute(ctx context.Context, id string, v PortRouteWrite) (PortRoute, error)
DeletePortRoute(ctx context.Context, id string) error
RestorePortRoute(ctx context.Context, id string) (PortRoute, error)
SyncPortRoutes(ctx context.Context, id string) (Process, error)
GetProcess(ctx context.Context, id string) (Process, error)
ListServiceProcesses(ctx context.Context, id string, q PageQuery) (Page[Process], error)
ListProjectProcesses(ctx context.Context, id string, q PageQuery) (Page[Process], error)
CreateAppVersion(ctx context.Context, id string, name string) (UploadVersion, error)
GetAppVersion(ctx context.Context, id string) (AppVersion, error)
ListAppVersions(ctx context.Context, id string, q PageQuery) (Page[AppVersion], error)
ExportProject(ctx context.Context, id string, reveal bool) (string, error)
Settings(ctx context.Context, id string) (Settings, error)
Regions(ctx context.Context) ([]Region, error)
ListOrganizations(context.Context) ([]Organization, error)
SetSubdomainAccess(context.Context, string, bool) (Process, error)
TriggerGitPipeline(context.Context, string, GitPipelineRequest) (PipelineProcess, error)
DeployAppVersion(context.Context, string, DeployRequest, bool) (Process, error)
UploadArchive(context.Context, string, io.Reader, int64) error
GetProjectByName(context.Context, string, string, []string) (Project, error)
RequestDedicatedIPv4(context.Context, string) (Process, error)
SetRemoteLogging(context.Context, string, RemoteLoggingWrite) (Process, error)
GetL7BalancerConfig(context.Context, string) (L7BalancerConfig, error)
SetL7BalancerConfig(context.Context, string, map[string]*string) (Process, error)
CreateVPNPeer(context.Context, string, string) (VPNPeer, error)
GetVPNPeer(context.Context, string, string) (VPNPeer, error)
DeleteVPNPeer(context.Context, string, string) error
SetHTTPLocations(context.Context, string, []HTTPLocation) (HTTPRoute, error)
TriggerHTTPDomainsDNSCheck(context.Context, string) error
SetGitIntegration(context.Context, string, GitIntegrationStatus) (*Process, error)
GetGitIntegration(context.Context, string) (GitIntegrationStatus, error)
ImportProject(context.Context, string, string) (ProjectImport, error)
GetBackupConfig(context.Context, string) (BackupConfig, error)
SetBackupConfig(context.Context, string, BackupConfigWrite) (*Process, error)
RestartService(context.Context, string) (Process, error)
SetStorageCDN(context.Context, string, bool) (Process, error)
SetPrometheusConfig(context.Context, string, []PrometheusConfig) (*Process, error)
CreateIntegrationToken(context.Context, string, IntegrationTokenWrite) (IntegrationTokenRaw, error)
GetIntegrationToken(context.Context, string, string) (IntegrationToken, error)
UpdateIntegrationToken(context.Context, string, string, IntegrationTokenWrite) (IntegrationToken, error)
DeleteIntegrationToken(context.Context, string, string) error
RegenerateIntegrationToken(context.Context, string, string) (IntegrationTokenRaw, error)
}
type APIError ¶
func AsAPIError ¶
type AppVersion ¶
type AppVersion struct {
ID string `json:"id"`
ServiceStackID string `json:"serviceStackId"`
Name string `json:"name"`
Status string `json:"status"`
Source string `json:"source"`
GitBranch string `json:"gitBranch"`
Created time.Time `json:"created"`
Sequence int `json:"sequence"`
Build map[string]any `json:"build"`
PublicGitSource map[string]any `json:"publicGitSource"`
GithubIntegration map[string]any `json:"githubIntegration"`
GitlabIntegration map[string]any `json:"gitlabIntegration"`
}
type Autoscaling ¶
type Autoscaling struct {
Vertical *VerticalAutoscaling `json:"verticalAutoscaling"`
Horizontal *HorizontalAutoscaling `json:"horizontalAutoscaling"`
}
type AutoscalingWrite ¶
type AutoscalingWrite struct {
CustomAutoscaling *Autoscaling `json:"customAutoscaling"`
AutoscalingProfileID *string `json:"autoscalingProfileId"`
AutoscalingProfileOverrides map[string]any `json:"autoscalingProfileOverrides"`
}
type BackupConfig ¶
type BackupConfig struct {
BackupConfigWrite
DefaultRetentionPolicy *BackupRetentionPolicy `json:"defaultRetentionPolicy"`
}
func (*BackupConfig) UnmarshalJSON ¶
func (v *BackupConfig) UnmarshalJSON(data []byte) error
type BackupConfigWrite ¶
type BackupConfigWrite struct {
BackupPeriod *string `json:"backupPeriod"`
RetentionPolicy *BackupRetentionPolicy `json:"retentionPolicy"`
}
type BackupRetentionPolicy ¶
type BackupRetentionPolicy struct {
MaxTotalFiles int64 `json:"maxTotalFiles"`
MaxTotalGiB int64 `json:"maxTotalGiB"`
ProtectedTags []string `json:"protectedTags"`
MinDaily int64 `json:"minDaily"`
MaxDaily int64 `json:"maxDaily"`
MinWeekly int64 `json:"minWeekly"`
MaxWeekly int64 `json:"maxWeekly"`
MinMonthly int64 `json:"minMonthly"`
MaxMonthly int64 `json:"maxMonthly"`
}
func (*BackupRetentionPolicy) UnmarshalJSON ¶
func (v *BackupRetentionPolicy) UnmarshalJSON(data []byte) error
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) AllProjectProcesses ¶
func (*Client) AllServiceProcesses ¶
func (*Client) CreateAppVersion ¶
func (*Client) CreateHTTPRoute ¶
func (*Client) CreateIntegrationToken ¶
func (c *Client) CreateIntegrationToken(ctx context.Context, org string, v IntegrationTokenWrite) (IntegrationTokenRaw, error)
func (*Client) CreateObjectStorage ¶
func (c *Client) CreateObjectStorage(ctx context.Context, id string, v StorageCreate) (ServiceProcess, error)
func (*Client) CreatePortRoute ¶
func (*Client) CreateProject ¶
func (*Client) CreateProjectEnv ¶
func (*Client) CreateService ¶
func (c *Client) CreateService(ctx context.Context, id string, v ServiceCreate) (ServiceProcess, error)
func (*Client) CreateUserData ¶
func (*Client) CreateVPNPeer ¶
func (*Client) DeleteHTTPRoute ¶
func (*Client) DeleteIntegrationToken ¶
func (*Client) DeletePortRoute ¶
func (*Client) DeleteProject ¶
func (*Client) DeleteProjectEnv ¶
func (*Client) DeleteService ¶
func (*Client) DeleteUserData ¶
func (*Client) DeleteVPNPeer ¶
func (*Client) DeployAppVersion ¶
func (*Client) ExportProject ¶
func (*Client) GetAppVersion ¶
func (*Client) GetBackupConfig ¶
func (*Client) GetGitIntegration ¶
func (*Client) GetHTTPRoute ¶
func (*Client) GetIntegrationToken ¶
func (*Client) GetL7BalancerConfig ¶
func (*Client) GetObjectStorage ¶
func (*Client) GetPortRoute ¶
func (*Client) GetProcess ¶
func (*Client) GetProject ¶
func (*Client) GetProjectByName ¶
func (*Client) GetProjectEnv ¶
func (*Client) GetService ¶
func (*Client) GetServiceByName ¶
func (*Client) GetUserData ¶
func (*Client) GetVPNPeer ¶
func (*Client) ImportProject ¶
func (*Client) ListAppVersions ¶
func (*Client) ListHTTPRoutes ¶
func (*Client) ListOrganizations ¶
func (c *Client) ListOrganizations(ctx context.Context) ([]Organization, error)
func (*Client) ListPortRoutes ¶
func (*Client) ListProjectEnv ¶
func (*Client) ListProjectProcesses ¶
func (*Client) ListProjects ¶
func (*Client) ListServiceEnv ¶
func (*Client) ListServiceProcesses ¶
func (*Client) ListServices ¶
func (*Client) ListUserData ¶
func (*Client) RegenerateIntegrationToken ¶
func (*Client) RequestDedicatedIPv4 ¶
RequestDedicatedIPv4 requests a billed allocation; there is no release endpoint.
func (*Client) RestartService ¶
func (*Client) RestoreHTTPRoute ¶
func (*Client) RestorePortRoute ¶
func (*Client) RevealProjectEnv ¶
func (*Client) RevealUserData ¶
func (*Client) SetAutoscaling ¶
func (*Client) SetBackupConfig ¶
func (*Client) SetGitIntegration ¶
func (c *Client) SetGitIntegration(ctx context.Context, id string, v GitIntegrationStatus) (*Process, error)
SetGitIntegration replaces the connector, or resets it when both blocks are nil. Builds are deliberately never triggered by configuration reconciliation.
func (*Client) SetHTTPLocations ¶
func (c *Client) SetHTTPLocations(ctx context.Context, id string, locations []HTTPLocation) (HTTPRoute, error)
SetHTTPLocations replaces the complete ordered location list, including null config children.
func (*Client) SetL7BalancerConfig ¶
func (*Client) SetPrometheusConfig ¶
func (*Client) SetRemoteLogging ¶
func (*Client) SetSharedIPv4 ¶
func (*Client) SetStorageCDN ¶
func (*Client) SetSubdomainAccess ¶
func (*Client) StartService ¶
func (*Client) StopService ¶
func (*Client) SyncHTTPRoutes ¶
func (*Client) SyncPortRoutes ¶
func (*Client) TriggerGitPipeline ¶
func (c *Client) TriggerGitPipeline(ctx context.Context, id string, v GitPipelineRequest) (PipelineProcess, error)
TriggerGitPipeline unwraps process.appVersion rather than treating the nullable process wrapper as a direct process response.
func (*Client) TriggerHTTPDomainsDNSCheck ¶
TriggerHTTPDomainsDNSCheck requests one check; readiness remains a read-only observation.
func (*Client) UpdateHTTPRoute ¶
func (*Client) UpdateIntegrationToken ¶
func (c *Client) UpdateIntegrationToken(ctx context.Context, org, id string, v IntegrationTokenWrite) (IntegrationToken, error)
func (*Client) UpdateObjectStorage ¶
func (*Client) UpdatePortRoute ¶
func (*Client) UpdateProject ¶
func (*Client) UpdateProjectEnv ¶
func (*Client) UpdateUserData ¶
func (*Client) UpgradeProject ¶
type Config ¶
type Config struct {
Endpoint, Token, UserAgent string
Transport http.RoundTripper
}
type DeployRequest ¶
type DevTransport ¶
type DevTransport struct {
Domain string
Base http.RoundTripper
}
DevTransport guards every request, including redirects and signed uploads. Base defaults to http.DefaultTransport. Errors never expose signed URLs.
type Env ¶
type Env struct {
ID string `json:"id"`
ProjectID string `json:"projectId"`
ServiceStackID string `json:"serviceStackId"`
Key string `json:"key"`
Content string `json:"content"`
Sensitive bool `json:"sensitive"`
Type string `json:"type"`
Editable bool `json:"editable"`
Internal bool `json:"internal"`
Created time.Time `json:"created"`
}
type GitIntegration ¶
type GitIntegration struct {
RepositoryFullName string `json:"repositoryFullName"`
EventType string `json:"eventType"`
BranchName *string `json:"branchName"`
TagRegex *string `json:"tagRegex"`
IsActive bool `json:"isActive"`
ZeropsYamlSetup *string `json:"zeropsYamlSetup"`
UserID string `json:"userId"`
AuthorizationRequired bool `json:"authorizationRequired"`
WebhookID *int64 `json:"webhookId"`
}
GitIntegration contains repository metadata only; OAuth credentials are server-owned.
type GitIntegrationStatus ¶
type GitIntegrationStatus struct {
GithubIntegration *GitIntegration `json:"githubIntegration,omitempty"`
GitlabIntegration *GitIntegration `json:"gitlabIntegration,omitempty"`
}
type GitPipelineRequest ¶
type GitPipelineRequest = PipelineRequest
type HTTPDomain ¶
type HTTPLocation ¶
type HTTPRoute ¶
type HTTPRoute struct {
ID string `json:"id"`
ProjectID string `json:"projectId"`
SSLEnabled bool `json:"sslEnabled"`
CDNEnabled bool `json:"cdnEnabled"`
Domains []HTTPDomain `json:"domains"`
Locations []HTTPLocation `json:"locations"`
IsSynced bool `json:"isSynced"`
IsEditable bool `json:"isEditable"`
DeleteOnSync bool `json:"deleteOnSync"`
}
type HTTPRouteWrite ¶
type HTTPRouteWrite struct {
SSLEnabled bool `json:"sslEnabled"`
CDNEnabled *bool `json:"cdnEnabled"`
Domains []string `json:"domains"`
Locations []HTTPLocation `json:"locations"`
}
type HorizontalAutoscaling ¶
type IntegrationToken ¶
type IntegrationToken struct {
ID string `json:"id"`
IntegrationTokenWrite
}
IntegrationToken is readable metadata; the bearer is never returned by GET.
type IntegrationTokenProject ¶
type IntegrationTokenProject struct {
ProjectID string `json:"projectId"`
RoleCode string `json:"roleCode"`
}
IntegrationTokenProject scopes an organization's integration token.
type IntegrationTokenRaw ¶
type IntegrationTokenRaw struct {
IntegrationToken
Token string `json:"token"`
}
IntegrationTokenRaw is only returned by create and explicit regeneration.
type IntegrationTokenWrite ¶
type IntegrationTokenWrite struct {
Name string `json:"name"`
RoleCode string `json:"roleCode"`
Projects []IntegrationTokenProject `json:"projects"`
CanCreateProjects bool `json:"canCreateProjects"`
CanViewFinances bool `json:"canViewFinances"`
CanEditFinances bool `json:"canEditFinances"`
Sudo bool `json:"sudo"`
}
type L7BalancerConfig ¶
type L7BalancerConfig struct {
Values []L7BalancerValue `json:"values"`
}
type L7BalancerValue ¶
type L7BalancerWrite ¶
func SortedL7Values ¶
func SortedL7Values(values map[string]*string) []L7BalancerWrite
SortedL7Values makes full replacement requests deterministic, including null resets.
type Ledger ¶
type Ledger struct {
Projects map[string]string
Tokens map[string]string
IPv4Projects map[string]string
IPv4 bool
// contains filtered or unexported fields
}
func ReadLedger ¶
type Organization ¶
type Organization struct{ ID, Name, MembershipID, RoleCode string }
type PipelineProcess ¶
type PipelineProcess struct {
Process *Process `json:"process"`
AppVersion *AppVersion `json:"appVersion"`
AppVersionID string `json:"appVersionId"`
}
type PipelineRequest ¶
type PortRouteWrite ¶
type PortRouteWrite struct {
PublicIPType string `json:"publicIpType"`
PublicPort int `json:"publicPort"`
InternalPort int `json:"internalPort"`
InternalProtocol string `json:"internalProtocol"`
FirewallPolicy string `json:"firewallPolicy"`
FirewallIPRanges []string `json:"firewallIpRanges"`
FirewallAllowMyIP bool `json:"firewallAllowMyIp"`
}
type Process ¶
type Process struct {
ID string `json:"id"`
ActionName string `json:"actionName"`
Status string `json:"status"`
ProjectID string `json:"projectId"`
ServiceStackID string `json:"serviceStackId"`
Created *time.Time `json:"created"`
Started *time.Time `json:"started"`
Finished *time.Time `json:"finished"`
Error *ProcessError `json:"error"`
AppVersionID string `json:"appVersionId"`
AppVersion *AppVersion `json:"appVersion"`
}
type ProcessError ¶
type ProdTransport ¶
type ProdTransport struct {
Base http.RoundTripper
OrgID, LedgerPath, Source string
// contains filtered or unexported fields
}
ProdTransport is fail-closed even before bootstrap pins OrgID. Use the constructor to resolve the organization rather than trusting environment IDs.
func NewProdTransport ¶
func (*ProdTransport) Check ¶
Check is also used by the shell helper; RoundTrip remains the enforcement point so shell execution cannot bypass response recording or the IPv4 lock.
func (*ProdTransport) RecordIPv4Release ¶
func (g *ProdTransport) RecordIPv4Release(ctx context.Context, id string) error
RecordIPv4Release verifies release while holding the same ledger lock used for acquisition. Historical IPv4Projects entries remain available to sweepers.
type Project ¶
type Project struct {
ID string `json:"id"`
ClientID string `json:"clientId"`
Name string `json:"name"`
Status string `json:"status"`
Mode string `json:"mode"`
Description *string `json:"description"`
TagList []string `json:"tagList"`
PublicIPv4 *string `json:"publicIpV4"`
PublicIPv6 *string `json:"publicIpV6"`
PublicZone string `json:"publicZone"`
ZeropsSubdomainHost string `json:"zeropsSubdomainHost"`
LogForwardingType *string `json:"logForwardingType"`
Created time.Time `json:"created"`
PrimaryInstanceLocation Location `json:"primaryInstanceLocation"`
}
type ProjectCreate ¶
type ProjectCreate struct {
Name string `json:"name"`
Description *string `json:"description"`
Mode *string `json:"mode"`
TagList []string `json:"tagList"`
UserRoles []ProjectUserRole `json:"userRoles"`
EnvVariables []EnvWrite `json:"envVariables"`
EnvSecrets []EnvWrite `json:"envSecrets"`
EnvIsolation *string `json:"envIsolation"`
SSHIsolation *string `json:"sshIsolation"`
MaxCreditLimit *float64 `json:"maxCreditLimit"`
Location *string `json:"location"`
}
type ProjectImport ¶
type ProjectImport struct {
ProjectID string `json:"projectId"`
ProjectName string `json:"projectName"`
ServiceStacks []ProjectImportService `json:"serviceStacks"`
}
ProjectImport is a newly created project and the work returned for its stacks.
type ProjectImportService ¶
type ProjectQuery ¶
type ProjectUpdate ¶
type ProjectUserRole ¶
type PrometheusConfig ¶
type PrometheusConfig struct {
Targets []string `json:"targets"`
Labels map[string]string `json:"labels"`
}
PrometheusConfig is one ordered custom service-discovery group.
type PrometheusReader ¶
type PrometheusReader interface {
GetProject(context.Context, string) (Project, error)
ListServices(context.Context, string, ServiceQuery) (Page[Service], error)
ListUserData(context.Context, string, UserDataQuery) (Page[Env], error)
}
PrometheusReader uses public service and user-data collections, including SYSTEM rows.
type PrometheusState ¶
type PrometheusState struct {
CoreServiceID string
Configs []PrometheusConfig
}
func ReadPrometheusConfig ¶
func ReadPrometheusConfig(ctx context.Context, api PrometheusReader, id string) (PrometheusState, error)
ReadPrometheusConfig refuses ambiguous multi-instance projects: the public project response does not identify the primary instance, so choosing one would be unsafe.
type RemoteLoggingWrite ¶
type RemoteLoggingWrite struct {
SyslogConfig string `json:"syslogConfig"`
Certificate string `json:"certificate"`
Type *string `json:"type"`
}
RemoteLoggingWrite replaces both the unreadable configuration and forwarding metadata.
type ScalingMinFreeResource ¶
type ScalingResource ¶
type Service ¶
type Service struct {
ID string `json:"id"`
ProjectID string `json:"projectId"`
Name string `json:"name"`
Status string `json:"status"`
Base string `json:"base"`
ServiceStackTypeID string `json:"serviceStackTypeId"`
SubdomainAccess bool `json:"subdomainAccess"`
CDNEnabled *bool `json:"cdnEnabled"`
IsSystem bool `json:"isSystem"`
Created time.Time `json:"created"`
CustomAutoscaling *Autoscaling `json:"customAutoscaling"`
CurrentAutoscaling *Autoscaling `json:"currentAutoscaling"`
AutoscalingProfileID *string `json:"autoscalingProfileId"`
Ports []Port `json:"ports"`
ActiveAppVersion *AppVersion `json:"activeAppVersion"`
ActiveAppVersionID string `json:"-"`
ServiceTypeCategory string `json:"-"`
ServiceStackTypeInfo ServiceTypeInfo `json:"serviceStackTypeInfo"`
UserData []Env `json:"userData"`
}
type ServiceCreate ¶
type ServiceCreate struct {
Name string `json:"name"`
ServiceStackVersionName string `json:"serviceStackVersionName"`
StartWithoutCode *bool `json:"startWithoutCode"`
CustomAutoscaling *Autoscaling `json:"customAutoscaling"`
AutoscalingProfileID *string `json:"autoscalingProfileId"`
AutoscalingProfileOverrides map[string]any `json:"autoscalingProfileOverrides"`
UserData []EnvWrite `json:"userData"`
EnvVarsFile *string `json:"envVarsFile"`
EnvSecretsFile *string `json:"envSecretsFile"`
BuildFromGit *string `json:"buildFromGit"`
ZeropsSetup *string `json:"zeropsSetup"`
ZeropsYaml *string `json:"zeropsYaml"`
EnableSubdomainAccess *bool `json:"enableSubdomainAccess"`
EnvIsolation *string `json:"envIsolation"`
SSHIsolation *string `json:"sshIsolation"`
CDNEnabled *bool `json:"cdnEnabled"`
Location *string `json:"location"`
}
type ServiceProcess ¶
type ServiceQuery ¶
type ServiceType ¶
type ServiceType struct {
ID string `json:"id"`
Name string `json:"name"`
Category string `json:"category"`
IsRuntime bool `json:"isRuntime"`
IsManaged bool `json:"isManaged"`
Modes []string `json:"modeList"`
OperatingSystems []string `json:"osList"`
Versions []ServiceTypeVersion `json:"serviceStackTypeVersionList"`
}
type ServiceTypeConfig ¶
type ServiceTypeConfig struct {
DefaultAutoscaling *Autoscaling `json:"defaultAutoscaling"`
VerticalAutoscaling *VerticalAutoscaling `json:"verticalAutoscaling"`
}
type ServiceTypeInfo ¶
type ServiceTypeVersion ¶
type Settings ¶
type Settings struct {
Locations []Location `json:"locationList"`
ServiceTypes []ServiceType `json:"serviceStackList"`
}
type StorageCreate ¶
type StorageInfo ¶
type StorageWrite ¶
type TransportError ¶
type TransportError struct {
// contains filtered or unexported fields
}
func (*TransportError) Error ¶
func (e *TransportError) Error() string
func (*TransportError) Unwrap ¶
func (e *TransportError) Unwrap() error
type UploadVersion ¶
type UploadVersion struct {
AppVersion
UploadURL string `json:"uploadUrl"`
}
type UserDataQuery ¶
type VPNPeer ¶
type VPNPeer struct {
PublicKey string `json:"publicKey"`
IPv4 VPNPeerAddress `json:"ipv4"`
IPv6 VPNPeerAddress `json:"ipv6"`
Setup string `json:"setup"`
SetupLinux string `json:"setupLinux"`
SetupMacOS string `json:"setupMacOS"`
SetupWindows string `json:"setupWindows"`
}
type VPNPeerAddress ¶
type VPNPeerAddress struct {
AssignedIPAddress string `json:"assignedIpAddress"`
}
type VerticalAutoscaling ¶
type VerticalAutoscaling struct {
MaxResource *ScalingResource `json:"maxResource"`
MinResource *ScalingResource `json:"minResource"`
MinFreeResource *ScalingMinFreeResource `json:"minFreeResource"`
CPUMode *string `json:"cpuMode"`
StartCPUCoreCount *int `json:"startCpuCoreCount"`
SwapEnabled *bool `json:"swapEnabled"`
}