Documentation ¶
Index ¶
- type AddSubnetRequest
- type CreateRequest
- type DeleteRequest
- type DeleteSubnetRequest
- type DisableIPv6Request
- type EnableIPv6Request
- type FindRequest
- type ListSubnetRequest
- type MonitorRouterRequest
- type ReadIPv6Request
- type ReadRequest
- type Service
- func (s *Service) AddSubnet(req *AddSubnetRequest) (*sacloud.Subnet, error)
- func (s *Service) AddSubnetWithContext(ctx context.Context, req *AddSubnetRequest) (*sacloud.Subnet, error)
- func (s *Service) Create(req *CreateRequest) (*sacloud.Internet, error)
- func (s *Service) CreateWithContext(ctx context.Context, req *CreateRequest) (*sacloud.Internet, error)
- func (s *Service) Delete(req *DeleteRequest) error
- func (s *Service) DeleteSubnet(req *DeleteSubnetRequest) error
- func (s *Service) DeleteSubnetWithContext(ctx context.Context, req *DeleteSubnetRequest) error
- func (s *Service) DeleteWithContext(ctx context.Context, req *DeleteRequest) error
- func (s *Service) DisableIPv6(req *DisableIPv6Request) error
- func (s *Service) DisableIPv6WithContext(ctx context.Context, req *DisableIPv6Request) error
- func (s *Service) EnableIPv6(req *EnableIPv6Request) (*sacloud.IPv6Net, error)
- func (s *Service) EnableIPv6WithContext(ctx context.Context, req *EnableIPv6Request) (*sacloud.IPv6Net, error)
- func (s *Service) Find(req *FindRequest) ([]*sacloud.Internet, error)
- func (s *Service) FindWithContext(ctx context.Context, req *FindRequest) ([]*sacloud.Internet, error)
- func (s *Service) ListSubnet(req *ListSubnetRequest) ([]*sacloud.Subnet, error)
- func (s *Service) ListSubnetWithContext(ctx context.Context, req *ListSubnetRequest) ([]*sacloud.Subnet, error)
- func (s *Service) MonitorRouter(req *MonitorRouterRequest) ([]*sacloud.MonitorRouterValue, error)
- func (s *Service) MonitorRouterWithContext(ctx context.Context, req *MonitorRouterRequest) ([]*sacloud.MonitorRouterValue, error)
- func (s *Service) Read(req *ReadRequest) (*sacloud.Internet, error)
- func (s *Service) ReadIPv6(req *ReadIPv6Request) (*sacloud.IPv6Net, error)
- func (s *Service) ReadIPv6WithContext(ctx context.Context, req *ReadIPv6Request) (*sacloud.IPv6Net, error)
- func (s *Service) ReadWithContext(ctx context.Context, req *ReadRequest) (*sacloud.Internet, error)
- func (s *Service) Update(req *UpdateRequest) (*sacloud.Internet, error)
- func (s *Service) UpdateSubnet(req *UpdateSubnetRequest) (*sacloud.Subnet, error)
- func (s *Service) UpdateSubnetWithContext(ctx context.Context, req *UpdateSubnetRequest) (*sacloud.Subnet, error)
- func (s *Service) UpdateWithContext(ctx context.Context, req *UpdateRequest) (*sacloud.Internet, error)
- type UpdateRequest
- type UpdateSubnetRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddSubnetRequest ¶
type AddSubnetRequest struct { Zone string `request:"-" validate:"required"` ID types.ID `request:"-" validate:"required"` NetworkMaskLen int `validate:"required,min=24,max=28"` NextHop string `validate:"required,ipv4"` }
func (*AddSubnetRequest) ToRequestParameter ¶
func (req *AddSubnetRequest) ToRequestParameter(current *sacloud.Internet) (*sacloud.InternetAddSubnetRequest, error)
func (*AddSubnetRequest) Validate ¶
func (req *AddSubnetRequest) 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 NetworkMaskLen int BandWidthMbps int EnableIPv6 bool NoWait bool NotFoundRetry int // スイッチ+ルータは作成直後だと404を返すことがあることへの対応でリトライする際のリトライ上限回数、省略時はDefaultNotFoundRetry }
func (*CreateRequest) Builder ¶ added in v2.9.0
func (req *CreateRequest) Builder(caller sacloud.APICaller) *internetBuilder.Builder
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:"-"` Force bool `request:"-"` // trueの場合IPv6やサブネットも一緒に削除する(falseの場合これらがあるとDeleteでエラーとなる) }
func (*DeleteRequest) Validate ¶
func (req *DeleteRequest) Validate() error
type DeleteSubnetRequest ¶
type DeleteSubnetRequest struct { Zone string `request:"-" validate:"required"` ID types.ID `request:"-" validate:"required"` FailIfNotFound bool `request:"-"` SubnetID types.ID `validate:"required"` }
func (*DeleteSubnetRequest) Validate ¶
func (req *DeleteSubnetRequest) Validate() error
type DisableIPv6Request ¶
type DisableIPv6Request struct { Zone string `request:"-" validate:"required"` ID types.ID `request:"-" validate:"required"` }
func (*DisableIPv6Request) Validate ¶
func (req *DisableIPv6Request) Validate() error
type EnableIPv6Request ¶
type EnableIPv6Request struct { Zone string `request:"-" validate:"required"` ID types.ID `request:"-" validate:"required"` }
func (*EnableIPv6Request) Validate ¶
func (req *EnableIPv6Request) Validate() error
type FindRequest ¶
type FindRequest struct { Zone string `request:"-" validate:"required"` Names []string `request:"-"` Tags []string `request:"-"` SwitchIDs []string `request:"-"` SwitchNames []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 ListSubnetRequest ¶
type ListSubnetRequest struct { Zone string `request:"-" validate:"required"` ID types.ID `request:"-" validate:"required"` }
func (*ListSubnetRequest) Validate ¶
func (req *ListSubnetRequest) Validate() error
type MonitorRouterRequest ¶
type MonitorRouterRequest struct { Zone string `request:"-" validate:"required"` ID types.ID `request:"-" validate:"required"` Start time.Time End time.Time }
func (*MonitorRouterRequest) Validate ¶
func (req *MonitorRouterRequest) Validate() error
type ReadIPv6Request ¶
type ReadIPv6Request struct { Zone string `request:"-" validate:"required"` ID types.ID `request:"-" validate:"required"` }
func (*ReadIPv6Request) Validate ¶
func (req *ReadIPv6Request) 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 Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service provides a high-level API of for Internet
func (*Service) AddSubnet ¶
func (s *Service) AddSubnet(req *AddSubnetRequest) (*sacloud.Subnet, error)
func (*Service) AddSubnetWithContext ¶
func (*Service) CreateWithContext ¶
func (*Service) Delete ¶
func (s *Service) Delete(req *DeleteRequest) error
func (*Service) DeleteSubnet ¶
func (s *Service) DeleteSubnet(req *DeleteSubnetRequest) error
func (*Service) DeleteSubnetWithContext ¶
func (s *Service) DeleteSubnetWithContext(ctx context.Context, req *DeleteSubnetRequest) error
func (*Service) DeleteWithContext ¶
func (s *Service) DeleteWithContext(ctx context.Context, req *DeleteRequest) error
func (*Service) DisableIPv6 ¶
func (s *Service) DisableIPv6(req *DisableIPv6Request) error
func (*Service) DisableIPv6WithContext ¶
func (s *Service) DisableIPv6WithContext(ctx context.Context, req *DisableIPv6Request) error
func (*Service) EnableIPv6 ¶
func (s *Service) EnableIPv6(req *EnableIPv6Request) (*sacloud.IPv6Net, error)
func (*Service) EnableIPv6WithContext ¶
func (*Service) FindWithContext ¶
func (*Service) ListSubnet ¶
func (s *Service) ListSubnet(req *ListSubnetRequest) ([]*sacloud.Subnet, error)
func (*Service) ListSubnetWithContext ¶
func (*Service) MonitorRouter ¶
func (s *Service) MonitorRouter(req *MonitorRouterRequest) ([]*sacloud.MonitorRouterValue, error)
func (*Service) MonitorRouterWithContext ¶
func (s *Service) MonitorRouterWithContext(ctx context.Context, req *MonitorRouterRequest) ([]*sacloud.MonitorRouterValue, error)
func (*Service) ReadIPv6 ¶
func (s *Service) ReadIPv6(req *ReadIPv6Request) (*sacloud.IPv6Net, error)
func (*Service) ReadIPv6WithContext ¶
func (*Service) ReadWithContext ¶
func (*Service) UpdateSubnet ¶
func (s *Service) UpdateSubnet(req *UpdateSubnetRequest) (*sacloud.Subnet, error)
func (*Service) UpdateSubnetWithContext ¶
func (*Service) UpdateWithContext ¶
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"` BandWidthMbps *int `request:",omitempty"` EnableIPv6 *bool `request:",omitempty"` }
func (*UpdateRequest) Builder ¶ added in v2.9.0
func (req *UpdateRequest) Builder(ctx context.Context, caller sacloud.APICaller) (*internetBuilder.Builder, error)
func (*UpdateRequest) Validate ¶
func (req *UpdateRequest) Validate() error
type UpdateSubnetRequest ¶
type UpdateSubnetRequest struct { Zone string `request:"-" validate:"required"` ID types.ID `request:"-" validate:"required"` SubnetID types.ID `validate:"required"` NextHop string `validate:"required,ipv4"` }
func (*UpdateSubnetRequest) ToRequestParameter ¶
func (req *UpdateSubnetRequest) ToRequestParameter(current *sacloud.Internet) (*sacloud.InternetUpdateSubnetRequest, error)
func (*UpdateSubnetRequest) Validate ¶
func (req *UpdateSubnetRequest) Validate() error
Source Files ¶
- add_subnet_request.go
- add_subnet_service.go
- create_request.go
- create_service.go
- delete_request.go
- delete_service.go
- delete_subnet_request.go
- delete_subnet_service.go
- disable_ipv6_request.go
- disable_ipv6_service.go
- enable_ipv6_request.go
- enable_ipv6_service.go
- find_request.go
- find_service.go
- list_subnet_request.go
- list_subnet_service.go
- monitor_router_request.go
- monitor_router_service.go
- read_ipv6_request.go
- read_ipv6_service.go
- read_request.go
- read_service.go
- service.go
- update_request.go
- update_service.go
- update_subnet_request.go
- update_subnet_service.go
Click to show internal directories.
Click to hide internal directories.