Documentation
¶
Index ¶
- Constants
- func AddPagesDomain(ctx context.Context, repoID int64, domain string, sslExternal bool) (*repo_model.PagesDomain, error)
- func DisablePages(ctx context.Context, repo *repo_model.Repository) error
- func EnablePages(ctx context.Context, repo *repo_model.Repository, template string) error
- func GetPagesConfig(ctx context.Context, repo *repo_model.Repository) (*pages_module.LandingConfig, error)
- func GetPagesDomains(ctx context.Context, repoID int64) ([]*repo_model.PagesDomain, error)
- func GetPagesSubdomain(repo *repo_model.Repository) string
- func GetPagesURL(repo *repo_model.Repository) string
- func GetRepoByPagesDomain(ctx context.Context, domainName string) (*repo_model.Repository, error)
- func HasPublicLanding(ctx context.Context, repo *repo_model.Repository) bool
- func HasPublicReleases(ctx context.Context, repo *repo_model.Repository) bool
- func IsPagesEnabled(ctx context.Context, repo *repo_model.Repository) (bool, error)
- func RemovePagesDomain(ctx context.Context, repoID, domainID int64) error
- func VerifyDomain(ctx context.Context, domainID int64) error
Constants ¶
const ( // LandingConfigPath is the path to the landing page configuration file LandingConfigPath = ".gitea/landing.yaml" // LandingConfigPathAlt is an alternative path for the configuration file LandingConfigPathAlt = ".gitea/landing.yml" )
Variables ¶
This section is empty.
Functions ¶
func AddPagesDomain ¶
func AddPagesDomain(ctx context.Context, repoID int64, domain string, sslExternal bool) (*repo_model.PagesDomain, error)
AddPagesDomain adds a custom domain for pages
func DisablePages ¶
func DisablePages(ctx context.Context, repo *repo_model.Repository) error
DisablePages disables pages for a repository
func EnablePages ¶
func EnablePages(ctx context.Context, repo *repo_model.Repository, template string) error
EnablePages enables pages for a repository with default config
func GetPagesConfig ¶
func GetPagesConfig(ctx context.Context, repo *repo_model.Repository) (*pages_module.LandingConfig, error)
GetPagesConfig returns the pages configuration for a repository It first tries to load from the database cache, then falls back to parsing the file
func GetPagesDomains ¶
func GetPagesDomains(ctx context.Context, repoID int64) ([]*repo_model.PagesDomain, error)
GetPagesDomains returns all custom domains for a repository's pages
func GetPagesSubdomain ¶
func GetPagesSubdomain(repo *repo_model.Repository) string
GetPagesSubdomain returns the subdomain for a repository's pages
func GetPagesURL ¶
func GetPagesURL(repo *repo_model.Repository) string
GetPagesURL returns the full URL for a repository's pages
func GetRepoByPagesDomain ¶
func GetRepoByPagesDomain(ctx context.Context, domainName string) (*repo_model.Repository, error)
GetRepoByPagesDomain returns the repository for a pages domain
func HasPublicLanding ¶
func HasPublicLanding(ctx context.Context, repo *repo_model.Repository) bool
HasPublicLanding checks if a repository has public landing enabled This allows private repos to have a public-facing landing page
func HasPublicReleases ¶
func HasPublicReleases(ctx context.Context, repo *repo_model.Repository) bool
HasPublicReleases checks if a repository has public releases enabled This allows private repos to have publicly accessible releases
func IsPagesEnabled ¶
func IsPagesEnabled(ctx context.Context, repo *repo_model.Repository) (bool, error)
IsPagesEnabled checks if pages is enabled for a repository
func RemovePagesDomain ¶
RemovePagesDomain removes a custom domain
Types ¶
This section is empty.
Source Files
¶
- pages.go