mailu

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCreateAliasRequest

func NewCreateAliasRequest(server string, body Alias) (*http.Request, error)

NewCreateAliasRequest calls the generic CreateAlias builder with application/json body

func NewCreateAliasRequestWithBody

func NewCreateAliasRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewCreateAliasRequestWithBody generates requests for CreateAlias with any type of body

func NewCreateDomainRequest

func NewCreateDomainRequest(server string, body Domain) (*http.Request, error)

NewCreateDomainRequest calls the generic CreateDomain builder with application/json body

func NewCreateDomainRequestWithBody

func NewCreateDomainRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewCreateDomainRequestWithBody generates requests for CreateDomain with any type of body

func NewCreateUserRequest

func NewCreateUserRequest(server string, body User) (*http.Request, error)

NewCreateUserRequest calls the generic CreateUser builder with application/json body

func NewCreateUserRequestWithBody

func NewCreateUserRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewCreateUserRequestWithBody generates requests for CreateUser with any type of body

func NewDeleteAliasRequest

func NewDeleteAliasRequest(server string, alias string) (*http.Request, error)

NewDeleteAliasRequest generates requests for DeleteAlias

func NewDeleteAlternativeRequest

func NewDeleteAlternativeRequest(server string, alt string) (*http.Request, error)

NewDeleteAlternativeRequest generates requests for DeleteAlternative

func NewDeleteDomainRequest

func NewDeleteDomainRequest(server string, domain string) (*http.Request, error)

NewDeleteDomainRequest generates requests for DeleteDomain

func NewDeleteUserRequest

func NewDeleteUserRequest(server string, email string) (*http.Request, error)

NewDeleteUserRequest generates requests for DeleteUser

func NewFindAliasRequest

func NewFindAliasRequest(server string, alias string) (*http.Request, error)

NewFindAliasRequest generates requests for FindAlias

func NewFindDomainRequest

func NewFindDomainRequest(server string, domain string) (*http.Request, error)

NewFindDomainRequest generates requests for FindDomain

func NewFindUserRequest

func NewFindUserRequest(server string, email string) (*http.Request, error)

NewFindUserRequest generates requests for FindUser

func NewUpdateAliasRequest

func NewUpdateAliasRequest(server string, alias string, body Alias) (*http.Request, error)

NewUpdateAliasRequest calls the generic UpdateAlias builder with application/json body

func NewUpdateAliasRequestWithBody

func NewUpdateAliasRequestWithBody(server string, alias string, contentType string, body io.Reader) (*http.Request, error)

NewUpdateAliasRequestWithBody generates requests for UpdateAlias with any type of body

func NewUpdateDomainRequest

func NewUpdateDomainRequest(server string, domain string, body Domain) (*http.Request, error)

NewUpdateDomainRequest calls the generic UpdateDomain builder with application/json body

func NewUpdateDomainRequestWithBody

func NewUpdateDomainRequestWithBody(server string, domain string, contentType string, body io.Reader) (*http.Request, error)

NewUpdateDomainRequestWithBody generates requests for UpdateDomain with any type of body

func NewUpdateUserRequest

func NewUpdateUserRequest(server string, email string, body User) (*http.Request, error)

NewUpdateUserRequest calls the generic UpdateUser builder with application/json body

func NewUpdateUserRequestWithBody

func NewUpdateUserRequestWithBody(server string, email string, contentType string, body io.Reader) (*http.Request, error)

NewUpdateUserRequestWithBody generates requests for UpdateUser with any type of body

Types

type Alias

type Alias struct {
	// Comment a comment
	Comment     *string   `json:"comment,omitempty"`
	Destination *[]string `json:"destination,omitempty"`

	// Email the alias email address
	Email string `json:"email"`

	// Wildcard enable SQL Like wildcard syntax
	Wildcard *bool `json:"wildcard,omitempty"`
}

Alias defines model for Alias.

type Client

type Client struct {
	// The endpoint of the server conforming to this interface, with scheme,
	// https://api.deepmap.com for example. This can contain a path relative
	// to the server, such as https://api.deepmap.com/dev-test, and all the
	// paths in the swagger spec will be appended to the server.
	Server string

	// Doer for performing requests, typically a *http.Client with any
	// customized settings, such as certificate chains.
	Client HttpRequestDoer

	// A list of callbacks for modifying requests which are generated before sending over
	// the network.
	RequestEditors []RequestEditorFn
}

Client which conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(server string, opts ...ClientOption) (*Client, error)

Creates a new Client, with reasonable defaults

func (*Client) CreateAlias

