handlers

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2025 License: Apache-2.0 Imports: 17 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 added in v0.0.3

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

func InitHandlers added in v0.0.3

func InitHandlers(r *repository.Repositories, cfg *config.Config, s *services.Services) *APIHandlers

type ConfigureDomainRequest added in v0.0.3

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

type DNSHandler added in v0.0.3

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

func NewDNSHandler added in v0.0.3

func NewDNSHandler(s *services.Services) *DNSHandler

func (*DNSHandler) AddDNSRecord added in v0.0.3

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

func (*DNSHandler) DeleteDNSRecord added in v0.0.3

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

func (*DNSHandler) GetDNSRecords added in v0.0.3

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

type DNSRecord added in v0.0.3

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

type DNSRecordResponse added in v0.0.3

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

type DNSResponse added in v0.0.3

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

type DomainHandler added in v0.0.3

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

func NewDomainHandler added in v0.0.3

func NewDomainHandler(repos *repository.Repositories, cfg *config.Config, s *services.Services) *DomainHandler

func (*DomainHandler) ConfigureDomain added in v0.0.3

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

func (*DomainHandler) GetDomains added in v0.0.3

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

func (*DomainHandler) GetRecommendations added in v0.0.3

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

func (*DomainHandler) RegisterNewDomain added in v0.0.3

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

RegisterNewDomain registers a new domain for the tenant

type DomainRecord added in v0.0.3

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

type DomainResponse added in v0.0.3

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

type DomainsResponse added in v0.0.3

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

type MailboxHandler added in v0.0.3

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

func NewMailboxHandler added in v0.0.3

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

func (*MailboxHandler) GetMailboxes added in v0.0.3

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

func (*MailboxHandler) RegisterNewMailbox added in v0.0.3

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

type MailboxRecord added in v0.0.3

type MailboxRecord struct {
	Email             string   `json:"email"`
	Password          string   `json:"password,omitempty"`
	ForwardingEnabled bool     `json:"forwardingEnabled"`
	ForwardingTo      []string `json:"forwardingTo"`
	WebmailEnabled    bool     `json:"webmailEnabled"`
}

type MailboxesResponse added in v0.0.3

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

type NewMailboxRequest added in v0.0.3

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"`
}

type RegisterNewDomainRequest added in v0.0.3

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