Documentation
¶
Overview ¶
Package pages implements MCP tool handlers for GitLab Pages and Pages Domains management. Covers PagesService (get, update, unpublish) and PagesDomainsService (list all, list project, get, create, update, delete).
Index ¶
- func DeleteDomain(ctx context.Context, client *gitlabclient.Client, input DeleteDomainInput) error
- func FormatAllDomainsMarkdown(out ListAllDomainsOutput) string
- func FormatDeleteMarkdown(domain string) string
- func FormatDomainListMarkdown(out ListDomainsOutput) string
- func FormatDomainMarkdown(out DomainOutput) string
- func FormatPagesMarkdown(out Output) string
- func FormatUnpublishMarkdown() string
- func RegisterMeta(server *mcp.Server, client *gitlabclient.Client)
- func RegisterTools(server *mcp.Server, client *gitlabclient.Client)
- func UnpublishPages(ctx context.Context, client *gitlabclient.Client, input UnpublishPagesInput) error
- type CertificateOutput
- type CreateDomainInput
- type DeleteDomainInput
- type DeploymentOutput
- type DomainOutput
- func CreateDomain(ctx context.Context, client *gitlabclient.Client, input CreateDomainInput) (DomainOutput, error)
- func GetDomain(ctx context.Context, client *gitlabclient.Client, input GetDomainInput) (DomainOutput, error)
- func UpdateDomain(ctx context.Context, client *gitlabclient.Client, input UpdateDomainInput) (DomainOutput, error)
- type GetDomainInput
- type GetPagesInput
- type ListAllDomainsInput
- type ListAllDomainsOutput
- type ListDomainsInput
- type ListDomainsOutput
- type Output
- type UnpublishPagesInput
- type UpdateDomainInput
- type UpdatePagesInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteDomain ¶
func DeleteDomain(ctx context.Context, client *gitlabclient.Client, input DeleteDomainInput) error
DeleteDomain deletes a Pages domain.
func FormatAllDomainsMarkdown ¶
func FormatAllDomainsMarkdown(out ListAllDomainsOutput) string
FormatAllDomainsMarkdown formats a list of all Pages domains.
func FormatDeleteMarkdown ¶
FormatDeleteMarkdown returns a confirmation for domain deletion.
func FormatDomainListMarkdown ¶
func FormatDomainListMarkdown(out ListDomainsOutput) string
FormatDomainListMarkdown formats a list of Pages domains.
func FormatDomainMarkdown ¶
func FormatDomainMarkdown(out DomainOutput) string
FormatDomainMarkdown formats a single Pages domain for display.
func FormatPagesMarkdown ¶
FormatPagesMarkdown formats Pages settings for display.
func FormatUnpublishMarkdown ¶
func FormatUnpublishMarkdown() string
FormatUnpublishMarkdown returns a confirmation for pages unpublish.
func RegisterMeta ¶
func RegisterMeta(server *mcp.Server, client *gitlabclient.Client)
RegisterMeta registers the gitlab_page meta-tool.
func RegisterTools ¶
func RegisterTools(server *mcp.Server, client *gitlabclient.Client)
RegisterTools registers individual Pages and Pages Domains tools.
func UnpublishPages ¶
func UnpublishPages(ctx context.Context, client *gitlabclient.Client, input UnpublishPagesInput) error
UnpublishPages unpublishes Pages for a project.
Types ¶
type CertificateOutput ¶
type CertificateOutput struct {
Subject string `json:"subject"`
Expired bool `json:"expired"`
Expiration string `json:"expiration,omitempty"`
Certificate string `json:"certificate,omitempty"`
CertificateText string `json:"certificate_text,omitempty"`
}
CertificateOutput represents a Pages domain certificate.
type CreateDomainInput ¶
type CreateDomainInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
Domain string `json:"domain" jsonschema:"Custom domain name (e.g. example.com),required"`
AutoSslEnabled *bool `json:"auto_ssl_enabled,omitempty" jsonschema:"Enable automatic SSL certificate provisioning"`
Certificate string `json:"certificate,omitempty" jsonschema:"PEM-encoded SSL certificate"`
Key string `json:"key,omitempty" jsonschema:"PEM-encoded private key for the certificate"`
}
CreateDomainInput defines parameters for creating a Pages domain.
type DeleteDomainInput ¶
type DeleteDomainInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
Domain string `json:"domain" jsonschema:"The Pages domain name to delete,required"`
}
DeleteDomainInput defines parameters for deleting a Pages domain.
type DeploymentOutput ¶
type DeploymentOutput struct {
CreatedAt string `json:"created_at"`
URL string `json:"url"`
PathPrefix string `json:"path_prefix"`
RootDirectory string `json:"root_directory"`
}
DeploymentOutput represents a Pages deployment.
type DomainOutput ¶
type DomainOutput struct {
toolutil.HintableOutput
Domain string `json:"domain"`
AutoSslEnabled bool `json:"auto_ssl_enabled"`
URL string `json:"url"`
ProjectID int64 `json:"project_id"`
ProjectPath string `json:"project_path,omitempty"`
Verified bool `json:"verified"`
VerificationCode string `json:"verification_code"`
EnabledUntil string `json:"enabled_until,omitempty"`
Certificate CertificateOutput `json:"certificate"`
}
DomainOutput represents a Pages domain.
func CreateDomain ¶
func CreateDomain(ctx context.Context, client *gitlabclient.Client, input CreateDomainInput) (DomainOutput, error)
CreateDomain creates a new Pages domain for a project.
func GetDomain ¶
func GetDomain(ctx context.Context, client *gitlabclient.Client, input GetDomainInput) (DomainOutput, error)
GetDomain retrieves a single Pages domain.
func UpdateDomain ¶
func UpdateDomain(ctx context.Context, client *gitlabclient.Client, input UpdateDomainInput) (DomainOutput, error)
UpdateDomain updates an existing Pages domain.
type GetDomainInput ¶
type GetDomainInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
Domain string `json:"domain" jsonschema:"The Pages domain name,required"`
}
GetDomainInput defines parameters for getting a single Pages domain.
type GetPagesInput ¶
type GetPagesInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
}
GetPagesInput defines parameters for getting Pages settings.
type ListAllDomainsInput ¶
type ListAllDomainsInput struct{}
ListAllDomainsInput defines parameters for listing all Pages domains globally.
type ListAllDomainsOutput ¶
type ListAllDomainsOutput struct {
toolutil.HintableOutput
Domains []DomainOutput `json:"domains"`
}
ListAllDomainsOutput wraps a list of all Pages domains.
func ListAllDomains ¶
func ListAllDomains(ctx context.Context, client *gitlabclient.Client, _ ListAllDomainsInput) (ListAllDomainsOutput, error)
ListAllDomains returns all Pages domains across all projects.
type ListDomainsInput ¶
type ListDomainsInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
toolutil.PaginationInput
}
ListDomainsInput defines parameters for listing Pages domains for a project.
type ListDomainsOutput ¶
type ListDomainsOutput struct {
toolutil.HintableOutput
Domains []DomainOutput `json:"domains"`
Pagination toolutil.PaginationOutput `json:"pagination"`
}
ListDomainsOutput wraps a list of Pages domains with pagination.
func ListDomains ¶
func ListDomains(ctx context.Context, client *gitlabclient.Client, input ListDomainsInput) (ListDomainsOutput, error)
ListDomains returns Pages domains for a specific project.
type Output ¶
type Output struct {
toolutil.HintableOutput
URL string `json:"url"`
IsUniqueDomainEnabled bool `json:"is_unique_domain_enabled"`
ForceHTTPS bool `json:"force_https"`
Deployments []DeploymentOutput `json:"deployments,omitempty"`
PrimaryDomain string `json:"primary_domain"`
}
Output represents Pages settings for a project.
func GetPages ¶
func GetPages(ctx context.Context, client *gitlabclient.Client, input GetPagesInput) (Output, error)
GetPages retrieves Pages settings for a project.
func UpdatePages ¶
func UpdatePages(ctx context.Context, client *gitlabclient.Client, input UpdatePagesInput) (Output, error)
UpdatePages updates Pages settings for a project.
type UnpublishPagesInput ¶
type UnpublishPagesInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
}
UnpublishPagesInput defines parameters for unpublishing Pages.
type UpdateDomainInput ¶
type UpdateDomainInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
Domain string `json:"domain" jsonschema:"The Pages domain name to update,required"`
AutoSslEnabled *bool `json:"auto_ssl_enabled,omitempty" jsonschema:"Enable automatic SSL certificate provisioning"`
Certificate string `json:"certificate,omitempty" jsonschema:"PEM-encoded SSL certificate"`
Key string `json:"key,omitempty" jsonschema:"PEM-encoded private key for the certificate"`
}
UpdateDomainInput defines parameters for updating a Pages domain.
type UpdatePagesInput ¶
type UpdatePagesInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
PagesUniqueDomainEnabled *bool `json:"pages_unique_domain_enabled,omitempty" jsonschema:"Enable unique domain for Pages"`
PagesHTTPSOnly *bool `json:"pages_https_only,omitempty" jsonschema:"Enforce HTTPS for Pages"`
PagesPrimaryDomain string `json:"pages_primary_domain,omitempty" jsonschema:"Primary domain for Pages"`
}
UpdatePagesInput defines parameters for updating Pages settings.