func (c *Client) CreateAlias(ctx context.Context, body Alias, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateDomain

func (c *Client) CreateDomain(ctx context.Context, body Domain, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateUser

func (c *Client) CreateUser(ctx context.Context, body User, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeleteAlias

func (c *Client) DeleteAlias(ctx context.Context, alias string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeleteAlternative

func (c *Client) DeleteAlternative(ctx context.Context, alt string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeleteDomain

func (c *Client) DeleteDomain(ctx context.Context, domain string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeleteUser

func (c *Client) DeleteUser(ctx context.Context, email string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) FindAlias

func (c *Client) FindAlias(ctx context.Context, alias string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) FindDomain

func (c *Client) FindDomain(ctx context.Context, domain string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) FindUser

func (c *Client) FindUser(ctx context.Context, email string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateAlias

func (c *Client) UpdateAlias(ctx context.Context, alias string, body Alias, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateDomain

func (c *Client) UpdateDomain(ctx context.Context, domain string, body Domain, reqEditors ...RequestEditorFn) (*http.Response, error)

UpdateDomain updates the domain with the given body.

func (*Client) UpdateUser

func (c *Client) UpdateUser(ctx context.Context, email string, body User, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithHTTPClient

func WithHTTPClient(doer HttpRequestDoer) ClientOption

WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.

func WithRequestEditorFn

func WithRequestEditorFn(fn RequestEditorFn) ClientOption

WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.

type Domain

type Domain struct {
	Alternatives *[]string `json:"alternatives,omitempty"`

	// Comment a comment
	Comment *string `json:"comment,omitempty"`

	// MaxAliases maximum number of aliases
	MaxAliases *int `json:"max_aliases,omitempty"`

	// MaxQuotaBytes maximum quota for mailbox
	MaxQuotaBytes *int `json:"max_quota_bytes,omitempty"`

	// MaxUsers maximum number of users
	MaxUsers *int `json:"max_users,omitempty"`

	// Name FQDN (e.g. example.com)
	Name string `json:"name"`

	// SignupEnabled allow signup
	SignupEnabled *bool `json:"signup_enabled,omitempty"`
}

Domain defines model for Domain.

type DomainDetails

type DomainDetails struct {
	Alternatives *[]string `json:"alternatives,omitempty"`

	// Comment a comment
	Comment *string `json:"comment,omitempty"`

	DNSAutoconfig *[]string `json:"dns_autoconfig,omitempty"`

	// MaxAliases maximum number of aliases
	MaxAliases *int `json:"max_aliases,omitempty"`

	// MaxQuotaBytes maximum quota for mailbox
	MaxQuotaBytes *int `json:"max_quota_bytes,omitempty"`

	// MaxUsers maximum number of users
	MaxUsers *int `json:"max_users,omitempty"`

	// Managers lists managers of this domain
	Managers *[]string `json:"managers,omitempty"`

	// Name FQDN (e.g. example.com)
	Name string `json:"name"`

	// SignupEnabled allow signup
	SignupEnabled *bool `json:"signup_enabled,omitempty"`
}

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type User

type User struct {
	// AllowSpoofing Allow the user to spoof the sender (send email as anyone)
	AllowSpoofing *bool `json:"allow_spoofing,omitempty"`

	// ChangePwNextLogin Force the user to change their password at next login
	ChangePwNextLogin *bool `json:"change_pw_next_login,omitempty"`

	// Comment A description for the user. This description is shown on the Users page
	Comment *string `json:"comment,omitempty"`

	// DisplayedName The display name of the user within the Admin GUI
	DisplayedName *string `json:"displayed_name,omitempty"`

	// Email The email address of the user
	Email string `json:"email"`

	// Enabled Enable the user
	Enabled *bool `json:"enabled,omitempty"`

	// EnableImap Allow email retrieval via IMAP
	EnableImap *bool `json:"enable_imap,omitempty"`

	// EnablePop Allow email retrieval via POP3
	EnablePop *bool `json:"enable_pop,omitempty"`

	ForwardDestination *[]string `json:"forward_destination,omitempty"`

	// ForwardEnabled Enable auto forwarding
	ForwardEnabled *bool `json:"forward_enabled,omitempty"`

	// ForwardKeep Keep a copy of the forwarded email in the inbox
	ForwardKeep *bool `json:"forward_keep,omitempty"`

	// GlobalAdmin Make the user a global administrator
	GlobalAdmin *bool `json:"global_admin,omitempty"`

	// Password Hash of the user's password
	Password *string `json:"password,omitempty"`

	// QuotaBytes The maximum quota for the user’s email box in bytes
	QuotaBytes *int64 `json:"quota_bytes,omitempty"`

	// QuotaBytesUsed The size of the user’s email box in bytes
	QuotaBytesUsed *int64 `json:"quota_bytes_used,omitempty"`

	// RawPassword is the plain text password for user creation
	RawPassword *string `json:"raw_password,omitempty"`

	// ReplyBody The body of the automatic reply email
	ReplyBody *string `json:"reply_body,omitempty"`

	// ReplyEnabled Enable automatic replies. This is also known as out of office (ooo) or out of facility (oof) replies
	ReplyEnabled *bool `json:"reply_enabled,omitempty"`

	// ReplyEndDate End date for automatic replies in YYYY-MM-DD format.
	ReplyEndDate *openapi_types.Date `json:"reply_enddate,omitempty"`

	// ReplyStartDate Start date for automatic replies in YYYY-MM-DD format.
	ReplyStartDate *openapi_types.Date `json:"reply_startdate,omitempty"`

	// ReplySubject Optional subject for the automatic reply
	ReplySubject *string `json:"reply_subject,omitempty"`

	// SpamEnabled Enable the spam filter
	SpamEnabled *bool `json:"spam_enabled,omitempty"`

	// SpamMarkAsRead Enable marking spam mails as read
	SpamMarkAsRead *bool `json:"spam_mark_as_read,omitempty"`

	// SpamThreshold The user defined spam filter tolerance
	SpamThreshold *int `json:"spam_threshold,omitempty"`
}

User defines model for UserGet.

Jump to

Keyboard shortcuts

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