projectstoragemoves

package
v1.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package projectstoragemoves implements MCP tools for GitLab project repository storage move operations (admin only).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatListMarkdown

func FormatListMarkdown(o ListOutput) string

FormatListMarkdown formats a list of project storage moves as Markdown.

func FormatOutputMarkdown

func FormatOutputMarkdown(o Output) string

FormatOutputMarkdown formats a single project storage move as Markdown.

func FormatScheduleAllMarkdown

func FormatScheduleAllMarkdown(o ScheduleAllOutput) string

FormatScheduleAllMarkdown formats the schedule-all result as Markdown.

func RegisterTools

func RegisterTools(server *mcp.Server, client *gitlabclient.Client)

RegisterTools registers MCP tools for GitLab project repository storage move operations.

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"`
	toolutil.PaginationInput
}

ListForProjectInput holds parameters for listing storage moves for a specific project.

type ListInput

type ListInput struct {
	toolutil.PaginationInput
}

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 Get

func Get(ctx context.Context, client *gitlabclient.Client, in IDInput) (Output, error)

Get retrieves a single project repository storage move by ID.

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"`
	Name              string `json:"name"`
	PathWithNamespace string `json:"path_with_namespace"`
}

ProjectOutput represents the project associated with a storage move.

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

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL