handlers

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2025 License: Apache-2.0 Imports: 18 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 DomainAvailabilityResponse added in v0.0.8

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

type DomainHandler added in v0.0.3

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

func NewDomainHandler added in v0.0.3

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

func (*DomainHandler) CheckAvailability added in v0.0.8

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

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) PurchaseDomain added in v0.0.9

func (h *DomainHandler) PurchaseDomain() 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) ConfigureMailbox added in v0.0.10

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

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 {
	ID                string   `json:"id,omitempty"`
	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"`
	IgnoreDomainOwnership bool     `json:"ignoreDomainOwnership"`
}

type PurchaseDomainRequest added in v0.0.9

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

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