Documentation ¶
Index ¶
- func Watch(rootDomain string, updater domainsUpdater, interval time.Duration)
- type D
- func (d *D) EnsureCertificate() (*tls.Certificate, error)
- func (d *D) GetID(r *http.Request) uint64
- func (d *D) HasAcmeChallenge(token string) bool
- func (d *D) HasProject(r *http.Request) bool
- func (d *D) IsAccessControlEnabled(r *http.Request) bool
- func (d *D) IsHTTPSOnly(r *http.Request) bool
- func (d *D) IsNamespaceProject(r *http.Request) bool
- func (d *D) ServeFileHTTP(w http.ResponseWriter, r *http.Request) bool
- func (d *D) ServeNotFoundHTTP(w http.ResponseWriter, r *http.Request)
- func (d *D) String() string
- type Map
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type D ¶
type D struct {
// contains filtered or unexported fields
}
D is a domain that gitlab-pages can serve.
func (*D) EnsureCertificate ¶
func (d *D) EnsureCertificate() (*tls.Certificate, error)
EnsureCertificate parses the PEM-encoded certificate for the domain
func (*D) GetID ¶ added in v1.2.0
GetID figures out what is the ID of the project user tries to access
func (*D) HasAcmeChallenge ¶ added in v1.6.0
HasAcmeChallenge checks domain directory contains particular acme challenge
func (*D) HasProject ¶ added in v1.2.0
HasProject figures out if the project exists that the user tries to access
func (*D) IsAccessControlEnabled ¶ added in v1.2.0
IsAccessControlEnabled figures out if the request is to a project that has access control enabled
func (*D) IsHTTPSOnly ¶
IsHTTPSOnly figures out if the request should be handled with HTTPS only by looking at group and project level config.
func (*D) IsNamespaceProject ¶ added in v1.2.0
IsNamespaceProject figures out if the request is to a namespace project
func (*D) ServeFileHTTP ¶ added in v1.2.0
ServeFileHTTP implements http.Handler. Returns true if something was served, false if not.
func (*D) ServeNotFoundHTTP ¶ added in v1.2.0
func (d *D) ServeNotFoundHTTP(w http.ResponseWriter, r *http.Request)
ServeNotFoundHTTP implements http.Handler. Serves the not found pages from the projects.