core

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package core provides the core functionality for interacting with GitLab API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	// contains filtered or unexported fields
}

App represents the application structure for interacting with GitLab API.

func NewApp

func NewApp(gitlabToken, gitlabURI string, timeout time.Duration) (*App, error)

NewApp creates a new application instance with GitLab client.

func (*App) GetGroupPath added in v0.5.0

func (a *App) GetGroupPath(groupID int64) (string, error)

GetGroupPath retrieves the full path for a group.

func (*App) GetIssues

func (a *App) GetIssues(opts ...GetIssuesOption) ([]*gitlab.Issue, error)

GetIssues retrieves GitLab issues based on the provided options.

func (*App) GetProjectPath added in v0.5.0

func (a *App) GetProjectPath(projectID int64) (string, error)

GetProjectPath retrieves the path with namespace for a project.

func (*App) GetProjectPathsForIssues added in v0.5.0

func (a *App) GetProjectPathsForIssues(issues []*gitlab.Issue) (map[int64]string, error)

GetProjectPathsForIssues builds a map of projectID -> path for all unique projects in issues.

type GetIssues

type GetIssues struct {
	ProjectID             int64
	GroupID               int64
	State                 string
	FilterCreatedAtAfter  time.Time
	FilterCreatedAtBefore time.Time
	FilterUpdatedAtAfter  time.Time
	FilterUpdatedAtBefore time.Time
	AssigneeUsername      string
}

GetIssues contains parameters for retrieving issues from GitLab.

type GetIssuesOption

type GetIssuesOption func(*GetIssues)

GetIssuesOption is a functional option for configuring the GetIssues struct.

func WithAssigneeUsername added in v0.4.0

func WithAssigneeUsername(assigneeUsername string) GetIssuesOption

WithAssigneeUsername filters issues by assignee username.

func WithClosedIssues

func WithClosedIssues() GetIssuesOption

WithClosedIssues filters issues to only show closed issues.

func WithFilterCreatedAt

func WithFilterCreatedAt(filterCreatedAtAfter time.Time, filterCreatedAtBefore time.Time) GetIssuesOption

WithFilterCreatedAt filters issues by creation date range.

func WithFilterCreatedAtAfter

func WithFilterCreatedAtAfter(filterCreatedAtAfter time.Time) GetIssuesOption

WithFilterCreatedAtAfter filters issues created after the specified time.

func WithFilterCreatedAtBefore

func WithFilterCreatedAtBefore(filterCreatedAtBefore time.Time) GetIssuesOption

WithFilterCreatedAtBefore filters issues created before the specified time.

func WithFilterUpdatedAt

func WithFilterUpdatedAt(filterUpdatedAtAfter time.Time, filterUpdatedAtBefore time.Time) GetIssuesOption

WithFilterUpdatedAt filters issues by update date range.

func WithFilterUpdatedAtAfter

func WithFilterUpdatedAtAfter(filterUpdatedAtAfter time.Time) GetIssuesOption

WithFilterUpdatedAtAfter filters issues updated after the specified time.

func WithFilterUpdatedAtBefore

func WithFilterUpdatedAtBefore(filterUpdatedAtBefore time.Time) GetIssuesOption

WithFilterUpdatedAtBefore filters issues updated before the specified time.

func WithGroupID

func WithGroupID(groupID int64) GetIssuesOption

WithGroupID sets the group ID for retrieving issues.

func WithOpenedIssues

func WithOpenedIssues() GetIssuesOption

WithOpenedIssues filters issues to only show opened issues.

func WithProjectID

func WithProjectID(projectID int64) GetIssuesOption

WithProjectID sets the project ID for retrieving issues.

func WithState

func WithState(state string) GetIssuesOption

WithState sets the state filter for issues.

Jump to

Keyboard shortcuts

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