Documentation
¶
Index ¶
- type CreateRequest
- type DeleteRequest
- type FindRequest
- type ReadRequest
- type Service
- func (s *Service) Create(req *CreateRequest) (*iaas.GSLB, error)
- func (s *Service) CreateWithContext(ctx context.Context, req *CreateRequest) (*iaas.GSLB, error)
- func (s *Service) Delete(req *DeleteRequest) error
- func (s *Service) DeleteWithContext(ctx context.Context, req *DeleteRequest) error
- func (s *Service) Find(req *FindRequest) ([]*iaas.GSLB, error)
- func (s *Service) FindWithContext(ctx context.Context, req *FindRequest) ([]*iaas.GSLB, error)
- func (s *Service) Read(req *ReadRequest) (*iaas.GSLB, error)
- func (s *Service) ReadWithContext(ctx context.Context, req *ReadRequest) (*iaas.GSLB, error)
- func (s *Service) Update(req *UpdateRequest) (*iaas.GSLB, error)
- func (s *Service) UpdateWithContext(ctx context.Context, req *UpdateRequest) (*iaas.GSLB, error)
- type UpdateRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateRequest ¶
type CreateRequest struct { Name string `validate:"required"` Description string `validate:"min=0,max=512"` Tags types.Tags IconID types.ID HealthCheck *iaas.GSLBHealthCheck DelayLoop int Weighted types.StringFlag SorryServer string DestinationServers iaas.GSLBServers }
func (*CreateRequest) ToRequestParameter ¶
func (req *CreateRequest) ToRequestParameter() (*iaas.GSLBCreateRequest, error)
func (*CreateRequest) Validate ¶
func (req *CreateRequest) Validate() error
type DeleteRequest ¶
type DeleteRequest struct { ID types.ID `service:"-" validate:"required"` FailIfNotFound bool `service:"-"` }
func (*DeleteRequest) Validate ¶
func (req *DeleteRequest) Validate() error
type FindRequest ¶
type FindRequest struct { Names []string `service:"-"` Tags []string `service:"-"` Sort search.SortKeys Count int From int }
func (*FindRequest) ToRequestParameter ¶
func (req *FindRequest) ToRequestParameter() (*iaas.FindCondition, error)
func (*FindRequest) Validate ¶
func (req *FindRequest) Validate() error
type ReadRequest ¶
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 GSLB
func (*Service) Create ¶
func (s *Service) Create(req *CreateRequest) (*iaas.GSLB, error)
func (*Service) CreateWithContext ¶
func (s *Service) CreateWithContext(ctx context.Context, req *CreateRequest) (*iaas.GSLB, error)
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) Find ¶
func (s *Service) Find(req *FindRequest) ([]*iaas.GSLB, error)
func (*Service) FindWithContext ¶
func (s *Service) FindWithContext(ctx context.Context, req *FindRequest) ([]*iaas.GSLB, error)
func (*Service) Read ¶
func (s *Service) Read(req *ReadRequest) (*iaas.GSLB, error)
func (*Service) ReadWithContext ¶
func (s *Service) ReadWithContext(ctx context.Context, req *ReadRequest) (*iaas.GSLB, error)
func (*Service) Update ¶
func (s *Service) Update(req *UpdateRequest) (*iaas.GSLB, error)
func (*Service) UpdateWithContext ¶
func (s *Service) UpdateWithContext(ctx context.Context, req *UpdateRequest) (*iaas.GSLB, error)
type UpdateRequest ¶
type UpdateRequest struct { ID types.ID `service:"-" validate:"required"` Name *string `service:",omitempty" validate:"omitempty,min=1"` Description *string `service:",omitempty" validate:"omitempty,max=512"` Tags *types.Tags `service:",omitempty"` IconID *types.ID `service:",omitempty"` HealthCheck *iaas.GSLBHealthCheck `service:",omitempty"` DelayLoop *int `service:",omitempty"` Weighted *types.StringFlag `service:",omitempty"` SorryServer *string `service:",omitempty"` DestinationServers iaas.GSLBServers `service:",omitempty"` SettingsHash string }
func (*UpdateRequest) ToRequestParameter ¶
func (req *UpdateRequest) ToRequestParameter(current *iaas.GSLB) (*iaas.GSLBUpdateRequest, error)
func (*UpdateRequest) Validate ¶
func (req *UpdateRequest) Validate() error
Click to show internal directories.
Click to hide internal directories.