Documentation
¶
Overview ¶
Package projectstoragemoves implements MCP tools for GitLab project repository storage move operations.
The package wraps the GitLab Project repository storage moves API:
Index ¶
- func ActionSpecs(client *gitlabclient.Client) []toolutil.ActionSpec
- func FormatListMarkdown(o ListOutput) string
- func FormatOutputMarkdown(o Output) string
- func FormatScheduleAllMarkdown(o ScheduleAllOutput) string
- type IDInput
- type ListForProjectInput
- type ListInput
- type ListOutput
- type Output
- type ProjectMoveInput
- type ProjectOutput
- type ScheduleAllInput
- type ScheduleAllOutput
- type ScheduleInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ActionSpecs ¶
func ActionSpecs(client *gitlabclient.Client) []toolutil.ActionSpec
ActionSpecs returns canonical specs for project repository storage move actions. Project repository storage moves are an admin-only, self-managed feature that migrates project repositories between Gitaly storage shards.
func FormatListMarkdown ¶
func FormatListMarkdown(o ListOutput) string
FormatListMarkdown formats a list of project storage moves as Markdown.
func FormatOutputMarkdown ¶
FormatOutputMarkdown formats a single project storage move as Markdown.
func FormatScheduleAllMarkdown ¶
func FormatScheduleAllMarkdown(o ScheduleAllOutput) string
FormatScheduleAllMarkdown formats the schedule-all result as Markdown.
Types ¶
type IDInput ¶
type IDInput struct {
ID int64 `json:"id" jsonschema:"Numeric ID of the storage move,required"`
}
IDInput holds parameters for getting a single storage move by ID.
type ListForProjectInput ¶
type ListForProjectInput struct {
ProjectID int64 `json:"project_id" jsonschema:"Numeric ID of the project,required"`
OrderBy string `` /* 132-byte string literal not displayed */
Sort string `` /* 135-byte string literal not displayed */
toolutil.PaginationInput
toolutil.KeysetPaginationInput
}
ListForProjectInput holds parameters for listing storage moves for a specific project.
type ListInput ¶
type ListInput struct {
OrderBy string `` /* 132-byte string literal not displayed */
Sort string `` /* 135-byte string literal not displayed */
toolutil.PaginationInput
toolutil.KeysetPaginationInput
}
ListInput holds pagination parameters for listing all project storage moves.
type ListOutput ¶
type ListOutput struct {
toolutil.HintableOutput
Moves []Output `json:"moves"`
Pagination toolutil.PaginationOutput `json:"pagination"`
}
ListOutput represents a paginated list of project storage moves.
func RetrieveAll ¶
func RetrieveAll(ctx context.Context, client *gitlabclient.Client, in ListInput) (ListOutput, error)
RetrieveAll retrieves all project repository storage moves.
func RetrieveForProject ¶
func RetrieveForProject(ctx context.Context, client *gitlabclient.Client, in ListForProjectInput) (ListOutput, error)
RetrieveForProject retrieves all storage moves for a specific project.
type Output ¶
type Output struct {
toolutil.HintableOutput
ID int64 `json:"id"`
CreatedAt time.Time `json:"created_at"`
State string `json:"state"`
SourceStorageName string `json:"source_storage_name"`
DestinationStorageName string `json:"destination_storage_name"`
Project *ProjectOutput `json:"project,omitempty"`
}
Output represents a single project repository storage move.
func GetForProject ¶
func GetForProject(ctx context.Context, client *gitlabclient.Client, in ProjectMoveInput) (Output, error)
GetForProject retrieves a single storage move for a specific project.
func Schedule ¶
func Schedule(ctx context.Context, client *gitlabclient.Client, in ScheduleInput) (Output, error)
Schedule schedules a repository storage move for a project.
type ProjectMoveInput ¶
type ProjectMoveInput struct {
ProjectID int64 `json:"project_id" jsonschema:"Numeric ID of the project,required"`
ID int64 `json:"id" jsonschema:"Numeric ID of the storage move,required"`
}
ProjectMoveInput holds parameters for getting a storage move for a specific project.
type ProjectOutput ¶
type ProjectOutput struct {
ID int64 `json:"id"`
Description string `json:"description,omitempty"`
Name string `json:"name"`
NameWithNamespace string `json:"name_with_namespace,omitempty"`
Path string `json:"path,omitempty"`
PathWithNamespace string `json:"path_with_namespace"`
CreatedAt *time.Time `json:"created_at,omitempty"`
}
ProjectOutput represents the project associated with a storage move. It mirrors gitlab.RepositoryProject 1:1.
type ScheduleAllInput ¶
type ScheduleAllInput struct {
SourceStorageName *string `json:"source_storage_name,omitempty" jsonschema:"Name of the source storage shard"`
DestinationStorageName *string `json:"destination_storage_name,omitempty" jsonschema:"Name of the destination storage shard"`
}
ScheduleAllInput holds parameters for scheduling storage moves for all projects.
type ScheduleAllOutput ¶
type ScheduleAllOutput struct {
toolutil.HintableOutput
Message string `json:"message"`
}
ScheduleAllOutput represents the result of scheduling all project storage moves.
func ScheduleAll ¶
func ScheduleAll(ctx context.Context, client *gitlabclient.Client, in ScheduleAllInput) (ScheduleAllOutput, error)
ScheduleAll schedules storage moves for all projects on a storage shard.
type ScheduleInput ¶
type ScheduleInput struct {
ProjectID int64 `json:"project_id" jsonschema:"Numeric ID of the project,required"`
DestinationStorageName *string `json:"destination_storage_name,omitempty" jsonschema:"Name of the destination storage shard"`
}
ScheduleInput holds parameters for scheduling a storage move for a project.