Documentation ¶
Index ¶
- type Client
- type ClientOption
- type ClientService
- type SendForbidden
- type SendInternalServerError
- type SendNotFound
- type SendOK
- type SendParams
- func (o *SendParams) SetBody(body *models.MailerMail)
- func (o *SendParams) SetContext(ctx context.Context)
- func (o *SendParams) SetDefaults()
- func (o *SendParams) SetHTTPClient(client *http.Client)
- func (o *SendParams) SetTimeout(timeout time.Duration)
- func (o *SendParams) WithBody(body *models.MailerMail) *SendParams
- func (o *SendParams) WithContext(ctx context.Context) *SendParams
- func (o *SendParams) WithDefaults() *SendParams
- func (o *SendParams) WithHTTPClient(client *http.Client) *SendParams
- func (o *SendParams) WithTimeout(timeout time.Duration) *SendParams
- func (o *SendParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
- type SendReader
- type SendUnauthorized
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 ¶
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) Error ¶
func (o *SendForbidden) Error() string
func (*SendForbidden) GetPayload ¶
func (o *SendForbidden) GetPayload() *models.RestError
type SendInternalServerError ¶
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) Error ¶
func (o *SendInternalServerError) Error() string
func (*SendInternalServerError) GetPayload ¶
func (o *SendInternalServerError) GetPayload() *models.RestError
type SendNotFound ¶
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) Error ¶
func (o *SendNotFound) Error() string
func (*SendNotFound) GetPayload ¶
func (o *SendNotFound) GetPayload() *models.RestError
type SendOK ¶
type SendOK struct {
Payload *models.MailerSendMailResponse
}
SendOK describes a response with status code 200, with default header values.
SendOK send o k
func (*SendOK) GetPayload ¶
func (o *SendOK) GetPayload() *models.MailerSendMailResponse
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) Error ¶
func (o *SendUnauthorized) Error() string