esme

package
v2.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2020 License: Apache-2.0 Imports: 8 Imported by: 2

Documentation

Index

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
}

func (*CreateRequest) ToRequestParameter

func (req *CreateRequest) ToRequestParameter() (*sacloud.ESMECreateRequest, 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 {
	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 LogsRequest

type LogsRequest struct {
	ID types.ID `request:"-" validate:"required"`
}

func (*LogsRequest) Validate

func (req *LogsRequest) Validate() error

type ReadRequest

type ReadRequest struct {
	ID types.ID `request:"-" validate:"required"`
}

func (*ReadRequest) Validate

func (req *ReadRequest) Validate() error

type SendMessageRequest

type SendMessageRequest struct {
	ID types.ID `request:"-" validate:"required"`

	Destination string `validate:"required"`
	Sender      string `validate:"required"`
	OTP         string
}

func (*SendMessageRequest) ToRequestParameter

func (req *SendMessageRequest) ToRequestParameter() interface{}

func (*SendMessageRequest) Validate

func (req *SendMessageRequest) Validate() error

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service provides a high-level API of for ESME

func New

func New(caller sacloud.APICaller) *Service

New returns new service instance of ESME

func (*Service) Create

func (s *Service) Create(req *CreateRequest) (*sacloud.ESME, error)

func (*Service) CreateWithContext

func (s *Service) CreateWithContext(ctx context.Context, req *CreateRequest) (*sacloud.ESME, 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) ([]*sacloud.ESME, error)

func (*Service) FindWithContext

func (s *Service) FindWithContext(ctx context.Context, req *FindRequest) ([]*sacloud.ESME, error)

func (*Service) Logs

func (s *Service) Logs(req *LogsRequest) ([]*sacloud.ESMELogs, error)

func (*Service) LogsWithContext

func (s *Service) LogsWithContext(ctx context.Context, req *LogsRequest) ([]*sacloud.ESMELogs, error)

func (*Service) Read

func (s *Service) Read(req *ReadRequest) (*sacloud.ESME, error)

func (*Service) ReadWithContext

func (s *Service) ReadWithContext(ctx context.Context, req *ReadRequest) (*sacloud.ESME, error)

func (*Service) SendMessage

func (*Service) SendMessageWithContext

func (s *Service) SendMessageWithContext(ctx context.Context, req *SendMessageRequest) (*sacloud.ESMESendMessageResult, error)

func (*Service) Update

func (s *Service) Update(req *UpdateRequest) (*sacloud.ESME, error)

func (*Service) UpdateWithContext

func (s *Service) UpdateWithContext(ctx context.Context, req *UpdateRequest) (*sacloud.ESME, error)

type UpdateRequest

type UpdateRequest struct {
	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"`
}

func (*UpdateRequest) ToRequestParameter

func (req *UpdateRequest) ToRequestParameter(current *sacloud.ESME) (*sacloud.ESMEUpdateRequest, error)

func (*UpdateRequest) Validate

func (req *UpdateRequest) Validate() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL