Documentation ¶
Index ¶
- type MigaduClient
- func (c *MigaduClient) CreateAlias(ctx context.Context, domain string, alias *model.Alias) (*model.Alias, error)
- func (c *MigaduClient) CreateIdentity(ctx context.Context, domain string, localPart string, identity *model.Identity) (*model.Identity, error)
- func (c *MigaduClient) CreateMailbox(ctx context.Context, domain string, mailbox *model.Mailbox) (*model.Mailbox, error)
- func (c *MigaduClient) CreateRewriteRule(ctx context.Context, domain string, rewrite *model.RewriteRule) (*model.RewriteRule, error)
- func (c *MigaduClient) DeleteAlias(ctx context.Context, domain string, localPart string) (*model.Alias, error)
- func (c *MigaduClient) DeleteIdentity(ctx context.Context, domain string, localPart string, id string) (*model.Identity, error)
- func (c *MigaduClient) DeleteMailbox(ctx context.Context, domain string, localPart string) (*model.Mailbox, error)
- func (c *MigaduClient) DeleteRewriteRule(ctx context.Context, domain string, slug string) (*model.RewriteRule, error)
- func (c *MigaduClient) GetAlias(ctx context.Context, domain string, localPart string) (*model.Alias, error)
- func (c *MigaduClient) GetAliases(ctx context.Context, domain string) (*model.Aliases, error)
- func (c *MigaduClient) GetIdentities(ctx context.Context, domain string, localPart string) (*model.Identities, error)
- func (c *MigaduClient) GetIdentity(ctx context.Context, domain string, localPart string, id string) (*model.Identity, error)
- func (c *MigaduClient) GetMailbox(ctx context.Context, domain string, localPart string) (*model.Mailbox, error)
- func (c *MigaduClient) GetMailboxes(ctx context.Context, domain string) (*model.Mailboxes, error)
- func (c *MigaduClient) GetRewriteRule(ctx context.Context, domain string, slug string) (*model.RewriteRule, error)
- func (c *MigaduClient) GetRewriteRules(ctx context.Context, domain string) (*model.RewriteRules, error)
- func (c *MigaduClient) UpdateAlias(ctx context.Context, domain string, localPart string, alias *model.Alias) (*model.Alias, error)
- func (c *MigaduClient) UpdateIdentity(ctx context.Context, domain string, localPart string, id string, ...) (*model.Identity, error)
- func (c *MigaduClient) UpdateMailbox(ctx context.Context, domain string, localPart string, mailbox *model.Mailbox) (*model.Mailbox, error)
- func (c *MigaduClient) UpdateRewriteRule(ctx context.Context, domain string, slug string, rewrite *model.RewriteRule) (*model.RewriteRule, error)
- type RequestError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MigaduClient ¶
MigaduClient holds all necessary information to interact with the Migadu API
func New ¶
func New(endpoint, username, token *string, timeout time.Duration) (*MigaduClient, error)
New creates a new MigaduClient
func (*MigaduClient) CreateAlias ¶
func (c *MigaduClient) CreateAlias(ctx context.Context, domain string, alias *model.Alias) (*model.Alias, error)
CreateAlias creates a new alias
func (*MigaduClient) CreateIdentity ¶
func (c *MigaduClient) CreateIdentity(ctx context.Context, domain string, localPart string, identity *model.Identity) (*model.Identity, error)
CreateIdentity creates a new identity
func (*MigaduClient) CreateMailbox ¶
func (c *MigaduClient) CreateMailbox(ctx context.Context, domain string, mailbox *model.Mailbox) (*model.Mailbox, error)
CreateMailbox creates a new mailbox
func (*MigaduClient) CreateRewriteRule ¶
func (c *MigaduClient) CreateRewriteRule(ctx context.Context, domain string, rewrite *model.RewriteRule) (*model.RewriteRule, error)
CreateRewriteRule creates a new rewrite rule
func (*MigaduClient) DeleteAlias ¶
func (c *MigaduClient) DeleteAlias(ctx context.Context, domain string, localPart string) (*model.Alias, error)
DeleteAlias deletes an existing alias
func (*MigaduClient) DeleteIdentity ¶
func (c *MigaduClient) DeleteIdentity(ctx context.Context, domain string, localPart string, id string) (*model.Identity, error)
DeleteIdentity deletes an existing identity
func (*MigaduClient) DeleteMailbox ¶
func (c *MigaduClient) DeleteMailbox(ctx context.Context, domain string, localPart string) (*model.Mailbox, error)
DeleteMailbox deletes an existing mailbox
func (*MigaduClient) DeleteRewriteRule ¶
func (c *MigaduClient) DeleteRewriteRule(ctx context.Context, domain string, slug string) (*model.RewriteRule, error)
DeleteRewriteRule deletes an existing rewrite rule
func (*MigaduClient) GetAlias ¶
func (c *MigaduClient) GetAlias(ctx context.Context, domain string, localPart string) (*model.Alias, error)
GetAlias returns specific alias
func (*MigaduClient) GetAliases ¶
GetAliases returns all aliases for a single domain
func (*MigaduClient) GetIdentities ¶
func (c *MigaduClient) GetIdentities(ctx context.Context, domain string, localPart string) (*model.Identities, error)
GetIdentities returns identities for a single mailbox
func (*MigaduClient) GetIdentity ¶
func (c *MigaduClient) GetIdentity(ctx context.Context, domain string, localPart string, id string) (*model.Identity, error)
GetIdentity returns a specific identity
func (*MigaduClient) GetMailbox ¶
func (c *MigaduClient) GetMailbox(ctx context.Context, domain string, localPart string) (*model.Mailbox, error)
GetMailbox returns specific mailbox
func (*MigaduClient) GetMailboxes ¶
GetMailboxes returns mailboxes for a single domain
func (*MigaduClient) GetRewriteRule ¶
func (c *MigaduClient) GetRewriteRule(ctx context.Context, domain string, slug string) (*model.RewriteRule, error)
GetRewriteRule returns a specific rewrite rule
func (*MigaduClient) GetRewriteRules ¶
func (c *MigaduClient) GetRewriteRules(ctx context.Context, domain string) (*model.RewriteRules, error)
GetRewriteRules returns rewrite rules for a single domain
func (*MigaduClient) UpdateAlias ¶
func (c *MigaduClient) UpdateAlias(ctx context.Context, domain string, localPart string, alias *model.Alias) (*model.Alias, error)
UpdateAlias updates an existing alias
func (*MigaduClient) UpdateIdentity ¶
func (c *MigaduClient) UpdateIdentity(ctx context.Context, domain string, localPart string, id string, identity *model.Identity) (*model.Identity, error)
UpdateIdentity updates an existing identity
func (*MigaduClient) UpdateMailbox ¶
func (c *MigaduClient) UpdateMailbox(ctx context.Context, domain string, localPart string, mailbox *model.Mailbox) (*model.Mailbox, error)
UpdateMailbox updates an existing mailbox
func (*MigaduClient) UpdateRewriteRule ¶
func (c *MigaduClient) UpdateRewriteRule(ctx context.Context, domain string, slug string, rewrite *model.RewriteRule) (*model.RewriteRule, error)
UpdateRewriteRule updates an existing rewrite rule
type RequestError ¶
func (*RequestError) Error ¶
func (e *RequestError) Error() string