Documentation
¶
Index ¶
- Constants
- type Account
- type Allocation
- type AllocationAttributes
- type AllocationDescriptor
- type ApiError
- type ApiKey
- type AppServer
- type Application
- func (a *Application) CreateLocation(short, long string) (*Location, error)
- func (a *Application) CreateNode(fields CreateNodeDescriptor) (*Node, error)
- func (a *Application) CreateNodeAllocations(node int, fields CreateAllocationsDescriptor) error
- func (a *Application) CreateServer(fields CreateServerDescriptor) (*AppServer, error)
- func (a *Application) CreateUser(fields CreateUserDescriptor) (*User, error)
- func (a *Application) DeleteLocation(id int) error
- func (a *Application) DeleteNode(id int) error
- func (a *Application) DeleteNodeAllocation(node, id int) error
- func (a *Application) DeleteServer(id int, force bool) error
- func (a *Application) DeleteUser(id int) error
- func (a *Application) GetDeployableNodes(fields DeployableNodesDescriptor) ([]*Node, error)
- func (a *Application) GetEgg(nest, id int) (*Egg, error)
- func (a *Application) GetEggVariables(nest, id int) ([]*EggVariable, error)
- func (a *Application) GetEggs(nest int) ([]*Egg, error)
- func (a *Application) GetLocation(id int) (*Location, error)
- func (a *Application) GetLocations() ([]*Location, error)
- func (a *Application) GetNest(id int) (*Nest, error)
- func (a *Application) GetNests() ([]*Nest, error)
- func (a *Application) GetNode(id int) (*Node, error)
- func (a *Application) GetNodeAllocations(node int, query url.Values) ([]*Allocation, error)
- func (a *Application) GetNodeConfiguration(id int) (*NodeConfiguration, error)
- func (a *Application) GetNodes(query url.Values) ([]*Node, error)
- func (a *Application) GetServer(id int) (*AppServer, error)
- func (a *Application) GetServerExternal(id string) (*AppServer, error)
- func (a *Application) GetServers() ([]*AppServer, error)
- func (a *Application) GetUser(id int) (*User, error)
- func (a *Application) GetUserExternal(id string) (*User, error)
- func (a *Application) GetUsers() ([]*User, error)
- func (a *Application) SuspendServer(id int) error
- func (a *Application) UnsuspendServer(id int) error
- func (a *Application) UpdateLocation(id int, short, long string) (*Location, error)
- func (a *Application) UpdateNode(id int, fields UpdateNodeDescriptor) (*Node, error)
- func (a *Application) UpdateServerBuild(id int, fields ServerBuildDescriptor) (*AppServer, error)
- func (a *Application) UpdateServerDetails(id int, fields ServerDetailsDescriptor) (*AppServer, error)
- func (a *Application) UpdateServerStartup(id int, fields ServerStartupDescriptor) (*AppServer, error)
- func (a *Application) UpdateUser(id int, fields UpdateUserDescriptor) (*User, error)
- type ChmodDescriptor
- type Client
- func (c *Client) ChangeNotes(identifier string, allocationID int64, notes string) (*AllocationAttributes, error)
- func (c *Client) ChmodServerFiles(identifier string, files ChmodDescriptor) error
- func (c *Client) CompressServerFiles(identifier string, files CompressDescriptor) error
- func (c *Client) CopyServerFile(identifier, location string) error
- func (c *Client) CreateAllocation(identifier string) (*AllocationAttributes, error)
- func (c *Client) CreateBackup(identifier string, name string, ignored string, isLocked bool) error
- func (c *Client) CreateDatabase(identifier, remote, database string) (*ClientDatabase, error)
- func (c *Client) CreateKey(description string, ips []string) (*ApiKey, error)
- func (c *Client) CreateSchedule(identifier string, newSchedule UpdateScheduleParams) (*ClientSchedule, error)
- func (c *Client) CreateScheduleTasks(identifier string, scheduleID int64, task Task) error
- func (c *Client) CreateServerFileFolder(identifier string, file CreateFolderDescriptor) error
- func (c *Client) DecompressServerFile(identifier string, file DecompressDescriptor) error
- func (c *Client) DeleteAllocation(identifier string, allocationID int64) error
- func (c *Client) DeleteBackup(identifier string, backupID string) error
- func (c *Client) DeleteDatabase(identifier, id string) error
- func (c *Client) DeleteKey(identifier string) error
- func (c *Client) DeleteSchedule(identifier string, scheduleID int64) error
- func (c *Client) DeleteScheduleTask(identifier string, scheduleID int64, taskID int64) error
- func (c *Client) DeleteServerFiles(identifier string, files DeleteFilesDescriptor) error
- func (c *Client) DisableTwoFactor(password string) error
- func (c *Client) DownloadBackup(identifier string, backupID string) (*DownloadBackupURL, error)
- func (c *Client) DownloadServerFile(identifier, file string) (*Downloader, error)
- func (c *Client) EnableTwoFactor(code int) ([]string, error)
- func (c *Client) ExecuteSchedule(identifier string, scheduleID int64) error
- func (c *Client) GetAccount() (*Account, error)
- func (c *Client) GetAllocations(identifier string) ([]*AllocationAttributes, error)
- func (c *Client) GetApiKeys() ([]*ApiKey, error)
- func (c *Client) GetBackup(identifier string, backupID string) (*ClientBackup, error)
- func (c *Client) GetBackups(identifier string) ([]*ClientBackup, error)
- func (c *Client) GetSchedule(identifier string, scheduleID int64) (*ClientSchedule, error)
- func (c *Client) GetScheduleTasks(identifier string, scheduleID int64) ([]*TasksData, error)
- func (c *Client) GetSchedules(identifier string) ([]*ClientSchedule, error)
- func (c *Client) GetServer(identifier string) (*ClientServer, error)
- func (c *Client) GetServerDatabases(identifier string) ([]*ClientDatabase, error)
- func (c *Client) GetServerFileContents(identifier, file string) ([]byte, error)
- func (c *Client) GetServerFiles(identifier, root string) ([]*File, error)
- func (c *Client) GetServerResources(identifier string) (*Resources, error)
- func (c *Client) GetServerWebSocket(identifier string, query url.Values) (*WebSocketAuth, error)
- func (c *Client) GetServers() ([]*ClientServer, error)
- func (c *Client) GetStartupInfo(identifier string) (*Meta, error)
- func (c *Client) GetTwoFactor() (*TwoFactorData, error)
- func (c *Client) GetUploadUrl(identifier string) (string, error)
- func (c *Client) GetVariables(identifier string) ([]*StartupEggVariable, error)
- func (c *Client) LockBackup(identifier string, backupID string) error
- func (c *Client) MakePrimary(identifier string, allocationID int64) (*AllocationAttributes, error)
- func (c *Client) PullServerFile(identifier string, file PullDescriptor) error
- func (c *Client) PutVariable(identifier, key, value string) error
- func (c *Client) Reinstall(identifier string) error
- func (c *Client) RenameServerFiles(identifier string, files RenameDescriptor) error
- func (c *Client) RestoreBackup(identifier string, backupID string, truncate bool) error
- func (c *Client) RotateDatabasePassword(identifier, id string) (*ClientDatabase, error)
- func (c *Client) SendServerCommand(identifier, command string) error
- func (c *Client) SetServerPowerState(identifier, state string) error
- func (c *Client) UpdateDockerImage(identifier string, dockerImage string) error
- func (c *Client) UpdateEmail(email, password string) error
- func (c *Client) UpdatePassword(old, new string) error
- func (c *Client) UpdateSchedule(identifier string, updatedSchedule UpdateScheduleParams, scheduleID int64) error
- func (c *Client) UpdateScheduleTasks(identifier string, scheduleID int64, taskID int64, task Task) error
- func (c *Client) UploadServerFile(identifier string) (*Uploader, error)
- func (c *Client) WriteServerFile(identifier, name, content string) error
- func (c *Client) WriteServerFileBytes(identifier, name, header string, content []byte) error
- type ClientBackup
- type ClientDatabase
- type ClientSchedule
- type ClientServer
- type CompressDescriptor
- type CreateAllocationsDescriptor
- type CreateFolderDescriptor
- type CreateNodeDescriptor
- type CreateServerDescriptor
- type CreateUserDescriptor
- type Cron
- type DecompressDescriptor
- type DeleteFilesDescriptor
- type DeployDescriptor
- type DeployableNodesDescriptor
- type DownloadBackupURL
- type Downloader
- type Egg
- type EggVariable
- type Error
- type FeatureLimits
- type File
- type Limits
- type Location
- type Meta
- type Nest
- type Node
- type NodeConfiguration
- type Object
- type ObjectList
- type PullDescriptor
- type RenameDescriptor
- type ResourceUsage
- type Resources
- type ServerBuildDescriptor
- type ServerDetailsDescriptor
- type ServerStartupDescriptor
- type StartupEggVariable
- type Task
- type TasksData
- type TasksInfo
- type TwoFactorData
- type UpdateNodeDescriptor
- type UpdateScheduleParams
- type UpdateUserDescriptor
- type Uploader
- type User
- type WebSocketAuth
Constants ¶
View Source
const Version = "1.0.0"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Allocation ¶
type AllocationAttributes ¶ added in v0.2.13
type AllocationDescriptor ¶
type AppServer ¶
type AppServer struct {
ID int `json:"id"`
ExternalID string `json:"external_id"`
UUID string `json:"uuid"`
Identifier string `json:"identifier"`
Name string `json:"name"`
Description string `json:"description"`
Status string `json:"status,omitempty"`
Suspended bool `json:"suspended"`
Limits Limits `json:"limits"`
FeatureLimits FeatureLimits `json:"feature_limits"`
User int `json:"user"`
Node int `json:"node"`
Allocation int `json:"allocation"`
Nest int `json:"nest"`
Egg int `json:"egg"`
Container struct {
StartupCommand string `json:"startup_command"`
Image string `json:"image"`
Installed int `json:"installed"`
Environment map[string]interface{} `json:"environment"`
} `json:"container"`
CreatedAt *time.Time `json:"created_at"`
UpdatedAt *time.Time `json:"updated_at,omitempty"`
}
func (*AppServer) BuildDescriptor ¶
func (s *AppServer) BuildDescriptor() *ServerBuildDescriptor
func (*AppServer) DetailsDescriptor ¶
func (s *AppServer) DetailsDescriptor() *ServerDetailsDescriptor
func (*AppServer) StartupDescriptor ¶
func (s *AppServer) StartupDescriptor() *ServerStartupDescriptor
type Application ¶
func NewApp ¶
func NewApp(url, key string) (*Application, error)
func (*Application) CreateLocation ¶
func (a *Application) CreateLocation(short, long string) (*Location, error)
func (*Application) CreateNode ¶
func (a *Application) CreateNode(fields CreateNodeDescriptor) (*Node, error)
func (*Application) CreateNodeAllocations ¶
func (a *Application) CreateNodeAllocations(node int, fields CreateAllocationsDescriptor) error
func (*Application) CreateServer ¶
func (a *Application) CreateServer(fields CreateServerDescriptor) (*AppServer, error)
func (*Application) CreateUser ¶
func (a *Application) CreateUser(fields CreateUserDescriptor) (*User, error)
func (*Application) DeleteLocation ¶
func (a *Application) DeleteLocation(id int) error
func (*Application) DeleteNode ¶
func (a *Application) DeleteNode(id int) error
func (*Application) DeleteNodeAllocation ¶
func (a *Application) DeleteNodeAllocation(node, id int) error
func (*Application) DeleteServer ¶
func (a *Application) DeleteServer(id int, force bool) error
func (*Application) DeleteUser ¶
func (a *Application) DeleteUser(id int) error
func (*Application) GetDeployableNodes ¶
func (a *Application) GetDeployableNodes(fields DeployableNodesDescriptor) ([]*Node, error)
func (*Application) GetEggVariables ¶
func (a *Application) GetEggVariables(nest, id int) ([]*EggVariable, error)
func (*Application) GetLocation ¶
func (a *Application) GetLocation(id int) (*Location, error)
func (*Application) GetLocations ¶
func (a *Application) GetLocations() ([]*Location, error)
func (*Application) GetNests ¶
func (a *Application) GetNests() ([]*Nest, error)
func (*Application) GetNodeAllocations ¶
func (a *Application) GetNodeAllocations(node int, query url.Values) ([]*Allocation, error)
func (*Application) GetNodeConfiguration ¶
func (a *Application) GetNodeConfiguration(id int) (*NodeConfiguration, error)
func (*Application) GetServerExternal ¶
func (a *Application) GetServerExternal(id string) (*AppServer, error)
func (*Application) GetServers ¶
func (a *Application) GetServers() ([]*AppServer, error)
func (*Application) GetUserExternal ¶
func (a *Application) GetUserExternal(id string) (*User, error)
func (*Application) GetUsers ¶
func (a *Application) GetUsers() ([]*User, error)
func (*Application) SuspendServer ¶
func (a *Application) SuspendServer(id int) error
func (*Application) UnsuspendServer ¶
func (a *Application) UnsuspendServer(id int) error
func (*Application) UpdateLocation ¶
func (a *Application) UpdateLocation(id int, short, long string) (*Location, error)
func (*Application) UpdateNode ¶
func (a *Application) UpdateNode(id int, fields UpdateNodeDescriptor) (*Node, error)
func (*Application) UpdateServerBuild ¶
func (a *Application) UpdateServerBuild(id int, fields ServerBuildDescriptor) (*AppServer, error)
func (*Application) UpdateServerDetails ¶
func (a *Application) UpdateServerDetails(id int, fields ServerDetailsDescriptor) (*AppServer, error)
func (*Application) UpdateServerStartup ¶
func (a *Application) UpdateServerStartup(id int, fields ServerStartupDescriptor) (*AppServer, error)
func (*Application) UpdateUser ¶
func (a *Application) UpdateUser(id int, fields UpdateUserDescriptor) (*User, error)
type ChmodDescriptor ¶
type Client ¶
func (*Client) ChangeNotes ¶ added in v0.2.14
func (*Client) ChmodServerFiles ¶
func (c *Client) ChmodServerFiles(identifier string, files ChmodDescriptor) error
func (*Client) CompressServerFiles ¶
func (c *Client) CompressServerFiles(identifier string, files CompressDescriptor) error
func (*Client) CopyServerFile ¶
func (*Client) CreateAllocation ¶ added in v0.2.14
func (c *Client) CreateAllocation(identifier string) (*AllocationAttributes, error)
func (*Client) CreateBackup ¶ added in v0.2.56
func (*Client) CreateDatabase ¶
func (c *Client) CreateDatabase(identifier, remote, database string) (*ClientDatabase, error)
func (*Client) CreateSchedule ¶ added in v0.2.55
func (c *Client) CreateSchedule(identifier string, newSchedule UpdateScheduleParams) (*ClientSchedule, error)
func (*Client) CreateScheduleTasks ¶ added in v0.2.21
func (*Client) CreateServerFileFolder ¶
func (c *Client) CreateServerFileFolder(identifier string, file CreateFolderDescriptor) error
func (*Client) DecompressServerFile ¶
func (c *Client) DecompressServerFile(identifier string, file DecompressDescriptor) error
func (*Client) DeleteAllocation ¶ added in v0.2.14
func (*Client) DeleteBackup ¶ added in v0.2.23
func (*Client) DeleteDatabase ¶
func (*Client) DeleteSchedule ¶ added in v0.2.21
func (*Client) DeleteScheduleTask ¶ added in v0.2.52
func (*Client) DeleteServerFiles ¶
func (c *Client) DeleteServerFiles(identifier string, files DeleteFilesDescriptor) error
func (*Client) DisableTwoFactor ¶
func (*Client) DownloadBackup ¶ added in v0.2.23
func (c *Client) DownloadBackup(identifier string, backupID string) (*DownloadBackupURL, error)
func (*Client) DownloadServerFile ¶
func (c *Client) DownloadServerFile(identifier, file string) (*Downloader, error)
func (*Client) ExecuteSchedule ¶ added in v0.2.21
func (*Client) GetAccount ¶
func (*Client) GetAllocations ¶ added in v0.2.11
func (c *Client) GetAllocations(identifier string) ([]*AllocationAttributes, error)
func (*Client) GetApiKeys ¶
func (*Client) GetBackup ¶ added in v0.2.23
func (c *Client) GetBackup(identifier string, backupID string) (*ClientBackup, error)
func (*Client) GetBackups ¶ added in v0.2.23
func (c *Client) GetBackups(identifier string) ([]*ClientBackup, error)
func (*Client) GetSchedule ¶ added in v0.2.22
func (c *Client) GetSchedule(identifier string, scheduleID int64) (*ClientSchedule, error)
func (*Client) GetScheduleTasks ¶ added in v0.2.21
func (*Client) GetSchedules ¶ added in v0.2.21
func (c *Client) GetSchedules(identifier string) ([]*ClientSchedule, error)
func (*Client) GetServerDatabases ¶
func (c *Client) GetServerDatabases(identifier string) ([]*ClientDatabase, error)
func (*Client) GetServerFileContents ¶
func (*Client) GetServerFiles ¶
func (*Client) GetServerResources ¶
func (*Client) GetServerWebSocket ¶
func (*Client) GetServers ¶
func (c *Client) GetServers() ([]*ClientServer, error)
func (*Client) GetStartupInfo ¶ added in v0.2.17
func (*Client) GetTwoFactor ¶
func (c *Client) GetTwoFactor() (*TwoFactorData, error)
func (*Client) GetUploadUrl ¶ added in v0.2.10
func (*Client) GetVariables ¶ added in v0.2.17
func (c *Client) GetVariables(identifier string) ([]*StartupEggVariable, error)
func (*Client) LockBackup ¶ added in v0.2.23
func (*Client) MakePrimary ¶ added in v0.2.15
func (c *Client) MakePrimary(identifier string, allocationID int64) (*AllocationAttributes, error)
func (*Client) PullServerFile ¶
func (c *Client) PullServerFile(identifier string, file PullDescriptor) error
func (*Client) PutVariable ¶ added in v0.2.17
func (*Client) RenameServerFiles ¶
func (c *Client) RenameServerFiles(identifier string, files RenameDescriptor) error
func (*Client) RestoreBackup ¶ added in v0.2.23
func (*Client) RotateDatabasePassword ¶
func (c *Client) RotateDatabasePassword(identifier, id string) (*ClientDatabase, error)
func (*Client) SendServerCommand ¶
func (*Client) SetServerPowerState ¶
func (*Client) UpdateDockerImage ¶ added in v0.2.17
func (*Client) UpdateEmail ¶
func (*Client) UpdatePassword ¶
func (*Client) UpdateSchedule ¶ added in v0.2.21
func (c *Client) UpdateSchedule(identifier string, updatedSchedule UpdateScheduleParams, scheduleID int64) error
func (*Client) UpdateScheduleTasks ¶ added in v0.2.21
func (*Client) UploadServerFile ¶
func (*Client) WriteServerFile ¶
type ClientBackup ¶ added in v0.2.58
type ClientBackup struct {
Uuid string `json:"uuid"`
Name string `json:"name"`
IgnoredFiles []string `json:"ignored_files"`
Checksum string `json:"checksum"`
Bytes int `json:"bytes"`
CreatedAt time.Time `json:"created_at"`
CompletedAt *time.Time `json:"completed_at"`
IsSuccessful bool `json:"is_successful"`
IsLocked bool `json:"is_locked"`
}
type ClientDatabase ¶
type ClientDatabase struct {
ID string `json:"id"`
Name string `json:"name"`
Username string `json:"username"`
Host struct {
Address string `json:"address"`
Port int64 `json:"port"`
} `json:"host"`
ConnectionsFrom string `json:"connections_from"`
MaxConnections int `json:"max_connections"`
Relationships struct {
Password struct {
Object string `json:"object"`
Attributes struct {
Password string `json:"password"`
} `json:"attributes"`
} `json:"password"`
} `json:"relationships"`
}
type ClientSchedule ¶ added in v0.2.55
type ClientSchedule struct {
ID int `json:"id"`
Name string `json:"name"`
Cron Cron `json:"cron"`
IsActive bool `json:"is_active"`
IsProcessing bool `json:"is_processing"`
OnlyWhenOnline bool `json:"only_when_online"`
LastRunAt *time.Time `json:"last_run_at"`
NextRunAt time.Time `json:"next_run_at"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type ClientServer ¶
type ClientServer struct {
ServerOwner bool `json:"server_owner"`
Identifier string `json:"identifier"`
UUID string `json:"uuid"`
InternalID int `json:"internal_id"`
Name string `json:"name"`
Node string `json:"node"`
SFTP struct {
IP string `json:"ip"`
Port int64 `json:"port"`
} `json:"sftp_details"`
Description string `json:"description"`
Limits Limits `json:"limits"`
Invocation string `json:"invocation"`
DockerImage string `json:"docker_image"`
EggFeatures []string `json:"egg_features"`
FeatureLimits FeatureLimits `json:"feature_limits"`
Status string `json:"status"`
Suspended bool `json:"is_suspended"`
Installing bool `json:"is_installing"`
Transferring bool `json:"is_transferring"`
UnderMaintenance bool `json:"is_node_under_maintenance"`
}
type CompressDescriptor ¶
type CreateFolderDescriptor ¶
type CreateNodeDescriptor ¶
type CreateNodeDescriptor struct {
Name string `json:"name"`
Description string `json:"description"`
LocationID int `json:"location_id"`
Public bool `json:"public"`
FQDN string `json:"fqdn"`
Scheme string `json:"scheme"`
BehindProxy bool `json:"behind_proxy"`
Memory int64 `json:"memory"`
MemoryOverallocate int64 `json:"memory_overallocate"`
Disk int64 `json:"disk"`
DiskOverallocate int64 `json:"disk_overallocate"`
DaemonBase string `json:"daemon_base"`
DaemonSftp int32 `json:"daemon_sftp"`
DaemonListen int32 `json:"daemon_listen"`
UploadSize int64 `json:"upload_size"`
}
type CreateServerDescriptor ¶
type CreateServerDescriptor struct {
ExternalID string `json:"external_id,omitempty"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
User int `json:"user"`
Egg int `json:"egg"`
DockerImage string `json:"docker_image"`
Startup string `json:"startup"`
Environment map[string]interface{} `json:"environment"`
SkipScripts bool `json:"skip_scripts,omitempty"`
OOMDisabled bool `json:"oom_disabled"`
Limits *Limits `json:"limits"`
FeatureLimtis FeatureLimits `json:"feature_limits"`
Allocation *AllocationDescriptor `json:"allocation,omitempty"`
Deploy *DeployDescriptor `json:"deploy,omitempty"`
StartOnCompletion bool `json:"start_on_completion,omitempty"`
}
type CreateUserDescriptor ¶
type CreateUserDescriptor struct {
ExternalID string `json:"external_id,omitempty"`
Email string `json:"email"`
Username string `json:"username"`
Password string `json:"password,omitempty"`
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
Language string `json:"language,omitempty"`
RootAdmin bool `json:"root_admin,omitempty"`
}
type DecompressDescriptor ¶
type DeleteFilesDescriptor ¶
type DeployDescriptor ¶
type DownloadBackupURL ¶ added in v0.2.23
type DownloadBackupURL struct {
URL string `json:"url"`
}
type Downloader ¶
func (*Downloader) Client ¶
func (d *Downloader) Client() *Client
func (*Downloader) Execute ¶
func (d *Downloader) Execute() error
func (*Downloader) URL ¶
func (d *Downloader) URL() string
type Egg ¶
type Egg struct {
ID int `json:"id"`
UUID string `json:"uuid"`
Name string `json:"name"`
Nest int `json:"nest"`
Author string `json:"author"`
Description string `json:"description"`
DockerImage string `json:"docker_image"`
DockerImages map[string]string `json:"docker_images"`
Config struct {
Files map[string]any `json:"files"`
Startup struct {
Done string `json:"done"`
UserInteraction []string `json:"userInteraction"`
} `json:"startup"`
Stop string `json:"stop"`
} `json:"config"`
Startup string `json:"startup"`
Script struct {
Privileged bool `json:"privileged"`
Install string `json:"install"`
Entry string `json:"entry"`
Container string `json:"container"`
} `json:"script"`
CreatedAt *time.Time `json:"created_at"`
UpdatedAt *time.Time `json:"updated_at,omitempty"`
}
type EggVariable ¶
type EggVariable struct {
ID int `json:"id"`
Egg int `json:"egg"`
Name string `json:"name"`
Description string `json:"description"`
EnvVariable string `json:"env_variable"`
DefaultValue string `json:"default_value"`
Rules string `json:"rules"`
UserViewable bool `json:"user_viewable"`
UserEditable bool `json:"user_editable"`
CreatedAt *time.Time `json:"created_at"`
UpdatedAt *time.Time `json:"updated_at,omitempty"`
}
type Error ¶
type FeatureLimits ¶
type File ¶
type File struct {
Name string `json:"name"`
Mode string `json:"mode"`
ModeBits string `json:"mode_bits"`
Size int64 `json:"size"`
IsFile bool `json:"is_file"`
IsSymlink bool `json:"is_symlink"`
MimeType string `json:"mimetype"`
CreatedAt *time.Time `json:"created_at"`
ModifiedAt *time.Time `json:"modified_at,omitempty"`
}
type Node ¶
type Node struct {
ID int `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
LocationID int `json:"location_id"`
Public bool `json:"public"`
FQDN string `json:"fqdn"`
Scheme string `json:"scheme"`
BehindProxy bool `json:"behind_proxy"`
Memory int64 `json:"memory"`
MemoryOverallocate int64 `json:"memory_overallocate"`
Disk int64 `json:"disk"`
DiskOverallocate int64 `json:"disk_overallocate"`
DaemonBase string `json:"daemon_base"`
DaemonSftp int32 `json:"daemon_sftp"`
DaemonListen int32 `json:"daemon_listen"`
MaintenanceMode bool `json:"maintenance_mode"`
UploadSize int64 `json:"upload_size"`
CreatedAt *time.Time `json:"created_at"`
UpdatedAt *time.Time `json:"updated_at,omitempty"`
}
func (*Node) UpdateDescriptor ¶
func (n *Node) UpdateDescriptor() *UpdateNodeDescriptor
type NodeConfiguration ¶
type NodeConfiguration struct {
Debug bool `json:"debug"`
UUID string `json:"uuid"`
TokenID string `json:"token_id"`
Token string `json:"token"`
API struct {
Host string `json:"host"`
Port int32 `json:"port"`
SSL struct {
Enabled bool `json:"enabled"`
Cert string `json:"cert"`
Key string `json:"key"`
} `json:"ssl"`
UploadLimit int64 `json:"upload_limit"`
} `json:"api"`
System struct {
Data string `json:"data"`
SFTP struct {
BindPort int32 `json:"bind_port"`
} `json:"sftp"`
} `json:"system"`
AllowedMounts []string `json:"allowed_mounts"`
Remote string `json:"remote"`
}
type ObjectList ¶ added in v0.2.55
func (*ObjectList[T]) IterObjects ¶ added in v0.2.55
func (l *ObjectList[T]) IterObjects() iter.Seq[T]
func (*ObjectList[T]) Objects ¶ added in v0.2.55
func (l *ObjectList[T]) Objects() []T
type PullDescriptor ¶
type RenameDescriptor ¶
type ResourceUsage ¶
type Resources ¶
type Resources struct {
State string `json:"current_state,omitempty"`
Suspended bool `json:"is_suspended"`
Usage ResourceUsage `json:"resources"`
}
type ServerBuildDescriptor ¶
type ServerBuildDescriptor struct {
Allocation int `json:"allocation,omitempty"`
OOMDisabled bool `json:"oom_disabled,omitempty"`
Limits Limits `json:"limits,omitempty"`
AddAllocations []int `json:"add_allocations,omitempty"`
RemoveAllocations []int `json:"remove_allocations,omitempty"`
FeatureLimits FeatureLimits `json:"feature_limits,omitempty"`
}
type ServerDetailsDescriptor ¶
type ServerStartupDescriptor ¶
type StartupEggVariable ¶ added in v0.2.49
type TasksData ¶ added in v0.2.47
type TasksData struct {
Id int `json:"id"`
SequenceId int `json:"sequence_id"`
Action string `json:"action"`
Payload string `json:"payload"`
TimeOffset int `json:"time_offset"`
IsQueued bool `json:"is_queued"`
ContinueOnFailure bool `json:"continue_on_failure"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type TwoFactorData ¶
type UpdateNodeDescriptor ¶
type UpdateNodeDescriptor struct {
Name string `json:"name"`
Description string `json:"description"`
LocationID int `json:"location_id"`
Public bool `json:"public"`
FQDN string `json:"fqdn"`
Scheme string `json:"scheme"`
BehindProxy bool `json:"behind_proxy"`
Memory int64 `json:"memory"`
MemoryOverallocate int64 `json:"memory_overallocate"`
Disk int64 `json:"disk"`
DiskOverallocate int64 `json:"disk_overallocate"`
DaemonBase string `json:"daemon_base"`
DaemonSftp int32 `json:"daemon_sftp"`
DaemonListen int32 `json:"daemon_listen"`
UploadSize int64 `json:"upload_size"`
}
type UpdateScheduleParams ¶ added in v0.2.40
type UpdateScheduleParams struct {
DayOfMonth string `json:"day_of_month"`
DayOfWeek string `json:"day_of_week"`
Hour string `json:"hour"`
IsActive bool `json:"is_active"`
Minute string `json:"minute"`
Month string `json:"month"`
Name string `json:"name"`
OnlyWhenOnline bool `json:"only_when_online"`
}
type UpdateUserDescriptor ¶
type UpdateUserDescriptor struct {
ExternalID string `json:"external_id,omitempty"`
Email string `json:"email,omitempty"`
Username string `json:"username,omitempty"`
Password string `json:"password,omitempty"`
FirstName string `json:"first_name,omitempty"`
LastName string `json:"last_name,omitempty"`
Language string `json:"language,omitempty"`
RootAdmin bool `json:"root_admin,omitempty"`
}
type User ¶
type User struct {
ID int `json:"id"`
ExternalID string `json:"external_id"`
UUID string `json:"uuid"`
Username string `json:"username"`
Email string `json:"email"`
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
Language string `json:"language"`
RootAdmin bool `json:"root_admin"`
TwoFactor bool `json:"2fa"`
CreatedAt *time.Time `json:"created_at"`
UpdatedAt *time.Time `json:"updated_at,omitempty"`
}
func (*User) UpdateDescriptor ¶
func (u *User) UpdateDescriptor() *UpdateUserDescriptor
type WebSocketAuth ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.