gitea/modules/structs/repo_pages.go
logikonline 81bb23f0da fix: resolve golangci-lint errors (batch 1)
- cmd/gitea-cli: fix errcheck, perfsprint, use modules/json, http constants
- models/migrations: remove unused nolint directive
- models/organization: interface{} -> any
- modules/health: rename HealthResponse -> Response to avoid stutter
- modules/idempotency: use modules/json, fix errcheck, rename IdempotencyInfo -> Info
- modules/structs: fix Verified_At naming, use omitzero

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 17:46:44 -05:00

48 lines
1.6 KiB
Go

// Copyright 2026 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
package structs
import "time"
// PagesConfig represents the pages configuration for a repository
type PagesConfig struct {
Enabled bool `json:"enabled"`
Template string `json:"template"`
Subdomain string `json:"subdomain,omitempty"`
URL string `json:"url,omitempty"`
}
// PagesDomain represents a custom domain for Gitea Pages
type PagesDomain struct {
ID int64 `json:"id"`
Domain string `json:"domain"`
Verified bool `json:"verified"`
VerificationToken string `json:"verification_token,omitempty"`
SSLStatus string `json:"ssl_status"`
SSLCertExpiry time.Time `json:"ssl_cert_expiry,omitzero"`
Created time.Time `json:"created_at"`
VerifiedAt time.Time `json:"verified_at,omitempty"`
}
// CreatePagesConfigOption options for creating/updating pages config
type CreatePagesConfigOption struct {
// Whether pages is enabled
Enabled bool `json:"enabled"`
// Template to use (simple, documentation, product, portfolio)
Template string `json:"template" binding:"In(simple,documentation,product,portfolio)"`
}
// AddPagesDomainOption options for adding a custom domain
type AddPagesDomainOption struct {
// The custom domain to add
// required: true
Domain string `json:"domain" binding:"Required"`
}
// PagesInfo represents the full pages information for a repository
type PagesInfo struct {
Config *PagesConfig `json:"config"`
Domains []*PagesDomain `json:"domains,omitempty"`
}