Documentation
¶
Index ¶
- Constants
- Variables
- func CreateGroup(ctx context.Context, client *api.Client, input CreateGroupInput) (*models.Group, error)
- func CreateIssue(ctx context.Context, client *api.Client, input CreateIssueInput) (*models.Issue, error)
- func CreateIssueRelation(ctx context.Context, client *api.Client, input CreateIssueRelationInput) (*models.IssueRelation, error)
- func CreateMembership(ctx context.Context, client *api.Client, input CreateMembershipInput) (*models.Membership, error)
- func CreateProject(ctx context.Context, client *api.Client, input CreateProjectInput) (*models.Project, error)
- func CreateTimeEntry(ctx context.Context, client *api.Client, input CreateTimeEntryInput) (*models.TimeEntry, error)
- func CreateUser(ctx context.Context, client *api.Client, input CreateUserInput) (*models.User, error)
- func CreateVersion(ctx context.Context, client *api.Client, input CreateVersionInput) (*models.Version, error)
- func CreateWikiPage(ctx context.Context, client *api.Client, input CreateWikiPageInput) (*models.WikiPage, error)
- func GetCurrentUser(ctx context.Context, client *api.Client, input GetCurrentUserInput) (*models.User, error)
- func GetCurrentUserForResource(ctx context.Context, client *api.Client) (*models.User, error)
- func GetCustomField(ctx context.Context, client *api.Client, input GetCustomFieldInput) (*models.CustomField, error)
- func GetGroup(ctx context.Context, client *api.Client, input GetGroupInput) (*models.Group, error)
- func GetIssue(ctx context.Context, client *api.Client, input GetIssueInput) (*models.Issue, error)
- func GetIssueForResource(ctx context.Context, client *api.Client, id int) (*models.Issue, error)
- func GetIssueRelation(ctx context.Context, client *api.Client, input GetIssueRelationInput) (*models.IssueRelation, error)
- func GetMembership(ctx context.Context, client *api.Client, input GetMembershipInput) (*models.Membership, error)
- func GetMyAccount(ctx context.Context, client *api.Client, _ GetMyAccountInput) (*models.User, error)
- func GetProject(ctx context.Context, client *api.Client, input GetProjectInput) (*models.Project, error)
- func GetProjectForResource(ctx context.Context, client *api.Client, identifier string) (*models.Project, error)
- func GetRole(ctx context.Context, client *api.Client, input GetRoleInput) (*models.Role, error)
- func GetTimeEntry(ctx context.Context, client *api.Client, input GetTimeEntryInput) (*models.TimeEntry, error)
- func GetTimeEntryForResource(ctx context.Context, client *api.Client, id int) (*models.TimeEntry, error)
- func GetTracker(ctx context.Context, client *api.Client, input GetTrackerInput) (*models.Tracker, error)
- func GetUser(ctx context.Context, client *api.Client, input GetUserInput) (*models.User, error)
- func GetUserForResource(ctx context.Context, client *api.Client, id int) (*models.User, error)
- func GetVersion(ctx context.Context, client *api.Client, input GetVersionInput) (*models.Version, error)
- func GetVersionForResource(ctx context.Context, client *api.Client, id int) (*models.Version, error)
- func GetWikiPage(ctx context.Context, client *api.Client, input GetWikiPageInput) (*models.WikiPage, error)
- func GetWikiPageForResource(ctx context.Context, client *api.Client, projectID, page string) (*models.WikiPage, error)
- func ListLimit(requested int) int
- type AddIssueCommentInput
- type AddIssueWatcherInput
- type ArchiveProjectInput
- type AssignIssueInput
- type CategoriesListResult
- type CloseIssueInput
- type CreateGroupInput
- type CreateIssueInput
- type CreateIssueRelationInput
- type CreateMembershipInput
- type CreateProjectInput
- type CreateTimeEntryInput
- type CreateUserInput
- type CreateVersionInput
- type CreateWikiPageInput
- type CustomFieldsListResult
- type DeleteGroupInput
- type DeleteIssueInput
- type DeleteIssueRelationInput
- type DeleteMembershipInput
- type DeleteProjectInput
- type DeleteTimeEntryInput
- type DeleteUserInput
- type DeleteVersionInput
- type DeleteWikiPageInput
- type GetCurrentUserInput
- type GetCustomFieldInput
- type GetGroupInput
- type GetIssueInput
- type GetIssueRelationInput
- type GetMembershipInput
- type GetMyAccountInput
- type GetProjectInput
- type GetRoleInput
- type GetTimeEntryInput
- type GetTrackerInput
- type GetUserInput
- type GetVersionInput
- type GetWikiPageInput
- type GroupUserInput
- type GroupsListResult
- type IssueRelationsResult
- type IssueWatchersResult
- type IssuesListResult
- type ListCategoriesInput
- type ListGroupsInput
- type ListIssueRelationsInput
- type ListIssueWatchersInput
- type ListIssuesInput
- type ListMembershipsInput
- type ListProjectFilesInput
- type ListProjectMembersInput
- type ListProjectsInput
- type ListQueriesInput
- type ListTimeEntriesInput
- type ListUsersInput
- type ListVersionsInput
- type ListWikiPagesInput
- type MembershipsListResult
- type MessageResult
- func AddGroupUser(ctx context.Context, client *api.Client, input GroupUserInput) (MessageResult, error)
- func AddIssueComment(ctx context.Context, client *api.Client, input AddIssueCommentInput) (MessageResult, error)
- func AddIssueWatcher(ctx context.Context, client *api.Client, input AddIssueWatcherInput) (MessageResult, error)
- func ArchiveProject(ctx context.Context, client *api.Client, input ArchiveProjectInput) (MessageResult, error)
- func AssignIssue(ctx context.Context, client *api.Client, input AssignIssueInput) (MessageResult, error)
- func CloseIssue(ctx context.Context, client *api.Client, input CloseIssueInput) (MessageResult, error)
- func DeleteGroup(ctx context.Context, client *api.Client, input DeleteGroupInput) (MessageResult, error)
- func DeleteIssue(ctx context.Context, client *api.Client, input DeleteIssueInput) (MessageResult, error)
- func DeleteIssueRelation(ctx context.Context, client *api.Client, input DeleteIssueRelationInput) (MessageResult, error)
- func DeleteMembership(ctx context.Context, client *api.Client, input DeleteMembershipInput) (MessageResult, error)
- func DeleteProject(ctx context.Context, client *api.Client, input DeleteProjectInput) (MessageResult, error)
- func DeleteTimeEntry(ctx context.Context, client *api.Client, input DeleteTimeEntryInput) (MessageResult, error)
- func DeleteUser(ctx context.Context, client *api.Client, input DeleteUserInput) (MessageResult, error)
- func DeleteVersion(ctx context.Context, client *api.Client, input DeleteVersionInput) (MessageResult, error)
- func DeleteWikiPage(ctx context.Context, client *api.Client, input DeleteWikiPageInput) (MessageResult, error)
- func RemoveGroupUser(ctx context.Context, client *api.Client, input GroupUserInput) (MessageResult, error)
- func RemoveIssueWatcher(ctx context.Context, client *api.Client, input RemoveIssueWatcherInput) (MessageResult, error)
- func ReopenIssue(ctx context.Context, client *api.Client, input ReopenIssueInput) (MessageResult, error)
- func UnarchiveProject(ctx context.Context, client *api.Client, input UnarchiveProjectInput) (MessageResult, error)
- func UpdateGroup(ctx context.Context, client *api.Client, input UpdateGroupInput) (MessageResult, error)
- func UpdateIssue(ctx context.Context, client *api.Client, input UpdateIssueInput) (MessageResult, error)
- func UpdateMembership(ctx context.Context, client *api.Client, input UpdateMembershipInput) (MessageResult, error)
- func UpdateMyAccount(ctx context.Context, client *api.Client, input UpdateMyAccountInput) (MessageResult, error)
- func UpdateProject(ctx context.Context, client *api.Client, input UpdateProjectInput) (MessageResult, error)
- func UpdateTimeEntry(ctx context.Context, client *api.Client, input UpdateTimeEntryInput) (MessageResult, error)
- func UpdateUser(ctx context.Context, client *api.Client, input UpdateUserInput) (MessageResult, error)
- func UpdateVersion(ctx context.Context, client *api.Client, input UpdateVersionInput) (MessageResult, error)
- func UpdateWikiPage(ctx context.Context, client *api.Client, input UpdateWikiPageInput) (MessageResult, error)
- func UploadProjectFile(ctx context.Context, client *api.Client, input UploadProjectFileInput) (MessageResult, error)
- type ProjectFilesListResult
- type ProjectMembersListResult
- type ProjectsListResult
- type QueriesListResult
- type RemoveIssueWatcherInput
- type ReopenIssueInput
- type RolesListResult
- type SearchInput
- type SearchResultsListResult
- type StatusesListResult
- type SummaryTimeEntriesInput
- type TimeEntriesListResult
- type TimeSummaryResult
- type TimeSummaryRow
- type TrackersListResult
- type UnarchiveProjectInput
- type UpdateGroupInput
- type UpdateIssueInput
- type UpdateMembershipInput
- type UpdateMyAccountInput
- type UpdateProjectInput
- type UpdateTimeEntryInput
- type UpdateUserInput
- type UpdateVersionInput
- type UpdateWikiPageInput
- type UploadProjectFileInput
- type UsersListResult
- type VersionsListResult
- type WikiPagesListResult
Constants ¶
const DefaultListLimit = 50
DefaultListLimit caps list-style operations when the caller omits a limit so MCP clients do not accidentally pull large result sets into context.
const NoLimit = -1
NoLimit is the sentinel callers pass when they want to bypass the safety cap and fetch every result. The CLI translates `--limit 0` into this value before invoking ops; MCP callers should never use it.
Variables ¶
var IssueRelationTypes = []string{
"relates",
"duplicates",
"duplicated",
"blocks",
"blocked",
"precedes",
"follows",
"copied_to",
"copied_from",
}
IssueRelationTypes are the valid relation_type values accepted by Redmine. Reference: https://www.redmine.org/projects/redmine/wiki/Rest_IssueRelations
var IssueRelationTypesSupportingDelay = []string{"precedes", "follows"}
IssueRelationTypesSupportingDelay lists relation types that accept a delay value. Redmine rejects delay on any other type.
Functions ¶
func CreateGroup ¶
func CreateIssue ¶
func CreateIssueRelation ¶ added in v2.6.0
func CreateIssueRelation(ctx context.Context, client *api.Client, input CreateIssueRelationInput) (*models.IssueRelation, error)
func CreateMembership ¶
func CreateMembership(ctx context.Context, client *api.Client, input CreateMembershipInput) (*models.Membership, error)
func CreateProject ¶
func CreateTimeEntry ¶
func CreateUser ¶
func CreateVersion ¶
func CreateWikiPage ¶
func GetCurrentUser ¶
func GetCustomField ¶ added in v2.6.0
func GetCustomField(ctx context.Context, client *api.Client, input GetCustomFieldInput) (*models.CustomField, error)
func GetIssueForResource ¶
func GetIssueRelation ¶ added in v2.6.0
func GetIssueRelation(ctx context.Context, client *api.Client, input GetIssueRelationInput) (*models.IssueRelation, error)
func GetMembership ¶
func GetMembership(ctx context.Context, client *api.Client, input GetMembershipInput) (*models.Membership, error)
func GetMyAccount ¶ added in v2.6.0
func GetProject ¶
func GetProjectForResource ¶
func GetTimeEntry ¶
func GetTimeEntryForResource ¶
func GetTracker ¶ added in v2.6.0
func GetUserForResource ¶
func GetVersion ¶
func GetVersionForResource ¶
func GetWikiPage ¶
func GetWikiPageForResource ¶
func ListLimit ¶
ListLimit returns the effective limit for a list operation.
The exact NoLimit sentinel is translated to the API client's "0 = unlimited" convention. Zero applies the MCP-safety default. Other negatives also clamp to the safety default so a stray negative value cannot quietly bypass the cap (the MCP wrapper additionally clamps before reaching this function). Positive values pass through unchanged.
Types ¶
type AddIssueCommentInput ¶
type AddIssueWatcherInput ¶ added in v2.6.0
type ArchiveProjectInput ¶ added in v2.6.0
type ArchiveProjectInput struct {
Identifier string `json:"identifier" jsonschema:"Project identifier or numeric ID to archive. Requires Redmine 5.0+."`
}
type AssignIssueInput ¶
type CategoriesListResult ¶
type CategoriesListResult struct {
Categories []models.IssueCategory `json:"issue_categories"`
Count int `json:"count"`
TotalCount int `json:"total_count"`
}
func ListCategories ¶
func ListCategories(ctx context.Context, client *api.Client, input ListCategoriesInput) (CategoriesListResult, error)
type CloseIssueInput ¶
type CreateGroupInput ¶
type CreateIssueInput ¶
type CreateIssueInput struct {
ProjectID int `json:"project_id" jsonschema:"Numeric project ID to create the issue in."`
Subject string `json:"subject" jsonschema:"Issue subject (title)."`
Description string `json:"description,omitempty" jsonschema:"Issue body (Textile or Markdown depending on the Redmine configuration)."`
TrackerID int `json:"tracker_id,omitempty" jsonschema:"Tracker ID (Bug, Feature, ...). Use list_trackers to discover."`
StatusID int `json:"status_id,omitempty" jsonschema:"Initial status ID. Use list_statuses to discover."`
PriorityID int `json:"priority_id,omitempty" jsonschema:"Priority ID."`
AssignedToID int `json:"assigned_to_id,omitempty" jsonschema:"User ID of the assignee."`
CategoryID int `json:"category_id,omitempty" jsonschema:"Issue category ID. Use list_categories to discover."`
FixedVersionID int `json:"fixed_version_id,omitempty" jsonschema:"Fixed version (milestone) ID."`
ParentIssueID int `json:"parent_issue_id,omitempty" jsonschema:"Parent issue ID for sub-tasks."`
StartDate string `json:"start_date,omitempty" jsonschema:"Start date (YYYY-MM-DD)."`
DueDate string `json:"due_date,omitempty" jsonschema:"Due date (YYYY-MM-DD)."`
EstimatedHours float64 `json:"estimated_hours,omitempty" jsonschema:"Estimated effort in hours."`
IsPrivate *bool `json:"is_private,omitempty" jsonschema:"Mark the issue as private."`
WatcherUserIDs []int `json:"watcher_user_ids,omitempty" jsonschema:"Initial watcher user IDs (numeric)."`
CustomFieldValues map[string]string `` /* 149-byte string literal not displayed */
Uploads []models.Upload `json:"-"`
}
type CreateIssueRelationInput ¶ added in v2.6.0
type CreateIssueRelationInput struct {
IssueID int `json:"issue_id" jsonschema:"Source issue ID."`
IssueToID int `json:"issue_to_id" jsonschema:"Target issue ID."`
RelationType string `` /* 174-byte string literal not displayed */
Delay *int `json:"delay,omitempty" jsonschema:"Number of days delay. Only meaningful for relation types 'precedes' and 'follows'."`
}
type CreateMembershipInput ¶
type CreateMembershipInput struct {
ProjectID string `json:"project_id" jsonschema:"Project identifier or numeric ID."`
UserID int `json:"user_id" jsonschema:"Numeric user ID to add as a member."`
RoleIDs []int `json:"role_ids" jsonschema:"One or more role IDs to grant. Use list_roles to discover valid values."`
}
type CreateProjectInput ¶
type CreateProjectInput struct {
Name string `json:"name" jsonschema:"Human-readable project name."`
Identifier string `json:"identifier" jsonschema:"URL-safe project identifier (slug)."`
Description string `json:"description,omitempty" jsonschema:"Project description."`
Homepage string `json:"homepage,omitempty" jsonschema:"Project homepage URL."`
IsPublic *bool `json:"is_public,omitempty" jsonschema:"Mark the project as public."`
ParentID int `json:"parent_id,omitempty" jsonschema:"Parent project numeric ID."`
InheritMembers bool `json:"inherit_members,omitempty" jsonschema:"Inherit members from the parent project."`
DefaultAssignedToID int `json:"default_assigned_to_id,omitempty" jsonschema:"Numeric user ID set as the default assignee for new issues."`
DefaultVersionID int `` /* 187-byte string literal not displayed */
TrackerIDs []int `` /* 131-byte string literal not displayed */
EnabledModuleNames []string `` /* 228-byte string literal not displayed */
IssueCustomFieldIDs []int `json:"issue_custom_field_ids,omitempty" jsonschema:"Numeric IDs of issue-level custom fields enabled for this project."`
CustomFieldValues map[string]string `` /* 127-byte string literal not displayed */
}
type CreateTimeEntryInput ¶
type CreateTimeEntryInput struct {
IssueID int `json:"issue_id,omitempty" jsonschema:"Issue to log time against. Either issue_id or project_id is required."`
ProjectID string `json:"project_id,omitempty" jsonschema:"Project identifier or numeric ID. Either issue_id or project_id is required."`
Hours float64 `json:"hours" jsonschema:"Hours worked (decimal, e.g. 1.5)."`
ActivityID int `json:"activity_id,omitempty" jsonschema:"Activity enumeration ID."`
SpentOn string `json:"spent_on,omitempty" jsonschema:"Date the work was done (YYYY-MM-DD). Defaults to today."`
Comments string `json:"comments,omitempty" jsonschema:"Free-text comment."`
UserID int `` /* 156-byte string literal not displayed */
}
type CreateUserInput ¶
type CreateUserInput struct {
Login string `json:"login" jsonschema:"Unique login name."`
Password string `json:"password,omitempty" jsonschema:"Initial password. Omit when generate_password is true."`
FirstName string `json:"firstname" jsonschema:"Given name."`
LastName string `json:"lastname" jsonschema:"Family name."`
Mail string `json:"mail" jsonschema:"Email address."`
Admin bool `json:"admin,omitempty" jsonschema:"Grant admin privileges."`
MailNotification *string `` /* 145-byte string literal not displayed */
MustChangePasswd *bool `json:"must_change_passwd,omitempty" jsonschema:"Force the user to change their password on next login."`
GeneratePassword *bool `json:"generate_password,omitempty" jsonschema:"Server generates a random password."`
AuthSourceID *int `json:"auth_source_id,omitempty" jsonschema:"Numeric authentication source ID for external auth."`
SendInformation bool `json:"send_information,omitempty" jsonschema:"Email the account info to the new user."`
}
type CreateVersionInput ¶
type CreateVersionInput struct {
ProjectID string `json:"project_id" jsonschema:"Project identifier or numeric ID."`
Name string `json:"name" jsonschema:"Version name."`
Status string `json:"status,omitempty" jsonschema:"Version status: open, locked, or closed."`
Sharing string `json:"sharing,omitempty" jsonschema:"Version sharing: none, descendants, hierarchy, tree, or system."`
DueDate string `json:"due_date,omitempty" jsonschema:"Due date (YYYY-MM-DD)."`
Description string `json:"description,omitempty" jsonschema:"Version description."`
WikiPageTitle string `json:"wiki_page_title,omitempty" jsonschema:"Associated wiki page title."`
}
type CreateWikiPageInput ¶
type CreateWikiPageInput struct {
ProjectID string `json:"project_id" jsonschema:"Project identifier or numeric ID."`
Page string `json:"page" jsonschema:"Wiki page title (slug) to create or overwrite."`
Text string `json:"text" jsonschema:"Page body (Textile or Markdown depending on the Redmine configuration)."`
Title string `json:"title,omitempty" jsonschema:"Optional display title; may differ from the slug."`
Comments string `json:"comments,omitempty" jsonschema:"Edit comment."`
Uploads []models.Upload `json:"-"`
}
type CustomFieldsListResult ¶ added in v2.6.0
type CustomFieldsListResult struct {
CustomFields []models.CustomField `json:"custom_fields"`
Count int `json:"count"`
}
func ListCustomFields ¶ added in v2.6.0
type DeleteGroupInput ¶
type DeleteGroupInput struct {
ID int `json:"id" jsonschema:"Group ID to delete. Destructive."`
}
type DeleteIssueInput ¶
type DeleteIssueInput struct {
ID int `json:"id" jsonschema:"Issue ID to delete."`
}
type DeleteIssueRelationInput ¶ added in v2.6.0
type DeleteIssueRelationInput struct {
ID int `json:"id" jsonschema:"Relation ID to delete."`
}
type DeleteMembershipInput ¶
type DeleteMembershipInput struct {
ID int `json:"id" jsonschema:"Numeric membership ID to delete. Destructive."`
}
type DeleteProjectInput ¶
type DeleteProjectInput struct {
Identifier string `json:"identifier" jsonschema:"Project identifier or numeric ID to delete. Destructive."`
}
type DeleteTimeEntryInput ¶
type DeleteTimeEntryInput struct {
ID int `json:"id" jsonschema:"Time entry numeric ID."`
}
type DeleteUserInput ¶
type DeleteUserInput struct {
ID int `json:"id" jsonschema:"Numeric user ID to delete. Destructive."`
}
type DeleteVersionInput ¶
type DeleteVersionInput struct {
ID int `json:"id" jsonschema:"Numeric version (milestone) ID to delete. Destructive."`
}
type DeleteWikiPageInput ¶
type GetCurrentUserInput ¶ added in v2.6.0
type GetCurrentUserInput struct {
Includes []string `json:"includes,omitempty" jsonschema:"Optional includes: 'memberships', 'groups' (Redmine 2.1+)."`
}
type GetCustomFieldInput ¶ added in v2.6.0
type GetCustomFieldInput struct {
ID int `json:"id" jsonschema:"Numeric custom field definition ID."`
}
type GetGroupInput ¶
type GetIssueInput ¶
type GetIssueRelationInput ¶ added in v2.6.0
type GetIssueRelationInput struct {
ID int `json:"id" jsonschema:"Relation ID."`
}
type GetMembershipInput ¶
type GetMembershipInput struct {
ID int `json:"id" jsonschema:"Numeric membership ID."`
}
type GetMyAccountInput ¶ added in v2.6.0
type GetMyAccountInput struct{}
type GetProjectInput ¶
type GetRoleInput ¶ added in v2.6.0
type GetRoleInput struct {
ID int `json:"id" jsonschema:"Numeric role ID."`
}
type GetTimeEntryInput ¶
type GetTimeEntryInput struct {
ID int `json:"id" jsonschema:"Time entry numeric ID."`
}
type GetTrackerInput ¶ added in v2.6.0
type GetTrackerInput struct {
ID int `json:"id" jsonschema:"Numeric tracker ID."`
}
type GetUserInput ¶
type GetVersionInput ¶
type GetVersionInput struct {
ID int `json:"id" jsonschema:"Numeric version (milestone) ID."`
}
type GetWikiPageInput ¶
type GroupUserInput ¶
type GroupsListResult ¶
type GroupsListResult struct {
Groups []models.Group `json:"groups"`
Count int `json:"count"`
TotalCount int `json:"total_count"`
}
func ListGroups ¶
func ListGroups(ctx context.Context, client *api.Client, input ListGroupsInput) (GroupsListResult, error)
type IssueRelationsResult ¶ added in v2.6.0
type IssueRelationsResult struct {
Relations []models.IssueRelation `json:"relations"`
Count int `json:"count"`
}
func ListIssueRelations ¶ added in v2.6.0
func ListIssueRelations(ctx context.Context, client *api.Client, input ListIssueRelationsInput) (IssueRelationsResult, error)
type IssueWatchersResult ¶ added in v2.6.0
type IssueWatchersResult struct {
Watchers []models.IDName `json:"watchers"`
Count int `json:"count"`
}
func ListIssueWatchers ¶ added in v2.6.0
func ListIssueWatchers(ctx context.Context, client *api.Client, input ListIssueWatchersInput) (IssueWatchersResult, error)
type IssuesListResult ¶
type IssuesListResult struct {
Issues []models.Issue `json:"issues"`
Count int `json:"count"`
TotalCount int `json:"total_count"`
}
func ListIssues ¶
func ListIssues(ctx context.Context, client *api.Client, input ListIssuesInput) (IssuesListResult, error)
type ListCategoriesInput ¶
type ListCategoriesInput struct {
ProjectID string `json:"project_id" jsonschema:"Project identifier or numeric ID."`
}
type ListGroupsInput ¶
type ListIssueRelationsInput ¶ added in v2.6.0
type ListIssueRelationsInput struct {
IssueID int `json:"issue_id" jsonschema:"Issue ID to list relations for."`
}
type ListIssueWatchersInput ¶ added in v2.6.0
type ListIssueWatchersInput struct {
ID int `json:"id" jsonschema:"Issue ID."`
}
type ListIssuesInput ¶
type ListIssuesInput struct {
ProjectID string `json:"project_id,omitempty" jsonschema:"Project identifier or numeric ID to filter by."`
SubprojectID string `` /* 142-byte string literal not displayed */
TrackerID int `json:"tracker_id,omitempty" jsonschema:"Tracker ID (use list_trackers to discover)."`
StatusID string `json:"status_id,omitempty" jsonschema:"Status filter: 'open', 'closed', '*', or a numeric status ID."`
AssignedToID string `json:"assigned_to_id,omitempty" jsonschema:"Assignee: numeric user ID or 'me'."`
AuthorID string `json:"author_id,omitempty" jsonschema:"Author: numeric user ID or 'me'."`
PriorityID string `json:"priority_id,omitempty" jsonschema:"Priority: numeric ID (use list_priorities to discover)."`
CategoryID int `json:"category_id,omitempty" jsonschema:"Issue category ID (use list_categories to discover)."`
FixedVersionID int `json:"fixed_version_id,omitempty" jsonschema:"Fixed version (milestone) ID."`
ParentID int `json:"parent_id,omitempty" jsonschema:"Restrict to children of this issue ID."`
IsPrivate *bool `json:"is_private,omitempty" jsonschema:"Filter by privacy: true returns only private issues, false returns only public ones."`
QueryID int `` /* 140-byte string literal not displayed */
Sort string `json:"sort,omitempty" jsonschema:"Sort expression, e.g. 'updated_on:desc'."`
Includes []string `json:"includes,omitempty" jsonschema:"Extra fields to include: attachments, relations, children, watchers."`
ExtraParams map[string]string `` /* 178-byte string literal not displayed */
Limit int `json:"limit,omitempty" jsonschema:"Max results to return. Defaults to 50 when omitted."`
Offset int `json:"offset,omitempty" jsonschema:"Number of leading results to skip (pagination)."`
}
type ListMembershipsInput ¶
type ListMembershipsInput struct {
ProjectID string `json:"project_id" jsonschema:"Project identifier or numeric ID."`
Limit int `json:"limit,omitempty" jsonschema:"Max results to return. Defaults to 50 when omitted."`
Offset int `json:"offset,omitempty" jsonschema:"Number of leading results to skip."`
}
type ListProjectFilesInput ¶ added in v2.6.0
type ListProjectFilesInput struct {
ProjectID string `json:"project_id" jsonschema:"Project identifier or numeric ID."`
Limit int `json:"limit,omitempty" jsonschema:"Max results to return. Defaults to 50 when omitted."`
Offset int `json:"offset,omitempty" jsonschema:"Number of leading results to skip."`
}
type ListProjectMembersInput ¶
type ListProjectMembersInput struct {
Identifier string `json:"identifier" jsonschema:"Project identifier or numeric ID."`
Limit int `json:"limit,omitempty" jsonschema:"Max results to return. Defaults to 50 when omitted."`
Offset int `json:"offset,omitempty" jsonschema:"Number of leading results to skip."`
}
type ListProjectsInput ¶
type ListQueriesInput ¶ added in v2.6.0
type ListTimeEntriesInput ¶
type ListTimeEntriesInput struct {
ProjectID string `json:"project_id,omitempty" jsonschema:"Project identifier or numeric ID to filter by."`
UserID string `json:"user_id,omitempty" jsonschema:"User numeric ID or 'me'."`
IssueID int `json:"issue_id,omitempty" jsonschema:"Issue numeric ID to filter by."`
ActivityID int `json:"activity_id,omitempty" jsonschema:"Activity enumeration ID."`
From string `json:"from,omitempty" jsonschema:"Inclusive start date (YYYY-MM-DD)."`
To string `json:"to,omitempty" jsonschema:"Inclusive end date (YYYY-MM-DD)."`
Limit int `json:"limit,omitempty" jsonschema:"Max results to return. Defaults to 50 when omitted."`
Offset int `json:"offset,omitempty" jsonschema:"Number of leading results to skip."`
}
type ListUsersInput ¶
type ListUsersInput struct {
Status string `json:"status,omitempty" jsonschema:"Filter by status: 'active', 'registered', 'locked', or a numeric code."`
Name string `json:"name,omitempty" jsonschema:"Filter by name substring."`
GroupID int `json:"group_id,omitempty" jsonschema:"Filter users that belong to the given group ID."`
Limit int `json:"limit,omitempty" jsonschema:"Max results to return. Defaults to 50 when omitted."`
Offset int `json:"offset,omitempty" jsonschema:"Number of leading results to skip."`
}
type ListVersionsInput ¶
type ListVersionsInput struct {
ProjectID string `json:"project_id" jsonschema:"Project identifier or numeric ID."`
Limit int `json:"limit,omitempty" jsonschema:"Max results to return. Defaults to 50 when omitted."`
Offset int `json:"offset,omitempty" jsonschema:"Number of leading results to skip."`
}
type ListWikiPagesInput ¶
type ListWikiPagesInput struct {
ProjectID string `json:"project_id" jsonschema:"Project identifier or numeric ID."`
Limit int `json:"limit,omitempty" jsonschema:"Max results to return. Defaults to 50 when omitted."`
Offset int `json:"offset,omitempty" jsonschema:"Number of leading results to skip."`
}
type MembershipsListResult ¶
type MembershipsListResult struct {
Memberships []models.Membership `json:"memberships"`
Count int `json:"count"`
TotalCount int `json:"total_count"`
}
func ListMemberships ¶
func ListMemberships(ctx context.Context, client *api.Client, input ListMembershipsInput) (MembershipsListResult, error)
type MessageResult ¶
type MessageResult struct {
Message string `json:"message"`
}
MessageResult is a simple acknowledgement payload for mutating operations.
func AddGroupUser ¶
func AddGroupUser(ctx context.Context, client *api.Client, input GroupUserInput) (MessageResult, error)
func AddIssueComment ¶
func AddIssueComment(ctx context.Context, client *api.Client, input AddIssueCommentInput) (MessageResult, error)
func AddIssueWatcher ¶ added in v2.6.0
func AddIssueWatcher(ctx context.Context, client *api.Client, input AddIssueWatcherInput) (MessageResult, error)
func ArchiveProject ¶ added in v2.6.0
func ArchiveProject(ctx context.Context, client *api.Client, input ArchiveProjectInput) (MessageResult, error)
func AssignIssue ¶
func AssignIssue(ctx context.Context, client *api.Client, input AssignIssueInput) (MessageResult, error)
func CloseIssue ¶
func CloseIssue(ctx context.Context, client *api.Client, input CloseIssueInput) (MessageResult, error)
func DeleteGroup ¶
func DeleteGroup(ctx context.Context, client *api.Client, input DeleteGroupInput) (MessageResult, error)
func DeleteIssue ¶
func DeleteIssue(ctx context.Context, client *api.Client, input DeleteIssueInput) (MessageResult, error)
func DeleteIssueRelation ¶ added in v2.6.0
func DeleteIssueRelation(ctx context.Context, client *api.Client, input DeleteIssueRelationInput) (MessageResult, error)
func DeleteMembership ¶
func DeleteMembership(ctx context.Context, client *api.Client, input DeleteMembershipInput) (MessageResult, error)
func DeleteProject ¶
func DeleteProject(ctx context.Context, client *api.Client, input DeleteProjectInput) (MessageResult, error)
func DeleteTimeEntry ¶
func DeleteTimeEntry(ctx context.Context, client *api.Client, input DeleteTimeEntryInput) (MessageResult, error)
func DeleteUser ¶
func DeleteUser(ctx context.Context, client *api.Client, input DeleteUserInput) (MessageResult, error)
func DeleteVersion ¶
func DeleteVersion(ctx context.Context, client *api.Client, input DeleteVersionInput) (MessageResult, error)
func DeleteWikiPage ¶
func DeleteWikiPage(ctx context.Context, client *api.Client, input DeleteWikiPageInput) (MessageResult, error)
func RemoveGroupUser ¶
func RemoveGroupUser(ctx context.Context, client *api.Client, input GroupUserInput) (MessageResult, error)
func RemoveIssueWatcher ¶ added in v2.6.0
func RemoveIssueWatcher(ctx context.Context, client *api.Client, input RemoveIssueWatcherInput) (MessageResult, error)
func ReopenIssue ¶
func ReopenIssue(ctx context.Context, client *api.Client, input ReopenIssueInput) (MessageResult, error)
func UnarchiveProject ¶ added in v2.6.0
func UnarchiveProject(ctx context.Context, client *api.Client, input UnarchiveProjectInput) (MessageResult, error)
func UpdateGroup ¶
func UpdateGroup(ctx context.Context, client *api.Client, input UpdateGroupInput) (MessageResult, error)
func UpdateIssue ¶
func UpdateIssue(ctx context.Context, client *api.Client, input UpdateIssueInput) (MessageResult, error)
func UpdateMembership ¶
func UpdateMembership(ctx context.Context, client *api.Client, input UpdateMembershipInput) (MessageResult, error)
func UpdateMyAccount ¶ added in v2.6.0
func UpdateMyAccount(ctx context.Context, client *api.Client, input UpdateMyAccountInput) (MessageResult, error)
func UpdateProject ¶
func UpdateProject(ctx context.Context, client *api.Client, input UpdateProjectInput) (MessageResult, error)
func UpdateTimeEntry ¶
func UpdateTimeEntry(ctx context.Context, client *api.Client, input UpdateTimeEntryInput) (MessageResult, error)
func UpdateUser ¶
func UpdateUser(ctx context.Context, client *api.Client, input UpdateUserInput) (MessageResult, error)
func UpdateVersion ¶
func UpdateVersion(ctx context.Context, client *api.Client, input UpdateVersionInput) (MessageResult, error)
func UpdateWikiPage ¶
func UpdateWikiPage(ctx context.Context, client *api.Client, input UpdateWikiPageInput) (MessageResult, error)
func UploadProjectFile ¶ added in v2.6.0
func UploadProjectFile(ctx context.Context, client *api.Client, input UploadProjectFileInput) (MessageResult, error)
UploadProjectFile attaches a previously uploaded file (via the /uploads.json flow) to a project. The Redmine API returns no body on success; callers can re-list the project's files to surface the resulting record.
Deliberately not exposed as an MCP tool: the function requires an upload token obtained by streaming bytes to /uploads.json, and MCP has no tool that produces such a token, so exposing it alone would be unusable.
func (MessageResult) MCPMessage ¶
func (m MessageResult) MCPMessage() string
MCPMessage exposes the human-readable message used by the MCP wrapper.
type ProjectFilesListResult ¶ added in v2.6.0
type ProjectFilesListResult struct {
Files []models.ProjectFile `json:"files"`
Count int `json:"count"`
TotalCount int `json:"total_count"`
}
func ListProjectFiles ¶ added in v2.6.0
func ListProjectFiles(ctx context.Context, client *api.Client, input ListProjectFilesInput) (ProjectFilesListResult, error)
type ProjectMembersListResult ¶
type ProjectMembersListResult struct {
Members []models.Membership `json:"members"`
Count int `json:"count"`
TotalCount int `json:"total_count"`
}
func ListProjectMembers ¶
func ListProjectMembers(ctx context.Context, client *api.Client, input ListProjectMembersInput) (ProjectMembersListResult, error)
type ProjectsListResult ¶
type ProjectsListResult struct {
Projects []models.Project `json:"projects"`
Count int `json:"count"`
TotalCount int `json:"total_count"`
}
func ListProjects ¶
func ListProjects(ctx context.Context, client *api.Client, input ListProjectsInput) (ProjectsListResult, error)
type QueriesListResult ¶ added in v2.6.0
type QueriesListResult struct {
Queries []models.SavedQuery `json:"queries"`
Count int `json:"count"`
TotalCount int `json:"total_count"`
}
func ListQueries ¶ added in v2.6.0
func ListQueries(ctx context.Context, client *api.Client, input ListQueriesInput) (QueriesListResult, error)
type RemoveIssueWatcherInput ¶ added in v2.6.0
type ReopenIssueInput ¶
type RolesListResult ¶ added in v2.6.0
type SearchInput ¶
type SearchInput struct {
Query string `json:"query" jsonschema:"Full-text search query."`
ProjectID string `json:"project_id,omitempty" jsonschema:"Scope search to a single project (identifier or numeric ID)."`
Scope string `json:"scope,omitempty" jsonschema:"One of 'all', 'my_projects', 'subprojects'."`
Issues bool `json:"issues,omitempty" jsonschema:"Include issues in results."`
News bool `json:"news,omitempty" jsonschema:"Include news in results."`
Documents bool `json:"documents,omitempty" jsonschema:"Include documents in results."`
Changesets bool `json:"changesets,omitempty" jsonschema:"Include changesets in results."`
WikiPages bool `json:"wiki_pages,omitempty" jsonschema:"Include wiki pages in results."`
Messages bool `json:"messages,omitempty" jsonschema:"Include forum messages in results."`
Projects bool `json:"projects,omitempty" jsonschema:"Include projects in results."`
AllWords bool `json:"all_words,omitempty" jsonschema:"Require all query words to match."`
TitlesOnly bool `json:"titles_only,omitempty" jsonschema:"Match query against titles only."`
OpenIssues bool `json:"open_issues,omitempty" jsonschema:"Limit issue results to open issues."`
Limit int `json:"limit,omitempty" jsonschema:"Max results to return. Defaults to 50 when omitted."`
Offset int `json:"offset,omitempty" jsonschema:"Number of leading results to skip."`
}
type SearchResultsListResult ¶
type SearchResultsListResult struct {
Results []models.SearchResult `json:"results"`
Count int `json:"count"`
TotalCount int `json:"total_count"`
}
func Search ¶
func Search(ctx context.Context, client *api.Client, input SearchInput) (SearchResultsListResult, error)
type StatusesListResult ¶
type StatusesListResult struct {
Statuses []models.IssueStatus `json:"issue_statuses"`
Count int `json:"count"`
}
func ListStatuses ¶
type SummaryTimeEntriesInput ¶
type SummaryTimeEntriesInput struct {
ProjectID string `json:"project_id,omitempty" jsonschema:"Project identifier or numeric ID to filter by."`
UserID string `json:"user_id,omitempty" jsonschema:"User numeric ID or 'me'."`
From string `json:"from,omitempty" jsonschema:"Inclusive start date (YYYY-MM-DD)."`
To string `json:"to,omitempty" jsonschema:"Inclusive end date (YYYY-MM-DD)."`
GroupBy string `json:"group_by,omitempty" jsonschema:"One of 'day' (default), 'project', 'activity'."`
}
type TimeEntriesListResult ¶
type TimeEntriesListResult struct {
TimeEntries []models.TimeEntry `json:"time_entries"`
Count int `json:"count"`
TotalCount int `json:"total_count"`
}
func ListTimeEntries ¶
func ListTimeEntries(ctx context.Context, client *api.Client, input ListTimeEntriesInput) (TimeEntriesListResult, error)
type TimeSummaryResult ¶
type TimeSummaryResult struct {
GroupBy string `json:"group_by"`
From string `json:"from,omitempty"`
To string `json:"to,omitempty"`
Rows []TimeSummaryRow `json:"rows"`
TotalHours float64 `json:"total_hours"`
}
func SummaryTimeEntries ¶
func SummaryTimeEntries(ctx context.Context, client *api.Client, input SummaryTimeEntriesInput) (TimeSummaryResult, error)
type TimeSummaryRow ¶
type TrackersListResult ¶
type TrackersListResult struct {
Trackers []models.Tracker `json:"trackers"`
Count int `json:"count"`
}
func ListTrackers ¶
type UnarchiveProjectInput ¶ added in v2.6.0
type UnarchiveProjectInput struct {
Identifier string `json:"identifier" jsonschema:"Project identifier or numeric ID to unarchive. Requires Redmine 5.0+."`
}
type UpdateGroupInput ¶
type UpdateIssueInput ¶
type UpdateIssueInput struct {
ID int `json:"id" jsonschema:"Issue ID to update."`
Subject *string `json:"subject,omitempty" jsonschema:"New subject (title)."`
Description *string `json:"description,omitempty" jsonschema:"New description body."`
TrackerID *int `json:"tracker_id,omitempty" jsonschema:"New tracker ID."`
StatusID *int `json:"status_id,omitempty" jsonschema:"New status ID."`
PriorityID *int `json:"priority_id,omitempty" jsonschema:"New priority ID."`
AssignedToID *int `json:"assigned_to_id,omitempty" jsonschema:"Positive user ID to assign the issue to."`
CategoryID *int `json:"category_id,omitempty" jsonschema:"Issue category ID."`
FixedVersionID *int `json:"fixed_version_id,omitempty" jsonschema:"Fixed version ID."`
ParentIssueID *int `json:"parent_issue_id,omitempty" jsonschema:"Parent issue ID for sub-tasks. Set to 0 to remove the parent."`
DoneRatio *int `json:"done_ratio,omitempty" jsonschema:"Completion percentage (0-100)."`
EstimatedHours *float64 `json:"estimated_hours,omitempty" jsonschema:"Estimated effort in hours."`
StartDate *string `json:"start_date,omitempty" jsonschema:"Start date (YYYY-MM-DD). Use empty string to clear."`
DueDate *string `json:"due_date,omitempty" jsonschema:"Due date (YYYY-MM-DD). Use empty string to clear."`
Notes *string `json:"notes,omitempty" jsonschema:"Journal note to attach to the update."`
PrivateNotes *bool `json:"private_notes,omitempty" jsonschema:"Mark the note attached via 'notes' as private."`
IsPrivate *bool `json:"is_private,omitempty" jsonschema:"Toggle issue privacy."`
CustomFieldValues map[string]string `json:"custom_field_values,omitempty" jsonschema:"Custom field values keyed by numeric custom-field ID."`
Uploads []models.Upload `json:"-"`
}
type UpdateMembershipInput ¶
type UpdateMyAccountInput ¶ added in v2.6.0
type UpdateMyAccountInput struct {
FirstName *string `json:"firstname,omitempty" jsonschema:"New given name."`
LastName *string `json:"lastname,omitempty" jsonschema:"New family name."`
Mail *string `json:"mail,omitempty" jsonschema:"New email address."`
MailNotification *string `` /* 145-byte string literal not displayed */
}
type UpdateProjectInput ¶
type UpdateProjectInput struct {
Identifier string `json:"identifier" jsonschema:"Project identifier or numeric ID to update."`
Name *string `json:"name,omitempty" jsonschema:"New project name."`
Description *string `json:"description,omitempty" jsonschema:"New project description."`
Homepage *string `json:"homepage,omitempty" jsonschema:"New project homepage URL."`
IsPublic *bool `json:"is_public,omitempty" jsonschema:"Toggle public visibility."`
ParentID *int `json:"parent_id,omitempty" jsonschema:"New parent project numeric ID. 0 detaches the project from its parent."`
InheritMembers *bool `json:"inherit_members,omitempty" jsonschema:"Toggle inheriting members from the parent project."`
DefaultAssignedToID *int `` /* 134-byte string literal not displayed */
DefaultVersionID *int `` /* 132-byte string literal not displayed */
TrackerIDs []int `json:"tracker_ids,omitempty" jsonschema:"Replace the enabled tracker set with the given IDs."`
EnabledModuleNames []string `json:"enabled_module_names,omitempty" jsonschema:"Replace the enabled module set with the given names."`
IssueCustomFieldIDs []int `json:"issue_custom_field_ids,omitempty" jsonschema:"Replace the enabled issue custom-field set with the given IDs."`
CustomFieldValues map[string]string `` /* 127-byte string literal not displayed */
}
type UpdateTimeEntryInput ¶
type UpdateTimeEntryInput struct {
ID int `json:"id" jsonschema:"Time entry numeric ID."`
Hours *float64 `json:"hours,omitempty" jsonschema:"New hours worked."`
ActivityID *int `json:"activity_id,omitempty" jsonschema:"New activity enumeration ID."`
SpentOn *string `json:"spent_on,omitempty" jsonschema:"New date (YYYY-MM-DD)."`
Comments *string `json:"comments,omitempty" jsonschema:"New comment body."`
}
type UpdateUserInput ¶
type UpdateUserInput struct {
ID int `json:"id" jsonschema:"Numeric user ID to update."`
FirstName *string `json:"firstname,omitempty" jsonschema:"New given name."`
LastName *string `json:"lastname,omitempty" jsonschema:"New family name."`
Mail *string `json:"mail,omitempty" jsonschema:"New email address."`
Admin *bool `json:"admin,omitempty" jsonschema:"Toggle admin privileges."`
Status *int `json:"status,omitempty" jsonschema:"Numeric status code (1 active, 2 registered, 3 locked)."`
MailNotification *string `` /* 145-byte string literal not displayed */
MustChangePasswd *bool `json:"must_change_passwd,omitempty" jsonschema:"Force the user to change their password on next login."`
GeneratePassword *bool `json:"generate_password,omitempty" jsonschema:"Server generates a random password."`
AuthSourceID *int `json:"auth_source_id,omitempty" jsonschema:"Numeric authentication source ID for external auth."`
}
type UpdateVersionInput ¶
type UpdateVersionInput struct {
ID int `json:"id" jsonschema:"Numeric version (milestone) ID."`
Name *string `json:"name,omitempty" jsonschema:"New version name."`
Status *string `json:"status,omitempty" jsonschema:"New status: open, locked, or closed."`
Sharing *string `json:"sharing,omitempty" jsonschema:"New sharing: none, descendants, hierarchy, tree, or system."`
DueDate *string `json:"due_date,omitempty" jsonschema:"New due date (YYYY-MM-DD)."`
Description *string `json:"description,omitempty" jsonschema:"New description."`
WikiPageTitle *string `json:"wiki_page_title,omitempty" jsonschema:"New associated wiki page title."`
}
type UpdateWikiPageInput ¶
type UpdateWikiPageInput struct {
ProjectID string `json:"project_id" jsonschema:"Project identifier or numeric ID."`
Page string `json:"page" jsonschema:"Wiki page title (slug) to update."`
Text *string `json:"text,omitempty" jsonschema:"New page body, or new section content when --section is set."`
Title *string `json:"title,omitempty" jsonschema:"New display title."`
Comments *string `json:"comments,omitempty" jsonschema:"Edit comment."`
Version *int `` /* 182-byte string literal not displayed */
Uploads []models.Upload `json:"-"`
Section *int `json:"section,omitempty" jsonschema:"Section number (1-based) to update instead of the full page."`
SectionHash *string `` /* 137-byte string literal not displayed */
}
type UploadProjectFileInput ¶ added in v2.6.0
type UploadProjectFileInput struct {
ProjectID string `json:"project_id" jsonschema:"Project identifier or numeric ID."`
Token string `json:"token" jsonschema:"Upload token returned by the /uploads.json endpoint."`
Filename string `json:"filename,omitempty" jsonschema:"File name shown in Redmine. Defaults to the uploaded file's name."`
VersionID int `json:"version_id,omitempty" jsonschema:"Optional version (milestone) to attach the file to."`
Description string `json:"description,omitempty" jsonschema:"Optional human-readable description."`
ContentType string `json:"content_type,omitempty" jsonschema:"Optional MIME type override."`
}
type UsersListResult ¶
type UsersListResult struct {
Users []models.User `json:"users"`
Count int `json:"count"`
TotalCount int `json:"total_count"`
}
func ListUsers ¶
func ListUsers(ctx context.Context, client *api.Client, input ListUsersInput) (UsersListResult, error)
type VersionsListResult ¶
type VersionsListResult struct {
Versions []models.Version `json:"versions"`
Count int `json:"count"`
TotalCount int `json:"total_count"`
}
func ListVersions ¶
func ListVersions(ctx context.Context, client *api.Client, input ListVersionsInput) (VersionsListResult, error)
type WikiPagesListResult ¶
type WikiPagesListResult struct {
Pages []models.WikiPageIndex `json:"pages"`
Count int `json:"count"`
TotalCount int `json:"total_count"`
}
func ListWikiPages ¶
func ListWikiPages(ctx context.Context, client *api.Client, input ListWikiPagesInput) (WikiPagesListResult, error)