Documentation
¶
Index ¶
- func JSONHandler[TReq, TRes any](statusOnOK int, handler JSONHandlerFunc[TReq, TRes]) http.HandlerFunc
- func MakeAdminRouter(dbRepo domain.DomainRepo, dnsRecordManager *dns.DNSRecordManager, ...) chi.Router
- func MakePortalRouter(domainRepo domain.DomainRepo, dnsRecordManager *dns.DNSRecordManager, ...) chi.Router
- type AskEndpoint
- type BaseDomainResponse
- type CertAdminEndpoint
- type CertResponse
- type DeleteDomainResponse
- type DomainAdminEndpoint
- type DomainResponse
- type HTTPError
- type JSONHandlerFunc
- type PokeCertResponse
- type UpsertDomainRequest
- type ZapFormatter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JSONHandler ¶
func JSONHandler[TReq, TRes any](statusOnOK int, handler JSONHandlerFunc[TReq, TRes]) http.HandlerFunc
func MakeAdminRouter ¶
func MakeAdminRouter( dbRepo domain.DomainRepo, dnsRecordManager *dns.DNSRecordManager, certMan certman.CertMan, logger *zap.Logger, sessionStore pkgsession.SessionStore, signingKey []byte, portalBaseURL string, ) chi.Router
func MakePortalRouter ¶
func MakePortalRouter( domainRepo domain.DomainRepo, dnsRecordManager *dns.DNSRecordManager, certMan certman.CertMan, sessionStore pkgsession.SessionStore, signingKey []byte, portalBaseURL string, assetsFS fs.FS, version string, logger *zap.Logger, webhookDispatcher webhook.Dispatcher, lookup dns.Lookup, ) chi.Router
MakePortalRouter creates the chi router for the portal. It handles /portal/* routes: static assets, session management, and API.
Types ¶
type AskEndpoint ¶
type AskEndpoint struct {
// contains filtered or unexported fields
}
func NewAskEndpoint ¶
func NewAskEndpoint(domainRepo domain.DomainRepo) *AskEndpoint
func (*AskEndpoint) ServeHTTP ¶
func (e *AskEndpoint) ServeHTTP(w http.ResponseWriter, r *http.Request)
type BaseDomainResponse ¶
type BaseDomainResponse struct {
Hostname string `json:"hostname" yaml:"hostname"`
TenantID string `json:"tenant_id,omitempty" yaml:"tenant_id,omitempty"`
OwnershipVerified bool `json:"ownership_verified" yaml:"ownership_verified"`
VerificationToken string `json:"verification_token,omitempty" yaml:"verification_token,omitempty"`
}
type CertAdminEndpoint ¶
type CertAdminEndpoint struct {
// contains filtered or unexported fields
}
func (*CertAdminEndpoint) BuildCertAdminRouter ¶
func (e *CertAdminEndpoint) BuildCertAdminRouter() chi.Router
type CertResponse ¶
type DeleteDomainResponse ¶
type DomainAdminEndpoint ¶
type DomainAdminEndpoint struct {
DNSRecordManager *dns.DNSRecordManager
// contains filtered or unexported fields
}
func (*DomainAdminEndpoint) BuildDomainAdminRouter ¶
func (e *DomainAdminEndpoint) BuildDomainAdminRouter() chi.Router
type DomainResponse ¶
type DomainResponse struct {
BaseDomainResponse
RequiredDNSRecords []domain.DNSRecord `json:"required_dns_records,omitempty" yaml:"required_dns_records,omitempty"`
}
type JSONHandlerFunc ¶
type PokeCertResponse ¶
type PokeCertResponse struct {
Hostname string `json:"hostname" yaml:"hostname"`
}
type UpsertDomainRequest ¶
type ZapFormatter ¶
func (*ZapFormatter) NewLogEntry ¶
func (z *ZapFormatter) NewLogEntry(r *http.Request) middleware.LogEntry
Click to show internal directories.
Click to hide internal directories.