gitlab

package
v0.0.0-...-a0115ea Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	GetFile(repository string, path string, branch string) ([]byte, error)
	GetProject(projectID string) (*gitlab.Project, error)
	GetReleaseArtifact(projectID int, releaseTag string, artifactPath string) ([]byte, error)
}

Client holds the method signatures for a GitLab client.

func NewClient

func NewClient(baseURL string, accessToken string, getFileFunc GetFileFunc, getProjectFunc GetProjectFunc, getReleaseArtifact GetReleaseArtifactFunc, options ...gitlab.ClientOptionFunc) (Client, error)

NewClient returns a new GitLab client with the provided configuration

type ClientGetter

type ClientGetter struct{}

ClientGetter is an interface for getting a GitLab client

func (*ClientGetter) GetClient

func (clientGetter *ClientGetter) GetClient(baseURL string, accessToken string, options ...gitlab.ClientOptionFunc) (Client, error)

GetClient returns a new GitLab client

type GetFileFunc

type GetFileFunc func(*gitlab.Client, string, string, string) ([]byte, error)

type GetProjectFunc

type GetProjectFunc func(*gitlab.Client, string) (*gitlab.Project, error)

type GetReleaseArtifactFunc

type GetReleaseArtifactFunc func(*gitlab.Client, int, string, string) ([]byte, error)

Jump to

Keyboard shortcuts

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