Documentation ¶
Index ¶
- type ApplyRequest
- type BootRequest
- type ChangePlanRequest
- type CreateRequest
- type DeleteRequest
- type EjectCDROMRequest
- type FindRequest
- type InsertCDROMRequest
- type MonitorCPURequest
- type NetworkInterface
- type ReadRequest
- type ResetRequest
- type Service
- func (s *Service) Apply(req *ApplyRequest) (*sacloud.Server, error)
- func (s *Service) ApplyWithContext(ctx context.Context, req *ApplyRequest) (*sacloud.Server, error)
- func (s *Service) Boot(req *BootRequest) error
- func (s *Service) BootWithContext(ctx context.Context, req *BootRequest) error
- func (s *Service) ChangePlan(req *ChangePlanRequest) (*sacloud.Server, error)
- func (s *Service) ChangePlanWithContext(ctx context.Context, req *ChangePlanRequest) (*sacloud.Server, error)
- func (s *Service) Create(req *CreateRequest) (*sacloud.Server, error)
- func (s *Service) CreateWithContext(ctx context.Context, req *CreateRequest) (*sacloud.Server, error)
- func (s *Service) Delete(req *DeleteRequest) error
- func (s *Service) DeleteWithContext(ctx context.Context, req *DeleteRequest) error
- func (s *Service) EjectCDROM(req *EjectCDROMRequest) error
- func (s *Service) EjectCDROMWithContext(ctx context.Context, req *EjectCDROMRequest) error
- func (s *Service) Find(req *FindRequest) ([]*sacloud.Server, error)
- func (s *Service) FindWithContext(ctx context.Context, req *FindRequest) ([]*sacloud.Server, error)
- func (s *Service) InsertCDROM(req *InsertCDROMRequest) error
- func (s *Service) InsertCDROMWithContext(ctx context.Context, req *InsertCDROMRequest) error
- func (s *Service) MonitorCPU(req *MonitorCPURequest) ([]*sacloud.MonitorCPUTimeValue, error)
- func (s *Service) MonitorCPUWithContext(ctx context.Context, req *MonitorCPURequest) ([]*sacloud.MonitorCPUTimeValue, error)
- func (s *Service) Read(req *ReadRequest) (*sacloud.Server, error)
- func (s *Service) ReadWithContext(ctx context.Context, req *ReadRequest) (*sacloud.Server, error)
- func (s *Service) Reset(req *ResetRequest) error
- func (s *Service) ResetWithContext(ctx context.Context, req *ResetRequest) error
- func (s *Service) Shutdown(req *ShutdownRequest) error
- func (s *Service) ShutdownWithContext(ctx context.Context, req *ShutdownRequest) error
- func (s *Service) Update(req *UpdateRequest) (*sacloud.Server, error)
- func (s *Service) UpdateWithContext(ctx context.Context, req *UpdateRequest) (*sacloud.Server, error)
- func (s *Service) WaitBoot(req *WaitBootRequest) error
- func (s *Service) WaitBootWithContext(ctx context.Context, req *WaitBootRequest) error
- func (s *Service) WaitShutdown(req *WaitShutdownRequest) error
- func (s *Service) WaitShutdownWithContext(ctx context.Context, req *WaitShutdownRequest) error
- type ShutdownRequest
- type UpdateRequest
- type WaitBootRequest
- type WaitShutdownRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApplyRequest ¶
type ApplyRequest struct { Zone string `validate:"required"` ID types.ID Name string `validate:"required"` Description string `validate:"min=0,max=512"` Tags types.Tags IconID types.ID CPU int MemoryGB int Commitment types.ECommitment Generation types.EPlanGeneration InterfaceDriver types.EInterfaceDriver BootAfterCreate bool CDROMID types.ID PrivateHostID types.ID NetworkInterfaces []*NetworkInterface Disks []*diskService.ApplyRequest NoWait bool ForceShutdown bool }
func (*ApplyRequest) Builder ¶
func (req *ApplyRequest) Builder(caller sacloud.APICaller) (*serverBuilder.Builder, error)
func (*ApplyRequest) Validate ¶
func (req *ApplyRequest) Validate() error
type BootRequest ¶
type BootRequest struct { Zone string `request:"-" validate:"required"` ID types.ID `request:"-" validate:"required"` NoWait bool `request:"-"` }
func (*BootRequest) Validate ¶
func (req *BootRequest) Validate() error
type ChangePlanRequest ¶
type ChangePlanRequest struct { Zone string `request:"-" validate:"required"` ID types.ID `request:"-" validate:"required"` CPU int MemoryMB int ServerPlanCommitment types.ECommitment ServerPlanGeneration types.EPlanGeneration }
func (*ChangePlanRequest) Validate ¶
func (req *ChangePlanRequest) Validate() error
type CreateRequest ¶
type CreateRequest struct { Zone string `request:"-" validate:"required"` Name string `validate:"required"` Description string `validate:"min=0,max=512"` Tags types.Tags IconID types.ID CPU int MemoryGB int Commitment types.ECommitment Generation types.EPlanGeneration InterfaceDriver types.EInterfaceDriver BootAfterCreate bool CDROMID types.ID PrivateHostID types.ID NetworkInterfaces []*NetworkInterface Disks []*diskService.ApplyRequest NoWait bool }
func (*CreateRequest) ApplyRequest ¶ added in v2.9.0
func (req *CreateRequest) ApplyRequest() *ApplyRequest
func (*CreateRequest) Validate ¶
func (req *CreateRequest) Validate() error
type DeleteRequest ¶
type DeleteRequest struct { Zone string `request:"-" validate:"required"` ID types.ID `request:"-" validate:"required"` WithDisks bool `request:"-"` // ディスクを一緒に削除するか FailIfNotFound bool `request:"-"` Force bool `request:"-"` // trueの場合は電源OFF(強制終了)してから削除 }
func (*DeleteRequest) Validate ¶
func (req *DeleteRequest) Validate() error
type EjectCDROMRequest ¶
type EjectCDROMRequest struct { Zone string `request:"-" validate:"required"` ID types.ID `request:"-" validate:"required"` }
func (*EjectCDROMRequest) Validate ¶
func (req *EjectCDROMRequest) Validate() error
type FindRequest ¶
type FindRequest struct { Zone string `request:"-" validate:"required"` Names []string `request:"-"` Tags []string `request:"-"` Sort search.SortKeys Count int From int }
func (*FindRequest) ToRequestParameter ¶
func (req *FindRequest) ToRequestParameter() (*sacloud.FindCondition, error)
func (*FindRequest) Validate ¶
func (req *FindRequest) Validate() error
type InsertCDROMRequest ¶
type InsertCDROMRequest struct { Zone string `request:"-" validate:"required"` ID types.ID `request:"-" validate:"required"` CDROMID types.ID `validate:"required"` }
func (*InsertCDROMRequest) Validate ¶
func (req *InsertCDROMRequest) Validate() error
type MonitorCPURequest ¶
type MonitorCPURequest struct { Zone string `request:"-" validate:"required"` ID types.ID `request:"-" validate:"required"` Start time.Time End time.Time }
func (*MonitorCPURequest) Validate ¶
func (req *MonitorCPURequest) Validate() error
type NetworkInterface ¶ added in v2.9.0
type NetworkInterface struct { Upstream string // スイッチID or "disconnected"(切断) or "shared"(共有セグメント) 省略時は"disconnected" PacketFilterID types.ID UserIPAddress string `validate:"omitempty,ipv4"` }
func (*NetworkInterface) AdditionalNICSettingHolder ¶ added in v2.9.0
func (s *NetworkInterface) AdditionalNICSettingHolder() serverBuilder.AdditionalNICSettingHolder
func (*NetworkInterface) NICSettingHolder ¶ added in v2.9.0
func (s *NetworkInterface) NICSettingHolder() serverBuilder.NICSettingHolder
func (*NetworkInterface) Validate ¶ added in v2.9.0
func (s *NetworkInterface) Validate() error
type ReadRequest ¶
type ReadRequest struct { Zone string `request:"-" validate:"required"` ID types.ID `request:"-" validate:"required"` }
func (*ReadRequest) Validate ¶
func (req *ReadRequest) Validate() error
type ResetRequest ¶
type ResetRequest struct { Zone string `request:"-" validate:"required"` ID types.ID `request:"-" validate:"required"` }
func (*ResetRequest) Validate ¶
func (req *ResetRequest) Validate() error
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service provides a high-level API of for Server
func (*Service) ApplyWithContext ¶
func (*Service) Boot ¶
func (s *Service) Boot(req *BootRequest) error
func (*Service) BootWithContext ¶
func (s *Service) BootWithContext(ctx context.Context, req *BootRequest) error
func (*Service) ChangePlan ¶
func (s *Service) ChangePlan(req *ChangePlanRequest) (*sacloud.Server, error)
func (*Service) ChangePlanWithContext ¶
func (*Service) CreateWithContext ¶
func (*Service) Delete ¶
func (s *Service) Delete(req *DeleteRequest) error
func (*Service) DeleteWithContext ¶
func (s *Service) DeleteWithContext(ctx context.Context, req *DeleteRequest) error
func (*Service) EjectCDROM ¶
func (s *Service) EjectCDROM(req *EjectCDROMRequest) error
func (*Service) EjectCDROMWithContext ¶
func (s *Service) EjectCDROMWithContext(ctx context.Context, req *EjectCDROMRequest) error
func (*Service) FindWithContext ¶
func (*Service) InsertCDROM ¶
func (s *Service) InsertCDROM(req *InsertCDROMRequest) error
func (*Service) InsertCDROMWithContext ¶
func (s *Service) InsertCDROMWithContext(ctx context.Context, req *InsertCDROMRequest) error
func (*Service) MonitorCPU ¶
func (s *Service) MonitorCPU(req *MonitorCPURequest) ([]*sacloud.MonitorCPUTimeValue, error)
func (*Service) MonitorCPUWithContext ¶
func (s *Service) MonitorCPUWithContext(ctx context.Context, req *MonitorCPURequest) ([]*sacloud.MonitorCPUTimeValue, error)
func (*Service) ReadWithContext ¶
func (*Service) Reset ¶
func (s *Service) Reset(req *ResetRequest) error
func (*Service) ResetWithContext ¶
func (s *Service) ResetWithContext(ctx context.Context, req *ResetRequest) error
func (*Service) Shutdown ¶
func (s *Service) Shutdown(req *ShutdownRequest) error
func (*Service) ShutdownWithContext ¶
func (s *Service) ShutdownWithContext(ctx context.Context, req *ShutdownRequest) error
func (*Service) UpdateWithContext ¶
func (*Service) WaitBoot ¶
func (s *Service) WaitBoot(req *WaitBootRequest) error
func (*Service) WaitBootWithContext ¶
func (s *Service) WaitBootWithContext(ctx context.Context, req *WaitBootRequest) error
func (*Service) WaitShutdown ¶
func (s *Service) WaitShutdown(req *WaitShutdownRequest) error
func (*Service) WaitShutdownWithContext ¶
func (s *Service) WaitShutdownWithContext(ctx context.Context, req *WaitShutdownRequest) error
type ShutdownRequest ¶
type ShutdownRequest struct { Zone string `request:"-" validate:"required"` ID types.ID `request:"-" validate:"required"` NoWait bool `request:"-"` ForceShutdown bool `request:"-"` }
func (*ShutdownRequest) Validate ¶
func (req *ShutdownRequest) Validate() error
type UpdateRequest ¶
type UpdateRequest struct { Zone string `validate:"required"` ID types.ID `validate:"required"` Name *string `request:",omitempty" validate:"omitempty,min=1"` Description *string `request:",omitempty" validate:"omitempty,min=0,max=512"` Tags *types.Tags `request:",omitempty"` IconID *types.ID `request:",omitempty"` CPU *int `request:",omitempty"` MemoryGB *int `request:",omitempty"` Commitment *types.ECommitment `request:",omitempty"` Generation *types.EPlanGeneration `request:",omitempty"` InterfaceDriver *types.EInterfaceDriver `request:",omitempty"` CDROMID *types.ID `request:",omitempty"` PrivateHostID *types.ID `request:",omitempty"` NetworkInterfaces *[]*NetworkInterface `request:",omitempty"` Disks *[]*diskService.ApplyRequest `request:",omitempty"` NoWait bool ForceShutdown bool }
func (*UpdateRequest) ApplyRequest ¶ added in v2.9.0
func (req *UpdateRequest) ApplyRequest(ctx context.Context, caller sacloud.APICaller) (*ApplyRequest, error)
func (*UpdateRequest) Validate ¶
func (req *UpdateRequest) Validate() error
type WaitBootRequest ¶
type WaitBootRequest struct { Zone string `request:"-" validate:"required"` ID types.ID `request:"-" validate:"required"` }
func (*WaitBootRequest) Validate ¶
func (req *WaitBootRequest) Validate() error
type WaitShutdownRequest ¶
type WaitShutdownRequest struct { Zone string `request:"-" validate:"required"` ID types.ID `request:"-" validate:"required"` }
func (*WaitShutdownRequest) Validate ¶
func (req *WaitShutdownRequest) Validate() error
Source Files ¶
- apply_request.go
- apply_service.go
- boot_request.go
- boot_service.go
- change_plan_request.go
- change_plan_service.go
- create_request.go
- create_service.go
- delete_request.go
- delete_service.go
- eject_cdrom_request.go
- eject_cdrom_service.go
- find_request.go
- find_service.go
- insert_cdrom_request.go
- insert_cdrom_service.go
- monitor_cpu_request.go
- monitor_cpu_service.go
- network_interface.go
- read_request.go
- read_service.go
- reset_request.go
- reset_service.go
- service.go
- shutdown_request.go
- shutdown_service.go
- update_request.go
- update_service.go
- wait_boot_request.go
- wait_boot_service.go
- wait_shutdown_request.go
- wait_shutdown_service.go
Click to show internal directories.
Click to hide internal directories.