Documentation
¶
Overview ¶
Package applesilicon provides methods and message types of the applesilicon v1alpha1 API.
Index ¶
- Constants
- type API
- func (s *API) CreateServer(req *CreateServerRequest, opts ...scw.RequestOption) (*Server, error)
- func (s *API) DeleteServer(req *DeleteServerRequest, opts ...scw.RequestOption) error
- func (s *API) GetOS(req *GetOSRequest, opts ...scw.RequestOption) (*OS, error)
- func (s *API) GetServer(req *GetServerRequest, opts ...scw.RequestOption) (*Server, error)
- func (s *API) GetServerType(req *GetServerTypeRequest, opts ...scw.RequestOption) (*ServerType, error)
- func (s *API) ListOS(req *ListOSRequest, opts ...scw.RequestOption) (*ListOSResponse, error)
- func (s *API) ListServerTypes(req *ListServerTypesRequest, opts ...scw.RequestOption) (*ListServerTypesResponse, error)
- func (s *API) ListServers(req *ListServersRequest, opts ...scw.RequestOption) (*ListServersResponse, error)
- func (s *API) RebootServer(req *RebootServerRequest, opts ...scw.RequestOption) (*Server, error)
- func (s *API) ReinstallServer(req *ReinstallServerRequest, opts ...scw.RequestOption) (*Server, error)
- func (s *API) UpdateServer(req *UpdateServerRequest, opts ...scw.RequestOption) (*Server, error)
- func (s *API) WaitForServer(req *WaitForServerRequest, opts ...scw.RequestOption) (*Server, error)
- func (s *API) Zones() []scw.Zone
- type CreateServerRequest
- type DeleteServerRequest
- type GetOSRequest
- type GetServerRequest
- type GetServerTypeRequest
- type ListOSRequest
- type ListOSResponse
- type ListServerTypesRequest
- type ListServerTypesResponse
- type ListServersRequest
- type ListServersRequestOrderBy
- type ListServersResponse
- type OS
- type RebootServerRequest
- type ReinstallServerRequest
- type Server
- type ServerStatus
- type ServerType
- type ServerTypeCPU
- type ServerTypeDisk
- type ServerTypeMemory
- type ServerTypeStock
- type UpdateServerRequest
- type WaitForServerRequest
Constants ¶
const ( // ListServersRequestOrderByCreatedAtAsc is [insert doc]. ListServersRequestOrderByCreatedAtAsc = ListServersRequestOrderBy("created_at_asc") // ListServersRequestOrderByCreatedAtDesc is [insert doc]. ListServersRequestOrderByCreatedAtDesc = ListServersRequestOrderBy("created_at_desc") )
const ( // ServerStatusUnknownStatus is [insert doc]. ServerStatusUnknownStatus = ServerStatus("unknown_status") // ServerStatusStarting is [insert doc]. ServerStatusStarting = ServerStatus("starting") // ServerStatusReady is [insert doc]. ServerStatusReady = ServerStatus("ready") // ServerStatusError is [insert doc]. ServerStatusError = ServerStatus("error") // ServerStatusRebooting is [insert doc]. ServerStatusRebooting = ServerStatus("rebooting") // ServerStatusUpdating is [insert doc]. ServerStatusUpdating = ServerStatus("updating") // ServerStatusLocking is [insert doc]. ServerStatusLocking = ServerStatus("locking") // ServerStatusLocked is [insert doc]. ServerStatusLocked = ServerStatus("locked") // ServerStatusUnlocking is [insert doc]. ServerStatusUnlocking = ServerStatus("unlocking") // ServerStatusReinstalling is [insert doc]. ServerStatusReinstalling = ServerStatus("reinstalling") )
const ( // ServerTypeStockUnknownStock is [insert doc]. ServerTypeStockUnknownStock = ServerTypeStock("unknown_stock") // ServerTypeStockNoStock is [insert doc]. ServerTypeStockNoStock = ServerTypeStock("no_stock") // ServerTypeStockLowStock is [insert doc]. ServerTypeStockLowStock = ServerTypeStock("low_stock") // ServerTypeStockHighStock is [insert doc]. ServerTypeStockHighStock = ServerTypeStock("high_stock") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API: apple Mac mini M1 as a service
Scaleway Apple silicon M1 as-a-Service is built using the latest generation of Apple Mac mini hardware (fifth generation).
These dedicated Mac mini M1s are designed for developing, building, testing, and signing applications for Apple devices, including iPhones, iPads, Mac computers and much more.
Get set to explore, learn and build on a dedicated Mac mini M1 with more performance and speed than you ever thought possible.
**Apple silicon as a Service comes with a minimum allocation period of 24 hours**.
Mac mini and macOS are trademarks of Apple Inc., registered in the U.S. and other countries and regions. IOS is a trademark or registered trademark of Cisco in the U.S. and other countries and is used by Apple under license. Scaleway is not affiliated with Apple Inc.
func (*API) CreateServer ¶
func (s *API) CreateServer(req *CreateServerRequest, opts ...scw.RequestOption) (*Server, error)
CreateServer: create a server
Create a server.
func (*API) DeleteServer ¶
func (s *API) DeleteServer(req *DeleteServerRequest, opts ...scw.RequestOption) error
DeleteServer: delete a server
Delete a server.
func (*API) GetOS ¶
func (s *API) GetOS(req *GetOSRequest, opts ...scw.RequestOption) (*OS, error)
GetOS: get an Operating System (OS)
Get an Operating System (OS).
func (*API) GetServer ¶
func (s *API) GetServer(req *GetServerRequest, opts ...scw.RequestOption) (*Server, error)
GetServer: get a server
Get a server.
func (*API) GetServerType ¶
func (s *API) GetServerType(req *GetServerTypeRequest, opts ...scw.RequestOption) (*ServerType, error)
GetServerType: get a server type
Get a server technical details.
func (*API) ListOS ¶
func (s *API) ListOS(req *ListOSRequest, opts ...scw.RequestOption) (*ListOSResponse, error)
ListOS: list all Operating System (OS)
List all Operating System (OS).
func (*API) ListServerTypes ¶
func (s *API) ListServerTypes(req *ListServerTypesRequest, opts ...scw.RequestOption) (*ListServerTypesResponse, error)
ListServerTypes: list server types
List all server types technical details.
func (*API) ListServers ¶
func (s *API) ListServers(req *ListServersRequest, opts ...scw.RequestOption) (*ListServersResponse, error)
ListServers: list all servers
List all servers.
func (*API) RebootServer ¶
func (s *API) RebootServer(req *RebootServerRequest, opts ...scw.RequestOption) (*Server, error)
RebootServer: reboot a server
Reboot a server.
func (*API) ReinstallServer ¶
func (s *API) ReinstallServer(req *ReinstallServerRequest, opts ...scw.RequestOption) (*Server, error)
ReinstallServer: reinstall a server
Reinstall a server.
func (*API) UpdateServer ¶
func (s *API) UpdateServer(req *UpdateServerRequest, opts ...scw.RequestOption) (*Server, error)
UpdateServer: update a server
Update a server.
func (*API) WaitForServer ¶
func (s *API) WaitForServer(req *WaitForServerRequest, opts ...scw.RequestOption) (*Server, error)
WaitForServer waits for the instance to be in a "terminal state" before returning. This function can be used to wait for an instance to be ready for example.
type CreateServerRequest ¶
type CreateServerRequest struct {
// Zone:
//
// Zone to target. If none is passed will use default zone from the config
Zone scw.Zone `json:"-"`
// Name: create a server with this given name
Name string `json:"name"`
// ProjectID: create a server in the given project ID
ProjectID string `json:"project_id"`
// Type: create a server of the given type
Type string `json:"type"`
}
type DeleteServerRequest ¶
type GetOSRequest ¶
type GetServerRequest ¶
type GetServerTypeRequest ¶
type ListOSRequest ¶
type ListOSRequest struct {
// Zone:
//
// Zone to target. If none is passed will use default zone from the config
Zone scw.Zone `json:"-"`
// Page: a positive integer to choose the page to return
Page *int32 `json:"-"`
// PageSize: a positive integer lower or equal to 100 to select the number of items to return
//
// Default value: 50
PageSize *uint32 `json:"-"`
// ServerType: list of compatible server type
ServerType *string `json:"-"`
// Name: filter os by name (for eg. "11.1" will return "11.1.2" and "11.1" but not "12")
Name *string `json:"-"`
}
type ListOSResponse ¶
type ListOSResponse struct {
// TotalCount: total number of os
TotalCount uint32 `json:"total_count"`
// Os: list of OS
Os []*OS `json:"os"`
}
ListOSResponse: list os response
func (*ListOSResponse) UnsafeAppend ¶
func (r *ListOSResponse) UnsafeAppend(res interface{}) (uint32, error)
UnsafeAppend should not be used Internal usage only
func (*ListOSResponse) UnsafeGetTotalCount ¶
func (r *ListOSResponse) UnsafeGetTotalCount() uint32
UnsafeGetTotalCount should not be used Internal usage only
type ListServerTypesRequest ¶
type ListServerTypesResponse ¶
type ListServerTypesResponse struct {
// ServerTypes: the available server types
ServerTypes []*ServerType `json:"server_types"`
}
ListServerTypesResponse: list server types response
type ListServersRequest ¶
type ListServersRequest struct {
// Zone:
//
// Zone to target. If none is passed will use default zone from the config
Zone scw.Zone `json:"-"`
// OrderBy: the sort order of the returned servers
//
// Default value: created_at_asc
OrderBy ListServersRequestOrderBy `json:"-"`
// ProjectID: list only servers of this project ID
ProjectID *string `json:"-"`
// OrganizationID: list only servers of this organization ID
OrganizationID *string `json:"-"`
// Page: a positive integer to choose the page to return
Page *int32 `json:"-"`
// PageSize: a positive integer lower or equal to 100 to select the number of items to return
//
// Default value: 50
PageSize *uint32 `json:"-"`
}
type ListServersRequestOrderBy ¶
type ListServersRequestOrderBy string
func (ListServersRequestOrderBy) MarshalJSON ¶
func (enum ListServersRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListServersRequestOrderBy) String ¶
func (enum ListServersRequestOrderBy) String() string
func (*ListServersRequestOrderBy) UnmarshalJSON ¶
func (enum *ListServersRequestOrderBy) UnmarshalJSON(data []byte) error
type ListServersResponse ¶
type ListServersResponse struct {
// TotalCount: the total number of servers
TotalCount uint32 `json:"total_count"`
// Servers: the paginated returned servers
Servers []*Server `json:"servers"`
}
ListServersResponse: list servers response
func (*ListServersResponse) UnsafeAppend ¶
func (r *ListServersResponse) UnsafeAppend(res interface{}) (uint32, error)
UnsafeAppend should not be used Internal usage only
func (*ListServersResponse) UnsafeGetTotalCount ¶
func (r *ListServersResponse) UnsafeGetTotalCount() uint32
UnsafeGetTotalCount should not be used Internal usage only
type OS ¶
type OS struct {
// ID: the OS unique ID
ID string `json:"id"`
// Name: the OS name
Name string `json:"name"`
// Label: the OS name as it should be displayed
Label string `json:"label"`
// ImageURL: URL of the image
ImageURL string `json:"image_url"`
// CompatibleServerTypes: list of compatible server types
CompatibleServerTypes []string `json:"compatible_server_types"`
}
OS: os
type RebootServerRequest ¶
type ReinstallServerRequest ¶
type Server ¶
type Server struct {
// ID: UUID of the server
ID string `json:"id"`
// Type: type of the server
Type string `json:"type"`
// Name: name of the server
Name string `json:"name"`
// ProjectID: project this server is associated with
ProjectID string `json:"project_id"`
// OrganizationID: organization this server is associated with
OrganizationID string `json:"organization_id"`
// IP: iPv4 address of the server
IP net.IP `json:"ip"`
// VncURL: URL of the VNC
VncURL string `json:"vnc_url"`
// Status: current status of the server
//
// Default value: unknown_status
Status ServerStatus `json:"status"`
// CreatedAt: the date at which the server was created
CreatedAt *time.Time `json:"created_at"`
// UpdatedAt: the date at which the server was last updated
UpdatedAt *time.Time `json:"updated_at"`
// DeletableAt: the date at which the server was last deleted
DeletableAt *time.Time `json:"deletable_at"`
// Zone: the zone of the server
Zone scw.Zone `json:"zone"`
}
Server: server
type ServerStatus ¶
type ServerStatus string
func (ServerStatus) MarshalJSON ¶
func (enum ServerStatus) MarshalJSON() ([]byte, error)
func (ServerStatus) String ¶
func (enum ServerStatus) String() string
func (*ServerStatus) UnmarshalJSON ¶
func (enum *ServerStatus) UnmarshalJSON(data []byte) error
type ServerType ¶
type ServerType struct {
// CPU: CPU description
CPU *ServerTypeCPU `json:"cpu"`
// Disk: size of the local disk of the server
Disk *ServerTypeDisk `json:"disk"`
// Name: name of the type
Name string `json:"name"`
// Memory: size of memory available
Memory *ServerTypeMemory `json:"memory"`
// Stock: current stock
//
// Default value: unknown_stock
Stock ServerTypeStock `json:"stock"`
// MinimumLeaseDuration: minimum duration of the lease in seconds
//
// Minimum duration of the lease in seconds (example. 3.4s).
MinimumLeaseDuration *scw.Duration `json:"minimum_lease_duration"`
}
ServerType: server type
type ServerTypeCPU ¶
type ServerTypeDisk ¶
type ServerTypeMemory ¶
type ServerTypeStock ¶
type ServerTypeStock string
func (ServerTypeStock) MarshalJSON ¶
func (enum ServerTypeStock) MarshalJSON() ([]byte, error)
func (ServerTypeStock) String ¶
func (enum ServerTypeStock) String() string
func (*ServerTypeStock) UnmarshalJSON ¶
func (enum *ServerTypeStock) UnmarshalJSON(data []byte) error