handlers

package
v0.2.24 Latest Latest
Warning

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

Go to latest
Published: May 18, 2025 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HealthCheck

func HealthCheck(c *gin.Context)

HealthCheck provides a simple health check endpoint

func Status

func Status(imapService interfaces.IMAPService) gin.HandlerFunc

Status returns the current status of all mailboxes

Types

type APIHandlers

type APIHandlers struct {
	Emails   *emails.EmailsHandler
	Domains  *DomainHandler
	DNS      *DNSHandler
	Mailbox  *MailboxHandler
	Postmark *PostmarkHandler
}

type ConfigureDomainRequest

type ConfigureDomainRequest struct {
	Domain  string `json:"domain"`
	Website string `json:"website"`
}

type DNSHandler

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

func NewDNSHandler

func NewDNSHandler(s *services.Services) *DNSHandler

func (*DNSHandler) AddDNSRecord

func (h *DNSHandler) AddDNSRecord() gin.HandlerFunc

func (*DNSHandler) DeleteDNSRecord

func (h *DNSHandler) DeleteDNSRecord() gin.HandlerFunc

func (*DNSHandler) GetDNSRecords

func (h *DNSHandler) GetDNSRecords() gin.HandlerFunc

type DNSRecord

type DNSRecord struct {
	ID      string `json:"id"`
	Type    string `json:"type"`
	Name    string `json:"name"`
	Content string `json:"content"`
}

type DNSRecordResponse

type DNSRecordResponse struct {
	Record DNSRecord `json:"dnsRecord"`
}

type DNSResponse

type DNSResponse struct {
	Records []DNSRecord `json:"dnsRecords"`
}

type DomainAvailabilityResponse

type DomainAvailabilityResponse struct {
	IsAvailable bool `json:"isAvailable"`
	IsPremium   bool `json:"isPremium"`
}

type DomainHandler

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

func (*DomainHandler) CheckAvailability

func (h *DomainHandler) CheckAvailability() gin.HandlerFunc

func (*DomainHandler) ConfigureDomain

func (h *DomainHandler) ConfigureDomain() gin.HandlerFunc

func (*DomainHandler) GetDomains

func (h *DomainHandler) GetDomains() gin.HandlerFunc

func (*DomainHandler) GetRecommendations

func (h *DomainHandler) GetRecommendations() gin.HandlerFunc

func (*DomainHandler) PurchaseDomain

func (h *DomainHandler) PurchaseDomain() gin.HandlerFunc

func (*DomainHandler) RegisterNewDomain

func (h *DomainHandler) RegisterNewDomain() gin.HandlerFunc

RegisterNewDomain registers a new domain for the tenant

type DomainRecord

type DomainRecord struct {
	Domain      string   `json:"domain"`
	Nameservers []string `json:"nameservers"`
	CreatedDate string   `json:"createdDate"`
	ExpiredDate string   `json:"expiredDate"`
}

type DomainResponse

type DomainResponse struct {
	Domain DomainRecord `json:"domain"`
}

type DomainsResponse

type DomainsResponse struct {
	Domains []DomainRecord `json:"domains"`
}

type MailboxHandler

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

func NewMailboxHandler

func NewMailboxHandler(repos *repository.Repositories, cfg *config.Config, s *services.Services) *MailboxHandler

func (*MailboxHandler) ConfigureMailbox

func (h *MailboxHandler) ConfigureMailbox() gin.HandlerFunc

func (*MailboxHandler) GetMailboxByEmail

func (h *MailboxHandler) GetMailboxByEmail() gin.HandlerFunc

func (*MailboxHandler) GetMailboxes

func (h *MailboxHandler) GetMailboxes() gin.HandlerFunc

func (*MailboxHandler) RegisterNewMailbox

func (h *MailboxHandler) RegisterNewMailbox() gin.HandlerFunc

type MailboxRecord

type MailboxRecord struct {
	ID                      string   `json:"id,omitempty"`
	Email                   string   `json:"email"`
	Domain                  string   `json:"domain"`
	Username                string   `json:"username"`
	Password                string   `json:"password,omitempty"`
	ForwardingEnabled       bool     `json:"forwardingEnabled"`
	ForwardingTo            []string `json:"forwardingTo"`
	WebmailEnabled          bool     `json:"webmailEnabled"`
	Provisioned             bool     `json:"provisioned"`
	RampUpCurrent           int      `json:"rampUpCurrent"`
	RampUpMax               int      `json:"rampUpMax"`
	RampUpRate              int      `json:"rampUpRate"`
	UserID                  string   `json:"userId,omitempty"`
	MinMinutesBetweenEmails int      `json:"minMinutesBetweenEmails"`
	MaxMinutesBetweenEmails int      `json:"maxMinutesBetweenEmails"`
}

type MailboxesResponse

type MailboxesResponse struct {
	Mailboxes []MailboxRecord `json:"mailboxes,omitempty"`
}

type NewMailboxRequest

type NewMailboxRequest struct {
	Username              string   `json:"username"`
	Password              string   `json:"password"`
	Domain                string   `json:"domain"`
	ForwardingTo          []string `json:"forwardingTo"`
	WebmailEnabled        bool     `json:"webmailEnabled"`
	UserId                string   `json:"userId"`
	IgnoreDomainOwnership bool     `json:"ignoreDomainOwnership"`
}

type PostmarkHandler

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

func NewPostmarkHandler

func NewPostmarkHandler(repos *repository.Repositories, svc *services.Services) *PostmarkHandler

func (*PostmarkHandler) PostmarkDMARCMonitor

func (h *PostmarkHandler) PostmarkDMARCMonitor() gin.HandlerFunc

type PurchaseDomainRequest

type PurchaseDomainRequest struct {
	Domain string `json:"domain"`
}

type RegisterNewDomainRequest

type RegisterNewDomainRequest struct {
	Domain  string `json:"domain"`
	Website string `json:"website"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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