securefiles

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package securefiles implements MCP tools for GitLab CI/CD Secure Files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatListMarkdown

func FormatListMarkdown(out ListOutput) string

FormatListMarkdown formats secure files as markdown.

func FormatShowMarkdown

func FormatShowMarkdown(f SecureFileItem) string

FormatShowMarkdown formats a secure file as markdown.

func RegisterMeta

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

RegisterMeta registers the gitlab_secure_file meta-tool.

func RegisterTools

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

RegisterTools registers all secure file tools with the MCP server.

func Remove

func Remove(ctx context.Context, client *gitlabclient.Client, input RemoveInput) error

Remove deletes a secure file.

Types

type CreateInput

type CreateInput struct {
	ProjectID     toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
	Name          string               `json:"name" jsonschema:"Name for the secure file,required"`
	FilePath      string               `` /* 190-byte string literal not displayed */
	ContentBase64 string               `` /* 133-byte string literal not displayed */
}

CreateInput contains parameters for creating a secure file. Exactly one of FilePath or ContentBase64 must be provided.

type ListInput

type ListInput struct {
	ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
	Page      int64                `json:"page" jsonschema:"Page number for pagination"`
	PerPage   int64                `json:"per_page" jsonschema:"Number of items per page"`
}

ListInput contains parameters for listing secure files.

type ListOutput

type ListOutput struct {
	toolutil.HintableOutput
	Files      []SecureFileItem          `json:"files"`
	Pagination toolutil.PaginationOutput `json:"pagination"`
}

ListOutput contains a list of secure files.

func List

func List(ctx context.Context, client *gitlabclient.Client, input ListInput) (ListOutput, error)

List retrieves secure files for a project.

type RemoveInput

type RemoveInput struct {
	ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
	FileID    int64                `json:"file_id" jsonschema:"Secure file ID,required"`
}

RemoveInput contains parameters for removing a secure file.

type SecureFileItem

type SecureFileItem struct {
	toolutil.HintableOutput
	ID                int64  `json:"id"`
	Name              string `json:"name"`
	Checksum          string `json:"checksum"`
	ChecksumAlgorithm string `json:"checksum_algorithm"`
}

SecureFileItem represents a single secure file.

func Create

func Create(ctx context.Context, client *gitlabclient.Client, input CreateInput) (SecureFileItem, error)

Create uploads a new secure file.

func Show

func Show(ctx context.Context, client *gitlabclient.Client, input ShowInput) (SecureFileItem, error)

Show retrieves details for a specific secure file.

type ShowInput

type ShowInput struct {
	ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
	FileID    int64                `json:"file_id" jsonschema:"Secure file ID,required"`
}

ShowInput contains parameters for showing a secure file.

Jump to

Keyboard shortcuts

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