gitlab

package
v0.22.6 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

func NewAPI

func NewAPI(baseURL, token string) (*API, error)

func NewGitLabAPI

func NewGitLabAPI(repo Repository, repoFile RepositoryFile, commit Commit) *API

func (*API) CompareDiff

func (api *API) CompareDiff(ctx context.Context, projectID any, target, source string) ([]*model.Diff, error)

func (*API) GetCommitDiff added in v0.21.7

func (api *API) GetCommitDiff(ctx context.Context, projectID any, sha string) ([]*model.Diff, error)

func (*API) GetFileContent

func (api *API) GetFileContent(ctx context.Context, projectID any, ref, fileName string) ([]byte, error)

func (*API) GetLatestCommitByPath added in v0.21.7

func (api *API) GetLatestCommitByPath(ctx context.Context, projectID any, path string) (*model.Commit, error)

type Commit added in v0.21.7

type Commit interface {
	ListCommits(pid interface{}, opt *gitlab.ListCommitsOptions, options ...gitlab.RequestOptionFunc) ([]*gitlab.Commit, *gitlab.Response, error)
	GetCommitDiff(pid interface{}, sha string, opt *gitlab.GetCommitDiffOptions, options ...gitlab.RequestOptionFunc) ([]*gitlab.Diff, *gitlab.Response, error)
}

type Repository

type Repository interface {
	Compare(pid interface{}, opt *gitlab.CompareOptions, options ...gitlab.RequestOptionFunc) (*gitlab.Compare, *gitlab.Response, error)
}

type RepositoryFile

type RepositoryFile interface {
	GetRawFile(pid interface{}, fileName string, opt *gitlab.GetRawFileOptions, options ...gitlab.RequestOptionFunc) ([]byte, *gitlab.Response, error)
}

Jump to

Keyboard shortcuts

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