Documentation ¶
Index ¶
- type CreateRequest
- type DeleteRequest
- type FindRequest
- type ReadRequest
- type Service
- func (s *Service) Create(req *CreateRequest) (*sacloud.Note, error)
- func (s *Service) CreateWithContext(ctx context.Context, req *CreateRequest) (*sacloud.Note, error)
- func (s *Service) Delete(req *DeleteRequest) error
- func (s *Service) DeleteWithContext(ctx context.Context, req *DeleteRequest) error
- func (s *Service) Find(req *FindRequest) ([]*sacloud.Note, error)
- func (s *Service) FindWithContext(ctx context.Context, req *FindRequest) ([]*sacloud.Note, error)
- func (s *Service) Read(req *ReadRequest) (*sacloud.Note, error)
- func (s *Service) ReadWithContext(ctx context.Context, req *ReadRequest) (*sacloud.Note, error)
- func (s *Service) Update(req *UpdateRequest) (*sacloud.Note, error)
- func (s *Service) UpdateWithContext(ctx context.Context, req *UpdateRequest) (*sacloud.Note, 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"` Tags types.Tags IconID types.ID Class string `validate:"required,oneof=shell yaml_cloud_config"` Content string `validate:"required"` }
func (*CreateRequest) ToRequestParameter ¶
func (req *CreateRequest) ToRequestParameter() (*sacloud.NoteCreateRequest, error)
func (*CreateRequest) Validate ¶
func (req *CreateRequest) Validate() error
type DeleteRequest ¶
type DeleteRequest struct { ID types.ID `request:"-" validate:"required"` FailIfNotFound bool `request:"-"` }
func (*DeleteRequest) Validate ¶
func (req *DeleteRequest) Validate() error
type FindRequest ¶
type FindRequest struct { *sacloud.FindCondition Names []string `request:"-"` Tags []string `request:"-"` Scope types.EScope `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 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 Note
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) FindWithContext ¶
func (*Service) ReadWithContext ¶
func (*Service) UpdateWithContext ¶
type UpdateRequest ¶
type UpdateRequest struct { ID types.ID `request:"-" validate:"required"` Name *string `request:",omitempty" validate:"omitempty,min=1"` Tags *types.Tags `request:",omitempty"` IconID *types.ID `request:",omitempty"` Class *string `request:",omitempty" validate:"omitempty,oneof=shell yaml_cloud_config"` Content *string `request:",omitempty"` }
func (*UpdateRequest) ToRequestParameter ¶
func (req *UpdateRequest) ToRequestParameter(current *sacloud.Note) (*sacloud.NoteUpdateRequest, error)
func (*UpdateRequest) Validate ¶
func (req *UpdateRequest) Validate() error
Click to show internal directories.
Click to hide internal directories.