Documentation
¶
Index ¶
- Constants
- Variables
- type AccountStatus
- type AddDomainResult
- type BucketMountInput
- type ChatMessage
- type Client
- func (c *Client) AcceptInvite(ctx context.Context, inviteID string) error
- func (c *Client) AddDNSRecord(ctx context.Context, zone, name, recordType, content string, ttl int, ...) (*ZoneRecord, error)
- func (c *Client) AddDomain(ctx context.Context, serviceName, domain, project, workspaceSlug string) (*AddDomainResult, error)
- func (c *Client) CreateProject(ctx context.Context, input CreateProjectInput) (*Project, error)
- func (c *Client) CreateRepo(ctx context.Context, input CreateRepoInput) (*CreateRepoResult, error)
- func (c *Client) CreateService(ctx context.Context, input CreateServiceInput) (*CreateServiceResult, error)
- func (c *Client) CreateWorkspace(ctx context.Context, name, slug, description string) (*Workspace, error)
- func (c *Client) DeclineInvite(ctx context.Context, inviteID string) error
- func (c *Client) DeleteDNSRecord(ctx context.Context, zone, recordID, workspaceSlug string) error
- func (c *Client) DeleteProject(ctx context.Context, slug, workspaceSlug string) error
- func (c *Client) DeleteSecrets(ctx context.Context, input DeleteSecretsInput) error
- func (c *Client) DeleteService(ctx context.Context, input DeleteServiceInput) (*DeleteServiceResult, error)
- func (c *Client) DeleteVolume(ctx context.Context, name, projectSlug, workspaceSlug string) error
- func (c *Client) DeleteWorkspace(ctx context.Context, id string) error
- func (c *Client) DeployTemplate(ctx context.Context, input TemplateDeployInput) (*TemplateDeployResult, error)
- func (c *Client) Exec(ctx context.Context, target ExecInput, command string) (*ExecResult, error)
- func (c *Client) ExecBaseURL() string
- func (c *Client) ExecURL(ctx context.Context, serviceID string) (*ExecSession, error)
- func (c *Client) GetAccountStatus(ctx context.Context) (*AccountStatus, error)
- func (c *Client) GetLogs(ctx context.Context, input LogsInput) (*LogsResult, error)
- func (c *Client) GetMetrics(ctx context.Context, serviceID string, timeRange MetricTimeRange, ...) (*ServiceMetrics, error)
- func (c *Client) GetRepoToken(ctx context.Context, input GetRepoTokenInput) (*GetRepoTokenResult, error)
- func (c *Client) GetService(ctx context.Context, id string) (*Service, error)
- func (c *Client) GetServiceByName(ctx context.Context, name, workspaceSlug, projectSlug string) (*Service, error)
- func (c *Client) GetUsageBillBreakdown(ctx context.Context, workspaceSlug string) (*UsageBillBreakdown, error)
- func (c *Client) InviteToWorkspace(ctx context.Context, workspaceID, user, role string) (*WorkspaceInvite, error)
- func (c *Client) ListDNSRecords(ctx context.Context, zone, workspaceSlug string) ([]ZoneRecord, error)
- func (c *Client) ListDNSZones(ctx context.Context, workspaceSlug string) ([]DNSZone, error)
- func (c *Client) ListMyInvites(ctx context.Context) ([]WorkspaceInvite, error)
- func (c *Client) ListProjects(ctx context.Context, workspaceSlug string) ([]Project, error)
- func (c *Client) ListServices(ctx context.Context, workspaceSlug, projectSlug string) ([]Service, error)
- func (c *Client) ListTemplateInstances(ctx context.Context, project, projectID, workspaceSlug string) ([]TemplateInstance, error)
- func (c *Client) ListTemplates(ctx context.Context, search string) ([]Template, error)
- func (c *Client) ListVolumes(ctx context.Context, workspaceSlug, projectSlug string) ([]VolumeInfo, error)
- func (c *Client) ListWorkspaceInvites(ctx context.Context, workspaceSlug string) ([]WorkspaceInvite, error)
- func (c *Client) ListWorkspaceMembers(ctx context.Context, workspaceSlug string) ([]WorkspaceMember, error)
- func (c *Client) ListWorkspaces(ctx context.Context) ([]Workspace, error)
- func (c *Client) ReadChat(ctx context.Context, workspaceSlug, channel string, cursor, limit int) (*ReadChatResult, error)
- func (c *Client) RemoveDomain(ctx context.Context, serviceName, project, workspaceSlug string) (*RemoveDomainResult, error)
- func (c *Client) RemoveWorkspaceMember(ctx context.Context, workspaceID, userID string) error
- func (c *Client) RevokeInvite(ctx context.Context, inviteID string) error
- func (c *Client) SendChatMessage(ctx context.Context, workspaceSlug, channel, content string) (*SendChatResult, error)
- func (c *Client) SetSecrets(ctx context.Context, input SetSecretsInput) error
- func (c *Client) UpdateService(ctx context.Context, input UpdateServiceInput) (*UpdateServiceResult, error)
- type Config
- type CreateProjectInput
- type CreateRepoInput
- type CreateRepoResult
- type CreateServiceInput
- type CreateServiceResult
- type DNSZone
- type DeleteSecretsInput
- type DeleteServiceInput
- type DeleteServiceResult
- type EnvVar
- type Error
- type Errors
- type ExecInput
- type ExecResult
- type ExecSession
- type GetRepoTokenInput
- type GetRepoTokenResult
- type LogEntry
- type LogType
- type LogsInput
- type LogsResult
- type MetricDataPoint
- type MetricSeries
- type MetricTimeRange
- type Project
- type ReadChatResult
- type RemoveDomainResult
- type SendChatResult
- type Service
- type ServiceMetrics
- type ServicePort
- type ServicePortInput
- type SetSecretsInput
- type SetSecretsResult
- type Template
- type TemplateDeployInput
- type TemplateDeployResult
- type TemplateDeployedOutput
- type TemplateDeployedService
- type TemplateInstance
- type TemplateOutput
- type TemplateService
- type TemplateServiceEndpoint
- type TemplateVariable
- type TemplateVariableValue
- type UpdateServiceInput
- type UpdateServiceResult
- type UsageBillBreakdown
- type UsageLineItem
- type VolumeInfo
- type VolumeSpec
- type Workspace
- type WorkspaceInvite
- type WorkspaceMember
- type ZoneRecord
Constants ¶
View Source
const ( DefaultBaseURL = "https://api.ml.ink/graphql" DefaultExecURL = "wss://exec-eu-central-1.ml.ink" )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type AccountStatus ¶
type AccountStatus struct {
ID string `json:"id"`
Email string `json:"email"`
DisplayName string `json:"displayName"`
Username string `json:"username"`
GitHubUsername string `json:"githubUsername"`
HasGitHubOAuth bool `json:"hasGitHubOAuth"`
HasGitHubApp bool `json:"hasGitHubApp"`
DefaultWorkspace string `json:"defaultWorkspace"`
SubscriptionTier string `json:"subscriptionTier"`
GitHubScopes []string `json:"githubScopes"`
}
type AddDomainResult ¶
type BucketMountInput ¶
type ChatMessage ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) AcceptInvite ¶
func (*Client) AddDNSRecord ¶
func (*Client) CreateProject ¶
func (*Client) CreateRepo ¶
func (c *Client) CreateRepo(ctx context.Context, input CreateRepoInput) (*CreateRepoResult, error)
func (*Client) CreateService ¶
func (c *Client) CreateService(ctx context.Context, input CreateServiceInput) (*CreateServiceResult, error)
func (*Client) CreateWorkspace ¶
func (*Client) DeclineInvite ¶
func (*Client) DeleteDNSRecord ¶
func (*Client) DeleteProject ¶
func (*Client) DeleteSecrets ¶
func (c *Client) DeleteSecrets(ctx context.Context, input DeleteSecretsInput) error
func (*Client) DeleteService ¶
func (c *Client) DeleteService(ctx context.Context, input DeleteServiceInput) (*DeleteServiceResult, error)
func (*Client) DeleteVolume ¶
func (*Client) DeleteWorkspace ¶
func (*Client) DeployTemplate ¶
func (c *Client) DeployTemplate(ctx context.Context, input TemplateDeployInput) (*TemplateDeployResult, error)
func (*Client) ExecBaseURL ¶
func (*Client) GetAccountStatus ¶
func (c *Client) GetAccountStatus(ctx context.Context) (*AccountStatus, error)
func (*Client) GetMetrics ¶
func (c *Client) GetMetrics(ctx context.Context, serviceID string, timeRange MetricTimeRange, maxDataPoints int) (*ServiceMetrics, error)
func (*Client) GetRepoToken ¶
func (c *Client) GetRepoToken(ctx context.Context, input GetRepoTokenInput) (*GetRepoTokenResult, error)
func (*Client) GetService ¶
func (*Client) GetServiceByName ¶
func (*Client) GetUsageBillBreakdown ¶
func (*Client) InviteToWorkspace ¶
func (*Client) ListDNSRecords ¶
func (*Client) ListDNSZones ¶
func (*Client) ListMyInvites ¶
func (c *Client) ListMyInvites(ctx context.Context) ([]WorkspaceInvite, error)
func (*Client) ListProjects ¶
func (*Client) ListServices ¶
func (*Client) ListTemplateInstances ¶
func (*Client) ListTemplates ¶
func (*Client) ListVolumes ¶
func (*Client) ListWorkspaceInvites ¶
func (*Client) ListWorkspaceMembers ¶
func (*Client) ListWorkspaces ¶
func (*Client) RemoveDomain ¶
func (*Client) RemoveWorkspaceMember ¶
func (*Client) RevokeInvite ¶
func (*Client) SendChatMessage ¶
func (*Client) SetSecrets ¶
func (c *Client) SetSecrets(ctx context.Context, input SetSecretsInput) error
func (*Client) UpdateService ¶
func (c *Client) UpdateService(ctx context.Context, input UpdateServiceInput) (*UpdateServiceResult, error)
type CreateProjectInput ¶
type CreateRepoInput ¶
type CreateRepoResult ¶
type CreateServiceInput ¶
type CreateServiceInput struct {
Name string `json:"name,omitempty"`
Subdomain string `json:"subdomain,omitempty"`
Source string `json:"source,omitempty"`
Repo string `json:"repo,omitempty"`
Image string `json:"image,omitempty"`
Host string `json:"host,omitempty"`
Branch string `json:"branch,omitempty"`
Project string `json:"project,omitempty"`
WorkspaceSlug string `json:"workspaceSlug,omitempty"`
BuildPack string `json:"buildPack,omitempty"`
Ports []ServicePortInput `json:"ports,omitempty"`
EnvVars []EnvVar `json:"envVars,omitempty"`
Memory string `json:"memory,omitempty"`
VCPUs string `json:"vcpus,omitempty"`
BuildCommand string `json:"buildCommand,omitempty"`
StartCommand string `json:"startCommand,omitempty"`
PublishDirectory string `json:"publishDirectory,omitempty"`
RootDirectory string `json:"rootDirectory,omitempty"`
DockerfilePath string `json:"dockerfilePath,omitempty"`
Regions []string `json:"regions,omitempty"`
Volumes []VolumeSpec `json:"volumes,omitempty"`
Bucket *BucketMountInput `json:"bucket,omitempty"`
DestroyTimeoutSeconds int `json:"destroyTimeoutSeconds,omitempty"`
TeardownEnabled bool `json:"teardownEnabled,omitempty"`
TeardownOverlapSeconds *int `json:"teardownOverlapSeconds,omitempty"`
TeardownDrainingSeconds *int `json:"teardownDrainingSeconds,omitempty"`
}
type CreateServiceResult ¶
type CreateServiceResult struct {
ServiceID string `json:"serviceId"`
Name string `json:"name"`
Status string `json:"status"`
Repo string `json:"repo"`
Ports []ServicePort `json:"ports"`
}
type DeleteSecretsInput ¶
type DeleteServiceInput ¶
type DeleteServiceResult ¶
type Error ¶
type ExecResult ¶
type ExecSession ¶
type GetRepoTokenInput ¶
type GetRepoTokenResult ¶
type LogsResult ¶
type MetricDataPoint ¶
type MetricSeries ¶
type MetricSeries struct {
Metric string `json:"metric"`
DataPoints []MetricDataPoint `json:"dataPoints"`
}
type MetricTimeRange ¶
type MetricTimeRange string
const ( MetricTimeRangeFiveMinutes MetricTimeRange = "FIVE_MINUTES" MetricTimeRangeOneHour MetricTimeRange = "ONE_HOUR" MetricTimeRangeSixHours MetricTimeRange = "SIX_HOURS" MetricTimeRangeTwentyFourHours MetricTimeRange = "TWENTY_FOUR_HOURS" MetricTimeRangeSevenDays MetricTimeRange = "SEVEN_DAYS" MetricTimeRangeThirtyDays MetricTimeRange = "THIRTY_DAYS" )
type ReadChatResult ¶
type ReadChatResult struct {
Messages []ChatMessage `json:"messages"`
NextCursor int `json:"nextCursor"`
HasMore bool `json:"hasMore"`
}
type RemoveDomainResult ¶
type SendChatResult ¶
type Service ¶
type Service struct {
ID string `json:"id"`
ProjectID string `json:"projectId"`
Name string `json:"name"`
Subdomain string `json:"subdomain"`
Source string `json:"source"`
Repo string `json:"repo"`
Image string `json:"image"`
Branch string `json:"branch"`
Status string `json:"status"`
ErrorMessage string `json:"errorMessage"`
EnvVars []EnvVar `json:"envVars"`
Ports []ServicePort `json:"ports"`
GitProvider string `json:"gitProvider"`
CommitHash string `json:"commitHash"`
Memory string `json:"memory"`
VCPUs string `json:"vcpus"`
CustomDomain string `json:"customDomain"`
CustomDomainStatus string `json:"customDomainStatus"`
BuildPack string `json:"buildPack"`
BuildCommand string `json:"buildCommand"`
StartCommand string `json:"startCommand"`
PublishDirectory string `json:"publishDirectory"`
RootDirectory string `json:"rootDirectory"`
DockerfilePath string `json:"dockerfilePath"`
TeardownEnabled bool `json:"teardownEnabled"`
TeardownOverlapSeconds *int `json:"teardownOverlapSeconds"`
TeardownDrainingSeconds *int `json:"teardownDrainingSeconds"`
DestroyTimeoutSeconds int `json:"destroyTimeoutSeconds"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
}
type ServiceMetrics ¶
type ServiceMetrics struct {
CPUUsage MetricSeries `json:"cpuUsage"`
MemoryUsageMB MetricSeries `json:"memoryUsageMB"`
NetworkReceiveBytesPerSec MetricSeries `json:"networkReceiveBytesPerSec"`
NetworkTransmitBytesPerSec MetricSeries `json:"networkTransmitBytesPerSec"`
MemoryLimitMB float64 `json:"memoryLimitMB"`
CPULimitVCPUs float64 `json:"cpuLimitVCPUs"`
DiskUsageMB MetricSeries `json:"diskUsageMB"`
VolumeSizeGi int `json:"volumeSizeGi"`
}
type ServicePort ¶
type ServicePortInput ¶
type SetSecretsInput ¶
type SetSecretsInput struct {
Name string `json:"name,omitempty"`
ServiceID string `json:"serviceId,omitempty"`
Project string `json:"project,omitempty"`
ProjectID string `json:"projectId,omitempty"`
WorkspaceSlug string `json:"workspaceSlug,omitempty"`
EnvVars []EnvVar `json:"envVars"`
Replace bool `json:"replace,omitempty"`
}
type SetSecretsResult ¶
type Template ¶
type Template struct {
Slug string `json:"slug"`
Name string `json:"name"`
Description string `json:"description"`
Tags []string `json:"tags"`
Icon string `json:"icon"`
Variables []TemplateVariable `json:"variables"`
Services []TemplateService `json:"services"`
Outputs []TemplateOutput `json:"outputs"`
}
type TemplateDeployInput ¶
type TemplateDeployInput struct {
Template string `json:"template"`
Name string `json:"name"`
WorkspaceSlug string `json:"workspaceSlug,omitempty"`
Project string `json:"project,omitempty"`
Variables []TemplateVariableValue `json:"variables,omitempty"`
}
type TemplateDeployResult ¶
type TemplateDeployResult struct {
TemplateInstanceID string `json:"templateInstanceId"`
ProjectID string `json:"projectId"`
Services []TemplateDeployedService `json:"services"`
Outputs []TemplateDeployedOutput `json:"outputs"`
}
type TemplateDeployedOutput ¶
type TemplateDeployedService ¶
type TemplateDeployedService struct {
ServiceID string `json:"serviceId"`
Key string `json:"key"`
Name string `json:"name"`
Status string `json:"status"`
Endpoints []TemplateServiceEndpoint `json:"endpoints"`
}
type TemplateInstance ¶
type TemplateInstance struct {
ID string `json:"id"`
TemplateSlug string `json:"templateSlug"`
ProjectID string `json:"projectId"`
Name string `json:"name"`
Status string `json:"status"`
Services []TemplateDeployedService `json:"services"`
Outputs []TemplateDeployedOutput `json:"outputs"`
CreatedAt string `json:"createdAt"`
}
type TemplateOutput ¶
type TemplateService ¶
type TemplateServiceEndpoint ¶
type TemplateVariable ¶
type TemplateVariableValue ¶
type UpdateServiceInput ¶
type UpdateServiceInput struct {
Name string `json:"name,omitempty"`
ServiceID string `json:"serviceId,omitempty"`
Project string `json:"project,omitempty"`
ProjectID string `json:"projectId,omitempty"`
WorkspaceSlug string `json:"workspaceSlug,omitempty"`
Source *string `json:"source,omitempty"`
Image *string `json:"image,omitempty"`
Repo *string `json:"repo,omitempty"`
Host *string `json:"host,omitempty"`
Branch *string `json:"branch,omitempty"`
BuildPack *string `json:"buildPack,omitempty"`
Memory *string `json:"memory,omitempty"`
VCPUs *string `json:"vcpus,omitempty"`
Ports []ServicePortInput `json:"ports,omitempty"`
EnvVars []EnvVar `json:"envVars,omitempty"`
BuildCommand *string `json:"buildCommand,omitempty"`
StartCommand *string `json:"startCommand,omitempty"`
PublishDirectory *string `json:"publishDirectory,omitempty"`
RootDirectory *string `json:"rootDirectory,omitempty"`
DockerfilePath *string `json:"dockerfilePath,omitempty"`
Volumes []VolumeSpec `json:"volumes,omitempty"`
Bucket *BucketMountInput `json:"bucket,omitempty"`
DestroyTimeoutSeconds *int `json:"destroyTimeoutSeconds,omitempty"`
TeardownEnabled *bool `json:"teardownEnabled,omitempty"`
TeardownOverlapSeconds *int `json:"teardownOverlapSeconds,omitempty"`
TeardownDrainingSeconds *int `json:"teardownDrainingSeconds,omitempty"`
}
type UpdateServiceResult ¶
type UsageBillBreakdown ¶
type UsageBillBreakdown struct {
Memory UsageLineItem `json:"memory"`
CPU UsageLineItem `json:"cpu"`
Egress UsageLineItem `json:"egress"`
Subtotal string `json:"subtotal"`
IncludedUsageCents int `json:"includedUsageCents"`
PlanFeeCents int `json:"planFeeCents"`
CurrentBillCents int `json:"currentBillCents"`
PeriodStart string `json:"periodStart"`
PeriodEnd string `json:"periodEnd"`
}
type UsageLineItem ¶
type VolumeInfo ¶
type VolumeSpec ¶
type WorkspaceInvite ¶
type WorkspaceInvite struct {
ID string `json:"id"`
WorkspaceID string `json:"workspaceId"`
WorkspaceName string `json:"workspaceName"`
WorkspaceSlug string `json:"workspaceSlug"`
InviterDisplayName string `json:"inviterDisplayName"`
InviteeDisplayName string `json:"inviteeDisplayName"`
Role string `json:"role"`
Status string `json:"status"`
CreatedAt string `json:"createdAt"`
}
type WorkspaceMember ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.