Documentation ¶
Index ¶
- type ApplyRequest
- type ConnectToServerRequest
- type CreateRequest
- type DeleteRequest
- type DisconnectFromServerRequest
- type EditParameter
- type FindRequest
- type MonitorDiskRequest
- type ReadRequest
- type ReinstallFromArchiveRequest
- type ReinstallFromBlankRequest
- type ReinstallFromDiskRequest
- type ResizePartitionRequest
- type Service
- func (s *Service) Apply(req *ApplyRequest) (*sacloud.Disk, *sacloud.SSHKeyGenerated, error)
- func (s *Service) ApplyWithContext(ctx context.Context, req *ApplyRequest) (*sacloud.Disk, *sacloud.SSHKeyGenerated, error)
- func (s *Service) ConnectToServer(req *ConnectToServerRequest) error
- func (s *Service) ConnectToServerWithContext(ctx context.Context, req *ConnectToServerRequest) error
- func (s *Service) Create(req *CreateRequest) (*sacloud.Disk, error)
- func (s *Service) CreateWithContext(ctx context.Context, req *CreateRequest) (*sacloud.Disk, error)
- func (s *Service) Delete(req *DeleteRequest) error
- func (s *Service) DeleteWithContext(ctx context.Context, req *DeleteRequest) error
- func (s *Service) DisconnectFromServer(req *DisconnectFromServerRequest) error
- func (s *Service) DisconnectFromServerWithContext(ctx context.Context, req *DisconnectFromServerRequest) error
- func (s *Service) Find(req *FindRequest) ([]*sacloud.Disk, error)
- func (s *Service) FindWithContext(ctx context.Context, req *FindRequest) ([]*sacloud.Disk, error)
- func (s *Service) MonitorDisk(req *MonitorDiskRequest) ([]*sacloud.MonitorDiskValue, error)
- func (s *Service) MonitorDiskWithContext(ctx context.Context, req *MonitorDiskRequest) ([]*sacloud.MonitorDiskValue, error)
- func (s *Service) Read(req *ReadRequest) (*sacloud.Disk, error)
- func (s *Service) ReadWithContext(ctx context.Context, req *ReadRequest) (*sacloud.Disk, error)
- func (s *Service) ReinstallFromArchive(req *ReinstallFromArchiveRequest) (*sacloud.Disk, error)
- func (s *Service) ReinstallFromArchiveWithContext(ctx context.Context, req *ReinstallFromArchiveRequest) (*sacloud.Disk, error)
- func (s *Service) ReinstallFromBlank(req *ReinstallFromBlankRequest) (*sacloud.Disk, error)
- func (s *Service) ReinstallFromBlankWithContext(ctx context.Context, req *ReinstallFromBlankRequest) (*sacloud.Disk, error)
- func (s *Service) ReinstallFromDisk(req *ReinstallFromDiskRequest) (*sacloud.Disk, error)
- func (s *Service) ReinstallFromDiskWithContext(ctx context.Context, req *ReinstallFromDiskRequest) (*sacloud.Disk, error)
- func (s *Service) ResizePartition(req *ResizePartitionRequest) error
- func (s *Service) ResizePartitionWithContext(ctx context.Context, req *ResizePartitionRequest) error
- func (s *Service) Update(req *UpdateRequest) (*sacloud.Disk, error)
- func (s *Service) UpdateWithContext(ctx context.Context, req *UpdateRequest) (*sacloud.Disk, error)
- func (s *Service) WaitReady(req *WaitReadyRequest) error
- func (s *Service) WaitReadyWithContext(ctx context.Context, req *WaitReadyRequest) error
- type UpdateRequest
- type WaitReadyRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApplyRequest ¶
type ApplyRequest struct { Zone string `request:"-" validate:"required"` ID types.ID `request:"-"` // TODO Builderを更新対応させる(変更できない値の場合はエラーにするとか) Name string `validate:"required"` Description string `validate:"min=0,max=512"` Tags types.Tags IconID types.ID DiskPlanID types.ID Connection types.EDiskConnection SourceDiskID types.ID SourceArchiveID types.ID ServerID types.ID SizeGB int DistantFrom []types.ID OSType ostype.ArchiveOSType EditParameter *EditParameter }
func (*ApplyRequest) Builder ¶
func (req *ApplyRequest) Builder(caller sacloud.APICaller) (diskBuilder.Builder, error)
func (*ApplyRequest) Validate ¶
func (req *ApplyRequest) Validate() error
type ConnectToServerRequest ¶
type ConnectToServerRequest struct { Zone string `request:"-" validate:"required"` ID types.ID `request:"-" validate:"required"` ServerID types.ID `validate:"required"` }
func (*ConnectToServerRequest) Validate ¶
func (req *ConnectToServerRequest) 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 DiskPlanID types.ID `validate:"oneof=4 2"` Connection types.EDiskConnection `validate:"oneof=virtio ide"` SourceDiskID types.ID SourceArchiveID types.ID ServerID types.ID SizeGB int DistantFrom []types.ID OSType ostype.ArchiveOSType }
CreateRequest ディスク作成リクエスト
func (*CreateRequest) ToRequestParameter ¶
func (req *CreateRequest) ToRequestParameter(ctx context.Context, caller sacloud.APICaller) (*sacloud.DiskCreateRequest, error)
func (*CreateRequest) Validate ¶
func (req *CreateRequest) Validate() error
type DeleteRequest ¶
type DeleteRequest struct { Zone string `request:"-" validate:"required"` ID types.ID `request:"-" validate:"required"` FailIfNotFound bool `request:"-"` }
func (*DeleteRequest) Validate ¶
func (req *DeleteRequest) Validate() error
type DisconnectFromServerRequest ¶
type DisconnectFromServerRequest struct { Zone string `request:"-" validate:"required"` ID types.ID `request:"-" validate:"required"` }
func (*DisconnectFromServerRequest) Validate ¶
func (req *DisconnectFromServerRequest) Validate() error
type EditParameter ¶
type EditParameter struct { HostName string Password string DisablePWAuth bool EnableDHCP bool ChangePartitionUUID bool IPAddress string NetworkMaskLen int DefaultRoute string SSHKeys []string SSHKeyIDs []types.ID // IsSSHKeysEphemeral trueの場合、SSHキーを生成する場合に生成したSSHキーリソースをサーバ作成後に削除する IsSSHKeysEphemeral bool // GenerateSSHKeyName 設定されていた場合、クラウドAPIを用いてキーペアを生成する。 GenerateSSHKeyName string GenerateSSHKeyPassPhrase string GenerateSSHKeyDescription string IsNotesEphemeral bool NoteContents []string Notes []*sacloud.DiskEditNote }
EditParameter ディスクの修正用パラメータ
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 MonitorDiskRequest ¶
type MonitorDiskRequest struct { Zone string `request:"-" validate:"required"` ID types.ID `request:"-" validate:"required"` Start time.Time End time.Time }
func (*MonitorDiskRequest) Validate ¶
func (req *MonitorDiskRequest) 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 ReinstallFromArchiveRequest ¶
type ReinstallFromArchiveRequest struct { Zone string `request:"-" validate:"required"` ID types.ID `request:"-" validate:"required"` OSType ostype.ArchiveOSType SourceArchiveID types.ID EditParameter *sacloud.DiskEditRequest DistantFrom []types.ID }
func (*ReinstallFromArchiveRequest) Validate ¶
func (req *ReinstallFromArchiveRequest) Validate() error
type ReinstallFromBlankRequest ¶
type ReinstallFromBlankRequest struct { Zone string `request:"-" validate:"required"` ID types.ID `request:"-" validate:"required"` DistantFrom []types.ID }
func (*ReinstallFromBlankRequest) Validate ¶
func (req *ReinstallFromBlankRequest) Validate() error
type ReinstallFromDiskRequest ¶
type ReinstallFromDiskRequest struct { Zone string `request:"-" validate:"required"` ID types.ID `request:"-" validate:"required"` OSType ostype.ArchiveOSType SourceDiskID types.ID EditParameter *sacloud.DiskEditRequest DistantFrom []types.ID }
func (*ReinstallFromDiskRequest) Validate ¶
func (req *ReinstallFromDiskRequest) Validate() error
type ResizePartitionRequest ¶
type ResizePartitionRequest struct { Zone string `request:"-" validate:"required"` ID types.ID `request:"-" validate:"required"` }
func (*ResizePartitionRequest) Validate ¶
func (req *ResizePartitionRequest) Validate() error
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service provides a high-level API of for Disk
func (*Service) Apply ¶
func (s *Service) Apply(req *ApplyRequest) (*sacloud.Disk, *sacloud.SSHKeyGenerated, error)
func (*Service) ApplyWithContext ¶
func (s *Service) ApplyWithContext(ctx context.Context, req *ApplyRequest) (*sacloud.Disk, *sacloud.SSHKeyGenerated, error)
func (*Service) ConnectToServer ¶
func (s *Service) ConnectToServer(req *ConnectToServerRequest) error
func (*Service) ConnectToServerWithContext ¶
func (s *Service) ConnectToServerWithContext(ctx context.Context, req *ConnectToServerRequest) error
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) DisconnectFromServer ¶
func (s *Service) DisconnectFromServer(req *DisconnectFromServerRequest) error
func (*Service) DisconnectFromServerWithContext ¶
func (s *Service) DisconnectFromServerWithContext(ctx context.Context, req *DisconnectFromServerRequest) error
func (*Service) FindWithContext ¶
func (*Service) MonitorDisk ¶
func (s *Service) MonitorDisk(req *MonitorDiskRequest) ([]*sacloud.MonitorDiskValue, error)
func (*Service) MonitorDiskWithContext ¶
func (s *Service) MonitorDiskWithContext(ctx context.Context, req *MonitorDiskRequest) ([]*sacloud.MonitorDiskValue, error)
func (*Service) ReadWithContext ¶
func (*Service) ReinstallFromArchive ¶
func (s *Service) ReinstallFromArchive(req *ReinstallFromArchiveRequest) (*sacloud.Disk, error)
func (*Service) ReinstallFromArchiveWithContext ¶
func (*Service) ReinstallFromBlank ¶
func (s *Service) ReinstallFromBlank(req *ReinstallFromBlankRequest) (*sacloud.Disk, error)
func (*Service) ReinstallFromBlankWithContext ¶
func (*Service) ReinstallFromDisk ¶
func (s *Service) ReinstallFromDisk(req *ReinstallFromDiskRequest) (*sacloud.Disk, error)
func (*Service) ReinstallFromDiskWithContext ¶
func (*Service) ResizePartition ¶
func (s *Service) ResizePartition(req *ResizePartitionRequest) error
func (*Service) ResizePartitionWithContext ¶
func (s *Service) ResizePartitionWithContext(ctx context.Context, req *ResizePartitionRequest) error
func (*Service) UpdateWithContext ¶
func (*Service) WaitReady ¶
func (s *Service) WaitReady(req *WaitReadyRequest) error
func (*Service) WaitReadyWithContext ¶
func (s *Service) WaitReadyWithContext(ctx context.Context, req *WaitReadyRequest) error
type UpdateRequest ¶
type UpdateRequest struct { Zone string `request:"-" validate:"required"` ID types.ID `request:"-" validate:"required"` Name *string `request:",omitempty" validate:"omitempty,min=1"` Description *string `request:",omitempty" validate:"omitempty,min=1,max=512"` Tags *types.Tags `request:",omitempty"` IconID *types.ID `request:",omitempty"` Connection *types.EDiskConnection `request:",omitempty"` }
func (*UpdateRequest) ToRequestParameter ¶
func (req *UpdateRequest) ToRequestParameter(current *sacloud.Disk) (*sacloud.DiskUpdateRequest, error)
func (*UpdateRequest) Validate ¶
func (req *UpdateRequest) Validate() error
type WaitReadyRequest ¶
type WaitReadyRequest struct { Zone string `request:"-" validate:"required"` ID types.ID `request:"-" validate:"required"` }
func (*WaitReadyRequest) Validate ¶
func (req *WaitReadyRequest) Validate() error
Source Files ¶
- apply_request.go
- apply_service.go
- connect_to_server_request.go
- connect_to_server_service.go
- create_request.go
- create_service.go
- delete_request.go
- delete_service.go
- disconnect_from_server_request.go
- disconnect_from_server_service.go
- find_request.go
- find_service.go
- monitor_disk_request.go
- monitor_disk_service.go
- read_request.go
- read_service.go
- reinstall_from_archive_request.go
- reinstall_from_archive_request_ext.go
- reinstall_from_archive_service.go
- reinstall_from_blank_request.go
- reinstall_from_blank_service.go
- reinstall_from_brank_request_ext.go
- reinstall_from_disk_request.go
- reinstall_from_disk_request_ext.go
- reinstall_from_disk_service.go
- resize_partition_request.go
- resize_partition_service.go
- service.go
- update_request.go
- update_service.go
- wait_ready_request.go
- wait_ready_service.go
Click to show internal directories.
Click to hide internal directories.