mailer_service

package
v5.0.0-alpha5 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client for mailer service API

func (*Client) Send

func (a *Client) Send(params *SendParams, opts ...ClientOption) (*SendOK, error)

Send sends an email to a user or any email address

func (*Client) SetTransport

func (a *Client) SetTransport(transport runtime.ClientTransport)

SetTransport changes the transport on the client

type ClientOption

type ClientOption func(*runtime.ClientOperation)

ClientOption is the option for Client methods

type ClientService

type ClientService interface {
	Send(params *SendParams, opts ...ClientOption) (*SendOK, error)

	SetTransport(transport runtime.ClientTransport)
}

ClientService is the interface for Client methods

func New

func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService

New creates a new mailer service API client.

type SendForbidden

type SendForbidden struct {
	Payload *models.RestError
}

SendForbidden describes a response with status code 403, with default header values.

User has no permission to access this resource

func NewSendForbidden

func NewSendForbidden() *SendForbidden

NewSendForbidden creates a SendForbidden with default headers values

func (*SendForbidden) Code

func (o *SendForbidden) Code() int

Code gets the status code for the send forbidden response

func (*SendForbidden) Error

func (o *SendForbidden) Error() string

func (*SendForbidden) GetPayload

func (o *SendForbidden) GetPayload() *models.RestError

func (*SendForbidden) IsClientError

func (o *SendForbidden) IsClientError() bool

IsClientError returns true when this send forbidden response has a 4xx status code

func (*SendForbidden) IsCode

func (o *SendForbidden) IsCode(code int) bool

IsCode returns true when this send forbidden response a status code equal to that given

func (*SendForbidden) IsRedirect

func (o *SendForbidden) IsRedirect() bool

IsRedirect returns true when this send forbidden response has a 3xx status code

func (*SendForbidden) IsServerError

func (o *SendForbidden) IsServerError() bool

IsServerError returns true when this send forbidden response has a 5xx status code

func (*SendForbidden) IsSuccess

func (o *SendForbidden) IsSuccess() bool

IsSuccess returns true when this send forbidden response has a 2xx status code

func (*SendForbidden) String

func (o *SendForbidden) String() string

type SendInternalServerError

type SendInternalServerError struct {
	Payload *models.RestError
}

SendInternalServerError describes a response with status code 500, with default header values.

An internal error occurred in the backend

func NewSendInternalServerError

func NewSendInternalServerError() *SendInternalServerError

NewSendInternalServerError creates a SendInternalServerError with default headers values

func (*SendInternalServerError) Code

func (o *SendInternalServerError) Code() int

Code gets the status code for the send internal server error response

func (*SendInternalServerError) Error

func (o *SendInternalServerError) Error() string

func (*SendInternalServerError) GetPayload

func (o *SendInternalServerError) GetPayload() *models.RestError

func (*SendInternalServerError) IsClientError

func (o *SendInternalServerError) IsClientError() bool

IsClientError returns true when this send internal server error response has a 4xx status code

func (*SendInternalServerError) IsCode

func (o *SendInternalServerError) IsCode(code int) bool

IsCode returns true when this send internal server error response a status code equal to that given

func (*SendInternalServerError) IsRedirect

func (o *SendInternalServerError) IsRedirect() bool

IsRedirect returns true when this send internal server error response has a 3xx status code

func (*SendInternalServerError) IsServerError

func (o *SendInternalServerError) IsServerError() bool

IsServerError returns true when this send internal server error response has a 5xx status code

func (*SendInternalServerError) IsSuccess

func (o *SendInternalServerError) IsSuccess() bool

IsSuccess returns true when this send internal server error response has a 2xx status code

func (*SendInternalServerError) String

func (o *SendInternalServerError) String() string

type SendNotFound

type SendNotFound struct {
	Payload *models.RestError
}

SendNotFound describes a response with status code 404, with default header values.

Resource does not exist in the system

func NewSendNotFound

func NewSendNotFound() *SendNotFound

NewSendNotFound creates a SendNotFound with default headers values

func (*SendNotFound) Code

func (o *SendNotFound) Code() int

Code gets the status code for the send not found response

func (*SendNotFound) Error

func (o *SendNotFound) Error() string

func (*SendNotFound) GetPayload

func (o *SendNotFound) GetPayload() *models.RestError

func (*SendNotFound) IsClientError

func (o *SendNotFound) IsClientError() bool

IsClientError returns true when this send not found response has a 4xx status code

func (*SendNotFound) IsCode

func (o *SendNotFound) IsCode(code int) bool

IsCode returns true when this send not found response a status code equal to that given

func (*SendNotFound) IsRedirect

func (o *SendNotFound) IsRedirect() bool

IsRedirect returns true when this send not found response has a 3xx status code

func (*SendNotFound) IsServerError

func (o *SendNotFound) IsServerError() bool

IsServerError returns true when this send not found response has a 5xx status code

func (*SendNotFound) IsSuccess

func (o *SendNotFound) IsSuccess() bool

IsSuccess returns true when this send not found response has a 2xx status code

func (*SendNotFound) String

func (o *SendNotFound) String() string

type SendOK

type SendOK struct {
	Payload *models.MailerSendMailResponse
}

SendOK describes a response with status code 200, with default header values.

