Documentation ¶
Index ¶
- type Domain
- func (d *Domain) EnsureCertificate() (*tls.Certificate, error)
- func (d *Domain) GetLookupPath(r *http.Request) *serving.LookupPath
- func (d *Domain) GetProjectID(r *http.Request) uint64
- func (d *Domain) HasLookupPath(r *http.Request) bool
- func (d *Domain) IsAccessControlEnabled(r *http.Request) bool
- func (d *Domain) IsHTTPSOnly(r *http.Request) bool
- func (d *Domain) IsNamespaceProject(r *http.Request) bool
- func (d *Domain) ServeFileHTTP(w http.ResponseWriter, r *http.Request) bool
- func (d *Domain) ServeNotFoundAuthFailed(w http.ResponseWriter, r *http.Request)
- func (d *Domain) ServeNotFoundHTTP(w http.ResponseWriter, r *http.Request)
- func (d *Domain) String() string
- type Resolver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Domain ¶ added in v1.9.0
type Domain struct { Name string CertificateCert string CertificateKey string Resolver Resolver // contains filtered or unexported fields }
Domain is a domain that gitlab-pages can serve.
func (*Domain) EnsureCertificate ¶ added in v1.9.0
func (d *Domain) EnsureCertificate() (*tls.Certificate, error)
EnsureCertificate parses the PEM-encoded certificate for the domain
func (*Domain) GetLookupPath ¶ added in v1.11.0
func (d *Domain) GetLookupPath(r *http.Request) *serving.LookupPath
GetLookupPath returns a project details based on the request. It returns nil if project does not exist.
func (*Domain) GetProjectID ¶ added in v1.11.0
GetProjectID figures out what is the ID of the project user tries to access
func (*Domain) HasLookupPath ¶ added in v1.11.0
HasLookupPath figures out if the project exists that the user tries to access
func (*Domain) IsAccessControlEnabled ¶ added in v1.9.0
IsAccessControlEnabled figures out if the request is to a project that has access control enabled
func (*Domain) IsHTTPSOnly ¶ added in v1.9.0
IsHTTPSOnly figures out if the request should be handled with HTTPS only by looking at group and project level config.
func (*Domain) IsNamespaceProject ¶ added in v1.9.0
IsNamespaceProject figures out if the request is to a namespace project
func (*Domain) ServeFileHTTP ¶ added in v1.9.0
ServeFileHTTP returns true if something was served, false if not.
func (*Domain) ServeNotFoundAuthFailed ¶ added in v1.22.0
func (d *Domain) ServeNotFoundAuthFailed(w http.ResponseWriter, r *http.Request)
ServeNotFoundAuthFailed handler to be called when auth failed so the correct custom 404 page is served.
func (*Domain) ServeNotFoundHTTP ¶ added in v1.9.0
func (d *Domain) ServeNotFoundHTTP(w http.ResponseWriter, r *http.Request)
ServeNotFoundHTTP serves the not found pages from the projects.