Versions in this module Expand all Collapse all v0 v0.0.2 Jun 7, 2020 v0.0.1 May 29, 2020 Changes in this version + const CertFileExt + const IssuerCertFileExt + const KeyFileExt + const PemFileExt + var ErrAuthFailed = errors.New("failed to authenticate") + var ErrAuthInvalidCreds = errors.New("invalid credentials") + var ErrBodyRequired = errors.New("Body is required for this endpoint") + var ErrInvalidAuthEmail = errors.New("auth email cannot be blank") + var ErrInvalidAuthKey = errors.New("auth key cannot be blank") + var ErrInvalidUserName = errors.New(...) + var ErrInvalidUserPassword = errors.New("Password must be at least 6 characters long and not include whitespace") + var ErrInvalidUserRole = errors.New("Role does not exist") + var ErrMismatchedID = errors.New("URI doesn't match provided data") + var ErrMissingID = errors.New("Missing identifier in URI") + type AuthHandler interface + Authenticate func() http.HandlerFunc + func NewAuthHandler(cs config.Service, us user.Service) AuthHandler + type CertReq struct + Domains []string + Email string + RenewAt int + type CertResp struct + ACMEEmail string + CertStableURL string + CertURL string + CommonName string + Domains []string + Expiry time.Time + ID string + Issued bool + LastError string + ModTime time.Time + RenewAt int + Secret string + type CertificateHandler interface + Delete func() http.HandlerFunc + DeleteAll func() http.HandlerFunc + Get func() http.HandlerFunc + GetAll func() http.HandlerFunc + GetCert func() http.HandlerFunc + GetIssuer func() http.HandlerFunc + GetPrivkey func() http.HandlerFunc + Post func() http.HandlerFunc + Renew func() http.HandlerFunc + func NewCertificateHandler(cs certificate.Service, as acme.Service) CertificateHandler + type ChallengeHandler interface + Get func() http.HandlerFunc + Put func() http.HandlerFunc + func NewChallengeHandler(cs challenge_config.Service) ChallengeHandler + type ConfigHandler interface + SuperAdmin func() http.HandlerFunc + func NewConfigHandler(cs config.Service) ConfigHandler + type Handler interface + Route func() *mux.Router + Status func() http.HandlerFunc + func NewHandler(version string, us user.Service, cs config.Service, ...) Handler + type MiddlewareHandler interface + Permission func(rbac.Permission, http.HandlerFunc) http.HandlerFunc + func NewMiddlewareHandler(cs config.Service, r *rbac.RBAC) MiddlewareHandler + type UserHandler interface + Delete func() http.HandlerFunc + DeleteAll func() http.HandlerFunc + Get func() http.HandlerFunc + GetAll func() http.HandlerFunc + Put func() http.HandlerFunc + func NewUserHandler(us user.Service) UserHandler + type UserReq struct + Name string + Password string + Role string + type UserResp struct + Name string + Role string