A successful response.

func NewSendOK

func NewSendOK() *SendOK

NewSendOK creates a SendOK with default headers values

func (*SendOK) Code

func (o *SendOK) Code() int

Code gets the status code for the send o k response

func (*SendOK) Error

func (o *SendOK) Error() string

func (*SendOK) GetPayload

func (o *SendOK) GetPayload() *models.MailerSendMailResponse

func (*SendOK) IsClientError

func (o *SendOK) IsClientError() bool

IsClientError returns true when this send o k response has a 4xx status code

func (*SendOK) IsCode

func (o *SendOK) IsCode(code int) bool

IsCode returns true when this send o k response a status code equal to that given

func (*SendOK) IsRedirect

func (o *SendOK) IsRedirect() bool

IsRedirect returns true when this send o k response has a 3xx status code

func (*SendOK) IsServerError

func (o *SendOK) IsServerError() bool

IsServerError returns true when this send o k response has a 5xx status code

func (*SendOK) IsSuccess

func (o *SendOK) IsSuccess() bool

IsSuccess returns true when this send o k response has a 2xx status code

func (*SendOK) String

func (o *SendOK) String() string

type SendParams

type SendParams struct {

	// Body.
	Body *models.MailerMail

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

SendParams contains all the parameters to send to the API endpoint

for the send operation.

Typically these are written to a http.Request.

func NewSendParams

func NewSendParams() *SendParams

NewSendParams creates a new SendParams object, with the default timeout for this client.

Default values are not hydrated, since defaults are normally applied by the API server side.

To enforce default values in parameter, use SetDefaults or WithDefaults.

func NewSendParamsWithContext

func NewSendParamsWithContext(ctx context.Context) *SendParams

NewSendParamsWithContext creates a new SendParams object with the ability to set a context for a request.

func NewSendParamsWithHTTPClient

func NewSendParamsWithHTTPClient(client *http.Client) *SendParams

NewSendParamsWithHTTPClient creates a new SendParams object with the ability to set a custom HTTPClient for a request.

func NewSendParamsWithTimeout

func NewSendParamsWithTimeout(timeout time.Duration) *SendParams

NewSendParamsWithTimeout creates a new SendParams object with the ability to set a timeout on a request.

func (*SendParams) SetBody

func (o *SendParams) SetBody(body *models.MailerMail)

SetBody adds the body to the send params

func (*SendParams) SetContext

func (o *SendParams) SetContext(ctx context.Context)

SetContext adds the context to the send params

func (*SendParams) SetDefaults

func (o *SendParams) SetDefaults()

SetDefaults hydrates default values in the send params (not the query body).

All values with no default are reset to their zero value.

func (*SendParams) SetHTTPClient

func (o *SendParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the send params

func (*SendParams) SetTimeout

func (o *SendParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the send params

func (*SendParams) WithBody

func (o *SendParams) WithBody(body *models.MailerMail) *SendParams

WithBody adds the body to the send params

func (*SendParams) WithContext

func (o *SendParams) WithContext(ctx context.Context) *SendParams

WithContext adds the context to the send params

func (*SendParams) WithDefaults

func (o *SendParams) WithDefaults() *SendParams

WithDefaults hydrates default values in the send params (not the query body).

All values with no default are reset to their zero value.

func (*SendParams) WithHTTPClient

func (o *SendParams) WithHTTPClient(client *http.Client) *SendParams

WithHTTPClient adds the HTTPClient to the send params

func (*SendParams) WithTimeout

func (o *SendParams) WithTimeout(timeout time.Duration) *SendParams

WithTimeout adds the timeout to the send params

func (*SendParams) WriteToRequest

func (o *SendParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type SendReader

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

SendReader is a Reader for the Send structure.

func (*SendReader) ReadResponse

func (o *SendReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type SendUnauthorized

type SendUnauthorized struct {
}

SendUnauthorized describes a response with status code 401, with default header values.

User is not authenticated

func NewSendUnauthorized

func NewSendUnauthorized() *SendUnauthorized

NewSendUnauthorized creates a SendUnauthorized with default headers values

func (*SendUnauthorized) Code

func (o *SendUnauthorized) Code() int

Code gets the status code for the send unauthorized response

func (*SendUnauthorized) Error

func (o *SendUnauthorized) Error() string

func (*SendUnauthorized) IsClientError

func (o *SendUnauthorized) IsClientError() bool

IsClientError returns true when this send unauthorized response has a 4xx status code

func (*SendUnauthorized) IsCode

func (o *SendUnauthorized) IsCode(code int) bool

IsCode returns true when this send unauthorized response a status code equal to that given

func (*SendUnauthorized) IsRedirect

func (o *SendUnauthorized) IsRedirect() bool

IsRedirect returns true when this send unauthorized response has a 3xx status code

func (*SendUnauthorized) IsServerError

func (o *SendUnauthorized) IsServerError() bool

IsServerError returns true when this send unauthorized response has a 5xx status code

func (*SendUnauthorized) IsSuccess

func (o *SendUnauthorized) IsSuccess() bool

IsSuccess returns true when this send unauthorized response has a 2xx status code

func (*SendUnauthorized) String

func (o *SendUnauthorized) String() string

Jump to

Keyboard shortcuts

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