Help us shape the future of Go! Take the 2026 Go Developer Survey

accessrequests

package
v2.7.5 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package accessrequests implements MCP tools for GitLab project and group access request operations.

The package wraps the GitLab Access requests API:

Index

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 and group access request actions.

func DenyGroup

func DenyGroup(ctx context.Context, client *gitlabclient.Client, input DenyGroupInput) error

DenyGroup denies a group access request.

func DenyGroupOutput

func DenyGroupOutput(ctx context.Context, client *gitlabclient.Client, input DenyGroupInput) (toolutil.DeleteOutput, error)

DenyGroupOutput denies a group access request and returns the legacy success message shape.

func DenyProject

func DenyProject(ctx context.Context, client *gitlabclient.Client, input DenyProjectInput) error

DenyProject denies a project access request.

func DenyProjectOutput

func DenyProjectOutput(ctx context.Context, client *gitlabclient.Client, input DenyProjectInput) (toolutil.DeleteOutput, error)

DenyProjectOutput denies a project access request and returns the legacy success message shape.

func FormatListMarkdown

func FormatListMarkdown(out ListOutput) string

FormatListMarkdown formats a list of access requests as markdown.

func FormatOutputMarkdown

func FormatOutputMarkdown(out Output) string

FormatOutputMarkdown formats a single access request as markdown.

Types

type ApproveGroupInput

type ApproveGroupInput struct {
	GroupID     toolutil.StringOrInt `json:"group_id" jsonschema:"Group ID or path,required"`
	UserID      int64                `json:"user_id" jsonschema:"User ID of the access requester,required"`
	AccessLevel int                  `` /* 198-byte string literal not displayed */
}

ApproveGroupInput identifies the group access request to approve and the optional granted role.

type ApproveProjectInput

type ApproveProjectInput struct {
	ProjectID   toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or path,required"`
	UserID      int64                `json:"user_id" jsonschema:"User ID of the access requester,required"`
	AccessLevel int                  `` /* 188-byte string literal not displayed */
}

ApproveProjectInput identifies the project access request to approve and the optional granted role.

type DenyGroupInput

type DenyGroupInput struct {
	GroupID toolutil.StringOrInt `json:"group_id" jsonschema:"Group ID or path,required"`
	UserID  int64                `json:"user_id" jsonschema:"User ID of the access requester,required"`
}

DenyGroupInput identifies the pending group access request to reject.

type DenyProjectInput

type DenyProjectInput struct {
	ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or path,required"`
	UserID    int64                `json:"user_id" jsonschema:"User ID of the access requester,required"`
}

DenyProjectInput identifies the pending project access request to reject.

type ListGroupInput

type ListGroupInput struct {
	GroupID toolutil.StringOrInt `json:"group_id" jsonschema:"Group ID or path,required"`
	OrderBy string               `json:"order_by,omitempty" jsonschema:"Column to order results by for keyset-paginated result sets (e.g. id)"`
	Sort    string               `json:"sort,omitempty" jsonschema:"Sort order: asc or desc"`
	toolutil.PaginationInput
	toolutil.KeysetPaginationInput
}

ListGroupInput selects a group and pagination window for pending access requests.

type ListOutput

type ListOutput struct {
	toolutil.HintableOutput
	AccessRequests []Output                  `json:"access_requests"`
	Pagination     toolutil.PaginationOutput `json:"pagination"`
}

ListOutput represents a paginated list of access requests.

func ListGroup

func ListGroup(ctx context.Context, client *gitlabclient.Client, input ListGroupInput) (ListOutput, error)

ListGroup lists access requests for a group.

func ListProject

func ListProject(ctx context.Context, client *gitlabclient.Client, input ListProjectInput) (ListOutput, error)

ListProject lists access requests for a project.

type ListProjectInput

type ListProjectInput struct {
	ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or path,required"`
	OrderBy   string               `json:"order_by,omitempty" jsonschema:"Column to order results by for keyset-paginated result sets (e.g. id)"`
	Sort      string               `json:"sort,omitempty" jsonschema:"Sort order: asc or desc"`
	toolutil.PaginationInput
	toolutil.KeysetPaginationInput
}

ListProjectInput selects a project and pagination window for pending access requests.

type Output

type Output struct {
	toolutil.HintableOutput
	ID          int64  `json:"id"`
	Username    string `json:"username"`
	Name        string `json:"name"`
	State       string `json:"state"`
	CreatedAt   string `json:"created_at,omitempty"`
	RequestedAt string `json:"requested_at,omitempty"`
	AccessLevel int    `json:"access_level"`
}

Output represents a single access request.

func ApproveGroup

func ApproveGroup(ctx context.Context, client *gitlabclient.Client, input ApproveGroupInput) (Output, error)

ApproveGroup approves a group access request.

func ApproveProject

func ApproveProject(ctx context.Context, client *gitlabclient.Client, input ApproveProjectInput) (Output, error)

ApproveProject approves a project access request.

func RequestGroup

func RequestGroup(ctx context.Context, client *gitlabclient.Client, input RequestGroupInput) (Output, error)

RequestGroup requests access to a group for the authenticated user.

func RequestProject

func RequestProject(ctx context.Context, client *gitlabclient.Client, input RequestProjectInput) (Output, error)

RequestProject requests access to a project for the authenticated user.

type RequestGroupInput

type RequestGroupInput struct {
	GroupID toolutil.StringOrInt `json:"group_id" jsonschema:"Group ID or path,required"`
}

RequestGroupInput identifies the group the authenticated user wants to join.

type RequestProjectInput

type RequestProjectInput struct {
	ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or path,required"`
}

RequestProjectInput identifies the project the authenticated user wants to join.

Jump to

Keyboard shortcuts

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