Documentation
¶
Overview ¶
Package model provides the models for the Zeabur API.
Index ¶
- type AIHubDailyUsage
- type AIHubKey
- type AIHubKeys
- type AIHubModelCost
- type AIHubModelCosts
- type AIHubMonthlyUsage
- type AIHubSpendLog
- type AIHubSpendLogs
- type AIHubSpendLogsPaginated
- type AIHubTenant
- type AddAIHubBalanceResult
- type BannedReasonType
- type CloneProjectEvent
- type CloneProjectResult
- type CloneProjectStatusResult
- type CloudProvider
- type CommandResult
- type Connection
- type CreateAIHubKeyResult
- type CreateServiceInput
- type CreateZSendAPIKeyInput
- type CreateZSendAPIKeyReply
- type CreateZSendWebhookInput
- type CreateZSendWebhookReply
- type DedicatedServerPlan
- type DedicatedServerPlans
- type DedicatedServerRegion
- type Deployment
- type DeploymentConnection
- type DeploymentEdge
- type Deployments
- type Domain
- type Domains
- type Edge
- type Environment
- type Environments
- type ExportedTemplate
- type GenericRegion
- type GitRepo
- type GitTrigger
- type ListZSendAPIKeysReply
- type ListZSendDomainsReply
- type ListZSendEmailsReply
- type ListZSendWebhooksReply
- type Log
- type Logs
- type Map
- type MarketplaceItem
- type MetricType
- type PageInfo
- type PrebuiltItem
- type Project
- type ProjectConnection
- type ProjectEdge
- type ProjectUsage
- type Projects
- type Region
- type RegionProvider
- type RepoConfig
- type RepoConfigs
- type Server
- type ServerDetail
- type ServerEvent
- type ServerListItem
- type ServerListItems
- type ServerProviderInfo
- type ServerStatus
- type Servers
- type Service
- type ServiceDetail
- type ServiceDetails
- type ServiceInTemplate
- type ServiceInstruction
- type ServiceInstructions
- type ServiceMetric
- type ServiceSpecConfigInput
- type ServiceSpecConnectionInstructionType
- type ServiceSpecEnvInput
- type ServiceSpecInitRuleInput
- type ServiceSpecInitVolumeMountInput
- type ServiceSpecPortInput
- type ServiceSpecSchemaInput
- type ServiceSpecSourceInput
- type ServiceSpecVolumeEntryInput
- type ServiceTemplate
- type Services
- type Tabler
- type TempTCPPort
- type Template
- type TemplateConnection
- type TemplateEdge
- type TemplateServiceRef
- type Templates
- type UpdateAIHubAutoRechargeSettingsResult
- type UpdateZSendAPIKeyInput
- type UpdateZSendWebhookInput
- type User
- type Variable
- type Variables
- type VerifyZSendWebhookReply
- type ZSendAPIKey
- type ZSendAPIKeys
- type ZSendDNSRecord
- type ZSendDomain
- type ZSendDomains
- type ZSendEmail
- type ZSendEmails
- type ZSendOnboardingStatus
- type ZSendUserStatus
- type ZSendWebhook
- type ZSendWebhooks
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AIHubDailyUsage ¶ added in v0.9.0
type AIHubDailyUsage struct {
Date string `graphql:"date"`
Spend float64 `graphql:"spend"`
Models []AIHubModelCost `graphql:"models"`
}
AIHubDailyUsage represents a single day's usage.
type AIHubKey ¶ added in v0.9.0
type AIHubKey struct {
KeyID string `graphql:"keyID"`
Alias string `graphql:"alias"`
Cost float64 `graphql:"cost"`
}
AIHubKey represents an API key in AI Hub.
type AIHubKeys ¶ added in v0.9.0
type AIHubKeys []AIHubKey
AIHubKeys is a list of AIHubKey for table display.
type AIHubModelCost ¶ added in v0.9.0
AIHubModelCost represents the cost for a specific model.
type AIHubModelCosts ¶ added in v0.9.0
type AIHubModelCosts []AIHubModelCost
AIHubModelCosts is a list of AIHubModelCost for table display.
func (AIHubModelCosts) Header ¶ added in v0.9.0
func (m AIHubModelCosts) Header() []string
func (AIHubModelCosts) Rows ¶ added in v0.9.0
func (m AIHubModelCosts) Rows() [][]string
type AIHubMonthlyUsage ¶ added in v0.9.0
type AIHubMonthlyUsage struct {
TotalSpend float64 `graphql:"totalSpend"`
DailyUsage []AIHubDailyUsage `graphql:"dailyUsage"`
ModelsCost []AIHubModelCost `graphql:"modelsCost"`
}
AIHubMonthlyUsage represents the monthly usage summary.
type AIHubSpendLog ¶ added in v0.9.0
type AIHubSpendLog struct {
Timestamp time.Time `graphql:"timestamp"`
Cost float64 `graphql:"cost"`
TotalTokens int `graphql:"totalTokens"`
PromptTokens int `graphql:"promptTokens"`
CompletionTokens int `graphql:"completionTokens"`
Model string `graphql:"model"`
KeyAlias string `graphql:"keyAlias"`
}
AIHubSpendLog represents a single spend log entry.
type AIHubSpendLogs ¶ added in v0.9.0
type AIHubSpendLogs []AIHubSpendLog
AIHubSpendLogs is a list of AIHubSpendLog for table display.
func (AIHubSpendLogs) Header ¶ added in v0.9.0
func (l AIHubSpendLogs) Header() []string
func (AIHubSpendLogs) Rows ¶ added in v0.9.0
func (l AIHubSpendLogs) Rows() [][]string
type AIHubSpendLogsPaginated ¶ added in v0.9.0
type AIHubSpendLogsPaginated struct {
Data []AIHubSpendLog `graphql:"data"`
Total int `graphql:"total"`
Page int `graphql:"page"`
PageSize int `graphql:"pageSize"`
TotalPages int `graphql:"totalPages"`
}
AIHubSpendLogsPaginated is a paginated list of spend logs.
type AIHubTenant ¶ added in v0.9.0
type AIHubTenant struct {
Balance int `graphql:"balance"`
Keys []AIHubKey `graphql:"keys"`
ProviderCustomerID string `graphql:"providerCustomerID"`
Provider string `graphql:"provider"`
AutoRechargeThreshold int `graphql:"autoRechargeThreshold"`
AutoRechargeAmount int `graphql:"autoRechargeAmount"`
}
AIHubTenant represents an AI Hub tenant with balance, keys, and auto-recharge settings.
type AddAIHubBalanceResult ¶ added in v0.9.0
type AddAIHubBalanceResult struct {
NewBalance int `graphql:"newBalance"`
}
AddAIHubBalanceResult is the result of adding balance to AI Hub.
type BannedReasonType ¶
type BannedReasonType string
BannedReasonType is the type of reason a user is banned
const ( BannedReasonVPN BannedReasonType = "VPN" BannedReasonMiner BannedReasonType = "MINER" BannedReasonAggregator BannedReasonType = "AGGREGATOR" BannedReasonMirror BannedReasonType = "MIRROR" BannedReasonDMCA BannedReasonType = "DMCA" BannedReasonIllegal BannedReasonType = "ILLEGAL" )
valid banned reasons
type CloneProjectEvent ¶ added in v0.6.1
type CloneProjectEvent struct {
Type string `graphql:"type"`
CreatedAt time.Time `graphql:"createdAt"`
Message string `graphql:"message"`
}
CloneProjectEvent is a single event emitted during project cloning.
type CloneProjectResult ¶ added in v0.6.1
type CloneProjectResult struct {
NewProjectID string `graphql:"newProjectId"`
}
CloneProjectResult is the result of the cloneProject mutation.
type CloneProjectStatusResult ¶ added in v0.6.1
type CloneProjectStatusResult struct {
NewProjectID *string `graphql:"newProjectId"`
Events []CloneProjectEvent `graphql:"events"`
Error *string `graphql:"error"`
}
CloneProjectStatusResult is the result of the cloneProjectStatus query.
type CloudProvider ¶ added in v0.6.1
type CommandResult ¶ added in v0.6.0
CommandResult represents the result of a command execution.
type Connection ¶
type CreateAIHubKeyResult ¶ added in v0.9.0
CreateAIHubKeyResult is the result of creating a new AI Hub key.
type CreateServiceInput ¶
type CreateServiceInput struct {
ProjectID string `json:"projectID" graphql:"projectID"`
Name string `json:"name" graphql:"name"`
Template ServiceTemplate `graphql:"template"`
}
type CreateZSendAPIKeyInput ¶ added in v0.9.0
type CreateZSendAPIKeyInput struct {
Name string `json:"name" graphql:"name"`
Permission string `json:"permission" graphql:"permission"`
Domains []string `json:"domains,omitempty" graphql:"domains"`
}
CreateZSendAPIKeyInput is the input for creating a ZSend API key.
type CreateZSendAPIKeyReply ¶ added in v0.9.0
type CreateZSendAPIKeyReply struct {
APIKey ZSendAPIKey `graphql:"apiKey"`
}
CreateZSendAPIKeyReply is the response for creating a ZSend API key.
type CreateZSendWebhookInput ¶ added in v0.9.0
type CreateZSendWebhookInput struct {
Name string `json:"name" graphql:"name"`
Endpoint string `json:"endpoint" graphql:"endpoint"`
Events []string `json:"events,omitempty" graphql:"events"`
Enabled *bool `json:"enabled,omitempty" graphql:"enabled"`
}
CreateZSendWebhookInput is the input for creating a ZSend webhook.
type CreateZSendWebhookReply ¶ added in v0.9.0
type CreateZSendWebhookReply struct {
Webhook ZSendWebhook `graphql:"webhook"`
Secret string `graphql:"secret"`
}
CreateZSendWebhookReply is the response for creating a ZSend webhook.
type DedicatedServerPlan ¶ added in v0.6.1
type DedicatedServerPlan struct {
Name string `graphql:"name" json:"name"`
CPU int `graphql:"cpu" json:"cpu"`
Memory int `graphql:"memory" json:"memory"`
Disk int `graphql:"disk" json:"disk"`
Egress int `graphql:"egress" json:"egress"`
Price int `graphql:"price" json:"price"`
OriginalPrice *float64 `graphql:"originalPrice" json:"originalPrice,omitempty"`
GPU *string `graphql:"gpu" json:"gpu,omitempty"`
Available bool `graphql:"available" json:"available"`
MaxOutboundBandwidth *int `graphql:"maxOutboundBandwidth" json:"maxOutboundBandwidth,omitempty"`
}
type DedicatedServerPlans ¶ added in v0.6.1
type DedicatedServerPlans []DedicatedServerPlan
func (DedicatedServerPlans) Header ¶ added in v0.6.1
func (p DedicatedServerPlans) Header() []string
func (DedicatedServerPlans) Rows ¶ added in v0.6.1
func (p DedicatedServerPlans) Rows() [][]string
type DedicatedServerRegion ¶ added in v0.6.1
type Deployment ¶
type Deployment struct {
ID string `graphql:"_id"`
ProjectID string `json:"projectID" graphql:"projectID"`
ServiceID string `json:"serviceID" graphql:"serviceID"`
EnvironmentID string `json:"environmentID" graphql:"environmentID"`
GitProvider string `json:"gitProvider" graphql:"gitProvider"`
RepoOwner string `json:"repoOwner" graphql:"repoOwner"`
RepoName string `json:"repoName" graphql:"repoName"`
Ref string `json:"ref" graphql:"ref"`
CommitSHA string `json:"commitSHA" graphql:"commitSHA"`
CommitMessage string `json:"commitMessage" graphql:"commitMessage"`
PlanType string `json:"planType" graphql:"planType"`
CreatedAt time.Time `json:"createdAt" graphql:"createdAt"`
ScheduledAt time.Time `json:"scheduledAt" graphql:"scheduledAt"`
StartedAt time.Time `json:"startedAt" graphql:"startedAt"`
FinishedAt time.Time `json:"finishedAt" graphql:"finishedAt"`
Status string `json:"status" graphql:"status"`
}
func (*Deployment) Header ¶
func (d *Deployment) Header() []string
func (*Deployment) Rows ¶
func (d *Deployment) Rows() [][]string
type DeploymentConnection ¶ added in v0.5.5
type DeploymentConnection struct {
Edges []*DeploymentEdge `json:"edges" graphql:"edges"`
}
type DeploymentEdge ¶ added in v0.5.5
type DeploymentEdge struct {
Node *Deployment `json:"node" graphql:"node"`
Cursor string `json:"cursor" graphql:"cursor"`
}
type Deployments ¶
type Deployments []*Deployment
func (Deployments) Header ¶
func (d Deployments) Header() []string
func (Deployments) Rows ¶
func (d Deployments) Rows() [][]string
type Domain ¶
type Domain struct {
ID string `json:"id" graphql:"_id"`
Domain string `json:"domain" graphql:"domain"`
ServiceID string `json:"serviceID" graphql:"serviceID"`
EnvironmentID string `json:"environmentID" graphql:"environmentID"`
ProjectID string `json:"projectID" graphql:"projectID"`
PortName string `json:"portName" graphql:"portName"`
RedirectTo string `json:"redirectTo" graphql:"redirectTo"`
Status string `json:"status" graphql:"status"`
IsGenerated bool `json:"isGenerated" graphql:"isGenerated"`
CreatedAt time.Time `json:"createdAt" graphql:"createdAt"`
}
type Environment ¶
type Environment struct {
CreatedAt time.Time `graphql:"createdAt"`
ID string `graphql:"_id"`
Name string `graphql:"name"`
ProjectID string `graphql:"projectID"`
}
Environment is the simplest model of environment, which is used in most queries.
func (*Environment) Header ¶
func (e *Environment) Header() []string
func (*Environment) Rows ¶
func (e *Environment) Rows() [][]string
type Environments ¶
type Environments []*Environment
func (Environments) Header ¶
func (e Environments) Header() []string
func (Environments) Rows ¶
func (e Environments) Rows() [][]string
type ExportedTemplate ¶
type ExportedTemplate struct {
ResourceYAML string `graphql:"resourceYAML"`
Warnings []string `graphql:"warnings"`
}
ExportedTemplate is the exported template of the given project.
type GenericRegion ¶
type GitTrigger ¶
type GitTrigger struct {
BranchName string `json:"branchName" graphql:"branchName"`
Provider string `json:"provider" graphql:"provider"`
RepoID int `json:"repoID" graphql:"repoID"`
}
GitTrigger represents a git trigger.
type ListZSendAPIKeysReply ¶ added in v0.9.0
type ListZSendAPIKeysReply struct {
APIKeys []ZSendAPIKey `graphql:"apiKeys"`
TotalCount int `graphql:"totalCount"`
}
ListZSendAPIKeysReply is the response for listing ZSend API keys.
type ListZSendDomainsReply ¶ added in v0.9.0
type ListZSendDomainsReply struct {
Domains []ZSendDomain `graphql:"domains"`
TotalCount int `graphql:"totalCount"`
}
ListZSendDomainsReply is the response for listing ZSend domains.
type ListZSendEmailsReply ¶ added in v0.9.0
type ListZSendEmailsReply struct {
Emails []ZSendEmail `graphql:"emails"`
TotalCount int `graphql:"totalCount"`
}
ListZSendEmailsReply is the response for listing ZSend emails.
type ListZSendWebhooksReply ¶ added in v0.9.0
type ListZSendWebhooksReply struct {
Webhooks []ZSendWebhook `graphql:"webhooks"`
TotalCount int `graphql:"totalCount"`
}
ListZSendWebhooksReply is the response for listing ZSend webhooks.
type Log ¶
type MarketplaceItem ¶
type MetricType ¶
type MetricType string
MetricType is the type of metric.
const ( MetricTypeCPU MetricType = "CPU" MetricTypeMemory MetricType = "MEMORY" MetricTypeNetwork MetricType = "NETWORK" )
valid metric types
func (MetricType) GetGraphQLType ¶
func (m MetricType) GetGraphQLType() string
func (MetricType) WithMeasureUnit ¶
func (m MetricType) WithMeasureUnit(v float64) string
type PageInfo ¶
type PageInfo struct {
StartCursor string `json:"startCursor" graphql:"startCursor"`
EndCursor string `json:"endCursor" graphql:"endCursor"`
TotalCount int `json:"totalCount" graphql:"totalCount"`
HasNextPage bool `json:"hasNextPage" graphql:"hasNextPage"`
HasPreviousPage bool `json:"hasPreviousPage" graphql:"hasPreviousPage"`
}
PageInfo is the pagination information
type PrebuiltItem ¶
type Project ¶
type Project struct {
ID string `graphql:"_id"`
Name string `graphql:"name"`
Description string `graphql:"description"`
// Environments []Environment `graphql:"environments"`
CreatedAt time.Time `graphql:"createdAt"`
// Owner User `graphql:"owner"`
// Collaborators []User `graphql:"collaborators"`
IconURL string `graphql:"iconURL"`
// Services []Service `graphql:"services"`
Region Region `graphql:"region"`
}
Project is the simplest model of project, which is used in most queries.
type ProjectConnection ¶
type ProjectConnection struct {
PageInfo *PageInfo `json:"pageInfo"`
Edges []*ProjectEdge `json:"edges"`
}
ProjectConnection is a connection to a list of items.
type ProjectEdge ¶
ProjectEdge is an edge in a connection.
type ProjectUsage ¶
type ProjectUsage struct {
// the project this usage is for
Project *Project `json:"project"`
// the beginning of the time period
From time.Time `json:"from"`
// the end of the time period
To time.Time `json:"to"`
// the total number of cpu used (in vCPU-minutes)
CPU float64 `json:"cpu"`
// the total number of memory used (in MB-minutes)
Memory int `json:"memory"`
}
ProjectUsage is a summary of the usage of a project in a given time period.
type Region ¶
type Region struct {
Available bool `graphql:"available"`
Description string `graphql:"description"`
ID string `graphql:"id"`
Name string `graphql:"name"`
Coordinates []float64 `graphql:"coordinates"`
Provider RegionProvider `graphql:"provider"`
}
func (Region) IsAvailable ¶
type RegionProvider ¶
type RegionProvider string
type RepoConfig ¶
type RepoConfigs ¶
type RepoConfigs []*RepoConfig
type Server ¶
type Server struct {
ID string `graphql:"_id"`
Country *string `graphql:"country"`
City *string `graphql:"city"`
IP string `graphql:"ip"`
Name string `graphql:"name"`
}
func (Server) IsAvailable ¶
type ServerDetail ¶ added in v0.6.1
type ServerDetail struct {
ID string `graphql:"_id"`
Name string `graphql:"name"`
IP string `graphql:"ip"`
SSHPort int `graphql:"sshPort"`
SSHUsername *string `graphql:"sshUsername"`
Country *string `graphql:"country"`
City *string `graphql:"city"`
Continent *string `graphql:"continent"`
IsManaged bool `graphql:"isManaged"`
ProvisioningStatus *string `graphql:"provisioningStatus"`
CreatedAt time.Time `graphql:"createdAt"`
Status ServerStatus `graphql:"status"`
ProviderInfo *ServerProviderInfo `graphql:"providerInfo"`
Events []ServerEvent `graphql:"events"`
}
func (*ServerDetail) Header ¶ added in v0.6.1
func (s *ServerDetail) Header() []string
func (*ServerDetail) Rows ¶ added in v0.6.1
func (s *ServerDetail) Rows() [][]string
type ServerEvent ¶ added in v0.6.2
type ServerListItem ¶ added in v0.6.1
type ServerListItem struct {
ID string `graphql:"_id"`
Name string `graphql:"name"`
IP string `graphql:"ip"`
Country *string `graphql:"country"`
City *string `graphql:"city"`
ProvisioningStatus *string `graphql:"provisioningStatus"`
Status ServerStatus `graphql:"status"`
ProviderInfo *ServerProviderInfo `graphql:"providerInfo"`
}
type ServerListItems ¶ added in v0.6.1
type ServerListItems []ServerListItem
func (ServerListItems) Header ¶ added in v0.6.1
func (s ServerListItems) Header() []string
func (ServerListItems) Rows ¶ added in v0.6.1
func (s ServerListItems) Rows() [][]string
type ServerProviderInfo ¶ added in v0.6.1
type ServerStatus ¶ added in v0.6.1
type ServerStatus struct {
IsOnline bool `graphql:"isOnline"`
TotalCPU int `graphql:"totalCPU"`
UsedCPU int `graphql:"usedCPU"`
TotalMemory int `graphql:"totalMemory"`
UsedMemory int `graphql:"usedMemory"`
TotalDisk int `graphql:"totalDisk"`
UsedDisk int `graphql:"usedDisk"`
VMStatus string `graphql:"vmStatus"`
Latency float64 `graphql:"latency"`
}
type Service ¶
type Service struct {
ID string `graphql:"_id"`
Name string `graphql:"name"`
// Template ServiceTemplate `graphql:"template"`
Project *struct {
ID string `graphql:"_id"`
} `graphql:"project"`
CreatedAt time.Time `graphql:"createdAt"`
// MarketItemCode is the code of the item in the marketplace. Only used if Template is ServiceTemplateMarketplace.
MarketItemCode *string `graphql:"marketItemCode"`
CustomBuildCommand *string `graphql:"customBuildCommand"`
CustomStartCommand *string `graphql:"customStartCommand"`
OutputDir *string `graphql:"outputDir"`
RootDirectory string `graphql:"rootDirectory"`
Template string `graphql:"template"`
WatchPaths []string `graphql:"watchPaths"`
}
Service is the simplest model of service, which is used in most queries.
type ServiceDetail ¶
type ServiceDetail struct {
Service `graphql:"... on Service"`
GitTrigger *GitTrigger `graphql:"gitTrigger(environmentID: $environmentID)"`
ConsoleURL string `graphql:"consoleURL(environmentID: $environmentID)"`
Status string `graphql:"status(environmentID: $environmentID)"`
Domains []Domain `graphql:"domains(environmentID: $environmentID)"`
}
ServiceDetail has more information related to specific environment.
func (*ServiceDetail) Header ¶
func (s *ServiceDetail) Header() []string
func (*ServiceDetail) Rows ¶
func (s *ServiceDetail) Rows() [][]string
type ServiceDetails ¶
type ServiceDetails []*ServiceDetail
func (ServiceDetails) Header ¶
func (s ServiceDetails) Header() []string
func (ServiceDetails) Rows ¶
func (s ServiceDetails) Rows() [][]string
type ServiceInTemplate ¶
type ServiceInTemplate struct {
BranchName string `json:"branchName"`
CustomBuildCommand string `json:"customBuildCommand"`
CustomStartCommand string `json:"customStartCommand"`
DomainKey string `json:"domainKey"`
GitNamespaceID int `json:"gitNamespaceID"`
GitRepoID int `json:"gitRepoID"`
MarketplaceItem MarketplaceItem `json:"marketplaceItem"`
Name string `json:"name"`
OutputDir string `json:"outputDir"`
RootDirectory string `json:"rootDirectory"`
Template ServiceTemplate `json:"template"`
Variables map[string]interface{} `json:"variables"`
WatchPaths []string `json:"watchPaths"`
}
type ServiceInstruction ¶
type ServiceInstruction struct {
Category string `graphql:"category"`
Content string `graphql:"content"`
Title string `graphql:"title"`
Type ServiceSpecConnectionInstructionType `graphql:"type"`
}
type ServiceInstructions ¶
type ServiceInstructions struct {
Instructions []ServiceInstruction `graphql:"instructions"`
}
type ServiceMetric ¶
type ServiceMetric struct {
Metrics []struct {
Timestamp time.Time `json:"timestamp" graphql:"timestamp"`
Value float64 `json:"value" graphql:"value"`
} `` /* 153-byte string literal not displayed */
}
ServiceMetric is a metric of a service.
type ServiceSpecConfigInput ¶
type ServiceSpecConnectionInstructionType ¶
type ServiceSpecConnectionInstructionType string
const ( ServiceSpecConnectionInstructionTypePassword ServiceSpecConnectionInstructionType = "PASSWORD" ServiceSpecConnectionInstructionTypeURL ServiceSpecConnectionInstructionType = "URL" ServiceSpecConnectionInstructionTypeText ServiceSpecConnectionInstructionType = "TEXT" )
type ServiceSpecEnvInput ¶
type ServiceSpecInitRuleInput ¶
type ServiceSpecInitRuleInput struct {
ID string `json:"id" graphql:"id"`
Image string `json:"image" graphql:"image"`
Command []string `json:"command" graphql:"command"`
Volumes []ServiceSpecInitVolumeMountInput `json:"volumes" graphql:"volumes"`
}
type ServiceSpecPortInput ¶
type ServiceSpecSchemaInput ¶
type ServiceSpecSchemaInput struct {
ID string `json:"id" graphql:"id"`
Name string `json:"name" graphql:"name"`
Description string `json:"description" graphql:"description"`
Tags []string `json:"tags" graphql:"tags"`
Icon string `json:"icon" graphql:"icon"`
Docs string `json:"docs" graphql:"docs"`
Source *ServiceSpecSourceInput `json:"source" graphql:"source"`
Ports []ServiceSpecPortInput `json:"ports" graphql:"ports"`
Volumes []ServiceSpecVolumeEntryInput `json:"volumes" graphql:"volumes"`
Instructions []ServiceInstruction `json:"instructions" graphql:"instructions"`
Env []ServiceSpecEnvInput `json:"env" graphql:"env"`
InitRules []ServiceSpecInitRuleInput `json:"initRules" graphql:"initRules"`
Configs []ServiceSpecConfigInput `json:"configs" graphql:"configs"`
}
type ServiceSpecSourceInput ¶
type ServiceSpecSourceInput struct {
Image string `json:"image" graphql:"image"`
Command []string `json:"command" graphql:"command"`
Args []string `json:"args" graphql:"args"`
// Git only fields
Source string `json:"source,omitempty" graphql:"source"`
RepoID int `json:"repoID,omitempty" graphql:"repoID"`
Branch string `json:"branch,omitempty" graphql:"branch"`
SubModuleName string `json:"subModuleName,omitempty" graphql:"subModuleName"`
WatchPaths []string `json:"watchPaths,omitempty" graphql:"watchPaths"`
}
type ServiceTemplate ¶
type ServiceTemplate string
const ( RegionProviderAWS ServiceTemplate = "AWS" RegionProviderGCP ServiceTemplate = "GCP" )
const ( ServiceTemplateGit ServiceTemplate = "GIT" ServiceTemplateMarketplace ServiceTemplate = "MARKETPLACE" )
type TempTCPPort ¶
type TempTCPPort struct {
ServiceID string `json:"serviceID" graphql:"serviceID"`
EnvironmentID string `json:"environmentID" graphql:"environmentID"`
TargetPort int `json:"targetPort" graphql:"targetPort"`
NodePort int `json:"nodePort" graphql:"nodePort"`
RemainSeconds int `json:"remainSeconds" graphql:"remainSeconds"`
}
TempTCPPort is a temporary TCP port.
type Template ¶
type Template struct {
CreatedAt time.Time `graphql:"createdAt"`
DeploymentCnt int `graphql:"deploymentCnt"`
Code string `graphql:"code"`
Description string `graphql:"description"`
Name string `graphql:"name"`
PreviewURL string `graphql:"previewURL"`
Readme string `graphql:"readme"`
Tags []string `graphql:"tags"`
Services []TemplateServiceRef `graphql:"services"`
}
type TemplateConnection ¶
type TemplateConnection struct {
PageInfo *PageInfo `json:"pageInfo"`
Edges []*TemplateEdge `json:"edges"`
}
type TemplateEdge ¶
type TemplateServiceRef ¶ added in v0.5.9
type TemplateServiceRef struct {
Name string `graphql:"name"`
}
TemplateServiceRef is a minimal reference to a service in a template, used for GraphQL queries.
type UpdateAIHubAutoRechargeSettingsResult ¶ added in v0.9.0
type UpdateAIHubAutoRechargeSettingsResult struct {
AutoRechargeThreshold int `graphql:"autoRechargeThreshold"`
AutoRechargeAmount int `graphql:"autoRechargeAmount"`
}
UpdateAIHubAutoRechargeSettingsResult is the result of updating auto-recharge settings.
type UpdateZSendAPIKeyInput ¶ added in v0.9.0
type UpdateZSendAPIKeyInput struct {
ID string `json:"id" graphql:"id"`
Name *string `json:"name,omitempty" graphql:"name"`
Permission *string `json:"permission,omitempty" graphql:"permission"`
Domains []string `json:"domains,omitempty" graphql:"domains"`
}
UpdateZSendAPIKeyInput is the input for updating a ZSend API key.
type UpdateZSendWebhookInput ¶ added in v0.9.0
type UpdateZSendWebhookInput struct {
ID string `json:"id" graphql:"id"`
Name *string `json:"name,omitempty" graphql:"name"`
Endpoint *string `json:"endpoint,omitempty" graphql:"endpoint"`
Events []string `json:"events,omitempty" graphql:"events"`
Enabled *bool `json:"enabled,omitempty" graphql:"enabled"`
}
UpdateZSendWebhookInput is the input for updating a ZSend webhook.
type User ¶
type User struct {
CreatedAt *time.Time `json:"createdAt" graphql:"createdAt"`
BannedAt *time.Time `json:"bannedAt" graphql:"bannedAt"`
// BannedReason *BannedReasonType `json:"bannedReason" graphql:"bannedReason"`
// EmailPreference map[string]bool `json:"emailPreference" graphql:"emailPreference"`
AgreedAt *time.Time `json:"agreedAt" graphql:"agreedAt"`
// DiscordID is the user's Discord ID.
DiscordID *string `json:"discordID" graphql:"discordID"`
ID string `json:"_id" graphql:"_id"`
Name string `json:"name" graphql:"name"`
Email string `json:"email" graphql:"email"`
Username string `json:"username" graphql:"username"`
Language string `json:"language" graphql:"language"`
AvatarURL string `json:"avatarUrl" graphql:"avatarURL"`
GitHubID int64 `json:"githubID" graphql:"githubID"`
}
User is the simplest model of user, which is used in most queries.
type VerifyZSendWebhookReply ¶ added in v0.9.0
type VerifyZSendWebhookReply struct {
Success bool `graphql:"success"`
Message string `graphql:"message"`
}
VerifyZSendWebhookReply is the response for verifying a ZSend webhook.
type ZSendAPIKey ¶ added in v0.9.0
type ZSendAPIKey struct {
ID string `graphql:"id"`
UserID string `graphql:"userID"`
StatusID string `graphql:"statusID"`
Name string `graphql:"name"`
Permission string `graphql:"permission"`
Domains []string `graphql:"domains"`
Token *string `graphql:"token"`
CreatedAt time.Time `graphql:"createdAt"`
LastUsedAt *time.Time `graphql:"lastUsedAt"`
}
ZSendAPIKey represents a ZSend API key.
type ZSendAPIKeys ¶ added in v0.9.0
type ZSendAPIKeys []*ZSendAPIKey
ZSendAPIKeys is a list of ZSendAPIKey for table display.
func (ZSendAPIKeys) Header ¶ added in v0.9.0
func (k ZSendAPIKeys) Header() []string
func (ZSendAPIKeys) Rows ¶ added in v0.9.0
func (k ZSendAPIKeys) Rows() [][]string
type ZSendDNSRecord ¶ added in v0.9.0
type ZSendDNSRecord struct {
Category string `graphql:"category"`
Type string `graphql:"type"`
Name string `graphql:"name"`
Content string `graphql:"content"`
TTL string `graphql:"ttl"`
Priority string `graphql:"priority"`
Status string `graphql:"status"`
LastCheckedAt *time.Time `graphql:"lastCheckedAt"`
}
ZSendDNSRecord represents a DNS record for a ZSend domain.
type ZSendDomain ¶ added in v0.9.0
type ZSendDomain struct {
ID string `graphql:"id"`
UserID string `graphql:"userID"`
Type string `graphql:"type"`
Value string `graphql:"value"`
Region string `graphql:"region"`
Status string `graphql:"status"`
StatusMsg *string `graphql:"statusMsg"`
Records []ZSendDNSRecord `graphql:"records"`
CreatedAt time.Time `graphql:"createdAt"`
UpdatedAt time.Time `graphql:"updatedAt"`
}
ZSendDomain represents a ZSend email domain.
type ZSendDomains ¶ added in v0.9.0
type ZSendDomains []*ZSendDomain
ZSendDomains is a list of ZSendDomain for table display.
func (ZSendDomains) Header ¶ added in v0.9.0
func (d ZSendDomains) Header() []string
func (ZSendDomains) Rows ¶ added in v0.9.0
func (d ZSendDomains) Rows() [][]string
type ZSendEmail ¶ added in v0.9.0
type ZSendEmail struct {
ID string `graphql:"id"`
UserID string `graphql:"userID"`
APIKeyID string `graphql:"apiKeyID"`
JobType string `graphql:"jobType"`
JobID string `graphql:"jobID"`
MessageID string `graphql:"messageID"`
From string `graphql:"from"`
To []string `graphql:"to"`
CC []string `graphql:"cc"`
BCC []string `graphql:"bcc"`
ReplyTo []string `graphql:"replyTo"`
Subject string `graphql:"subject"`
HTML string `graphql:"html"`
Text string `graphql:"text"`
Status string `graphql:"status"`
MalStatus string `graphql:"malStatus"`
CreatedAt time.Time `graphql:"createdAt"`
ScheduledAt *time.Time `graphql:"scheduledAt"`
}
ZSendEmail represents a ZSend email.
type ZSendEmails ¶ added in v0.9.0
type ZSendEmails []*ZSendEmail
ZSendEmails is a list of ZSendEmail for table display.
func (ZSendEmails) Header ¶ added in v0.9.0
func (e ZSendEmails) Header() []string
func (ZSendEmails) Rows ¶ added in v0.9.0
func (e ZSendEmails) Rows() [][]string
type ZSendOnboardingStatus ¶ added in v0.9.0
type ZSendOnboardingStatus struct {
IsNew bool `graphql:"isNew"`
Submitted bool `graphql:"submitted"`
}
ZSendOnboardingStatus represents the onboarding status of ZSend.
type ZSendUserStatus ¶ added in v0.9.0
type ZSendUserStatus struct {
ID string `graphql:"id"`
UserID string `graphql:"userID"`
Status string `graphql:"status"`
StatusMsg *string `graphql:"statusMsg"`
DailyQuota int `graphql:"dailyQuota"`
DailySent int `graphql:"dailySent"`
QuotaResetAt time.Time `graphql:"quotaResetAt"`
MonthlyQuota int `graphql:"monthlyQuota"`
MonthlySent int `graphql:"monthlySent"`
MonthlyResetAt *time.Time `graphql:"monthlyResetAt"`
QuotaType string `graphql:"quotaType"`
QuotaMode string `graphql:"quotaMode"`
ResourceLimitMode string `graphql:"resourceLimitMode"`
MaxDomains int `graphql:"maxDomains"`
MaxAPIKeys int `graphql:"maxAPIKeys"`
MaxWebhooks int `graphql:"maxWebhooks"`
SentCount24h int `graphql:"sentCount24h"`
BounceCount24h int `graphql:"bounceCount24h"`
ComplaintCount24h int `graphql:"complaintCount24h"`
LastRiskCheckAt time.Time `graphql:"lastRiskCheckAt"`
CreatedAt time.Time `graphql:"createdAt"`
UpdatedAt time.Time `graphql:"updatedAt"`
}
ZSendUserStatus represents the user status of ZSend.
type ZSendWebhook ¶ added in v0.9.0
type ZSendWebhook struct {
ID string `graphql:"id"`
UserID string `graphql:"userID"`
StatusID string `graphql:"statusID"`
Name string `graphql:"name"`
Endpoint string `graphql:"endpoint"`
Events []string `graphql:"events"`
Status string `graphql:"status"`
StatusMsg *string `graphql:"statusMsg"`
Enabled bool `graphql:"enabled"`
TotalSent int `graphql:"totalSent"`
SuccessCount int `graphql:"successCount"`
FailureCount int `graphql:"failureCount"`
LastSentAt *time.Time `graphql:"lastSentAt"`
LastError *string `graphql:"lastError"`
CreatedAt time.Time `graphql:"createdAt"`
UpdatedAt time.Time `graphql:"updatedAt"`
}
ZSendWebhook represents a ZSend webhook.
type ZSendWebhooks ¶ added in v0.9.0
type ZSendWebhooks []*ZSendWebhook
ZSendWebhooks is a list of ZSendWebhook for table display.
func (ZSendWebhooks) Header ¶ added in v0.9.0
func (w ZSendWebhooks) Header() []string
func (ZSendWebhooks) Rows ¶ added in v0.9.0
func (w ZSendWebhooks) Rows() [][]string