gitlab

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SkipTLSVerificationProcess

func SkipTLSVerificationProcess()

SkipTLSVerificationProcess skips the TLS verification process by using a custom HTTP transport.

func UseService

func UseService(c GitLaber)

Types

type GitLaber

type GitLaber interface {
	WithToken(string, ...glab.ClientOptionFunc) (GitLaber, error)
	BaseURL() *url.URL
	GitLab() *glab.Client
	// Project
	GetProject(interface{}, *glab.GetProjectOptions, ...glab.RequestOptionFunc) (*glab.Project, *glab.Response, error)
	// Labels
	ListLabels(interface{}, *glab.ListLabelsOptions, ...glab.RequestOptionFunc) ([]*glab.Label, *glab.Response, error)
	CreateLabel(interface{}, *glab.CreateLabelOptions, ...glab.RequestOptionFunc) (*glab.Label, *glab.Response, error)
	// Milestones
	ListMilestones(interface{}, *glab.ListMilestonesOptions, ...glab.RequestOptionFunc) ([]*glab.Milestone, *glab.Response, error)
	CreateMilestone(interface{}, *glab.CreateMilestoneOptions, ...glab.RequestOptionFunc) (*glab.Milestone, *glab.Response, error)
	UpdateMilestone(interface{}, int, *glab.UpdateMilestoneOptions, ...glab.RequestOptionFunc) (*glab.Milestone, *glab.Response, error)
	// Issues
	ListProjectIssues(interface{}, *glab.ListProjectIssuesOptions, ...glab.RequestOptionFunc) ([]*glab.Issue, *glab.Response, error)
	GetIssue(interface{}, int, ...glab.RequestOptionFunc) (*glab.Issue, *glab.Response, error)
	CreateIssue(interface{}, *glab.CreateIssueOptions, ...glab.RequestOptionFunc) (*glab.Issue, *glab.Response, error)
	UpdateIssue(interface{}, int, *glab.UpdateIssueOptions, ...glab.RequestOptionFunc) (*glab.Issue, *glab.Response, error)
	DeleteIssue(interface{}, int, ...glab.RequestOptionFunc) (*glab.Response, error)
	// Users
	ListUsers(*glab.ListUsersOptions, ...glab.RequestOptionFunc) ([]*glab.User, *glab.Response, error)
	// Notes
	ListIssueNotes(interface{}, int, *glab.ListIssueNotesOptions, ...glab.RequestOptionFunc) ([]*glab.Note, *glab.Response, error)
	CreateIssueNote(interface{}, int, *glab.CreateIssueNoteOptions, ...glab.RequestOptionFunc) (*glab.Note, *glab.Response, error)
}

GitLaber defines some methods of glab.Client so it can be mocked easily in the unit tests.

func NewClient

func NewClient() GitLaber

NewClient returns a new client.

func Service

func Service() GitLaber

Jump to

Keyboard shortcuts

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