gitlab

package
v0.1.10 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientAdapterImpl

type ClientAdapterImpl struct {
	// contains filtered or unexported fields
}
var (
	Adapter ClientAdapterImpl
)

func (*ClientAdapterImpl) GetAuthorizedUser

func (ca *ClientAdapterImpl) GetAuthorizedUser() (*models.User, error)

func (*ClientAdapterImpl) GetBranchProtection

func (ca *ClientAdapterImpl) GetBranchProtection(owner string, repo *models.Repository, branch string) (*models.Protection, error)

GetBranchProtection implements clients.ClientAdapter

func (*ClientAdapterImpl) GetOrganization

func (ca *ClientAdapterImpl) GetOrganization(owner string) (*models.Organization, error)

func (*ClientAdapterImpl) GetPipelines

func (ca *ClientAdapterImpl) GetPipelines(owner string, repo string, branch string) ([]*pipelineModels.Pipeline, error)

func (*ClientAdapterImpl) GetRegistry

func (ca *ClientAdapterImpl) GetRegistry(organization *models.Organization) (*models.PackageRegistry, error)

func (*ClientAdapterImpl) GetRepository

func (ca *ClientAdapterImpl) GetRepository(owner string, repo string, branch string) (*models.Repository, error)

GetRepository implements clients.ClientAdapter

func (*ClientAdapterImpl) Init

func (*ClientAdapterImpl) Init(client *http.Client, token string, host string) error

func (*ClientAdapterImpl) ListOrganizationMembers

func (ca *ClientAdapterImpl) ListOrganizationMembers(organization string) ([]*models.User, error)

func (*ClientAdapterImpl) ListRepositoryBranches

func (ca *ClientAdapterImpl) ListRepositoryBranches(owner string, repo string) ([]*models.Branch, error)

listRepositoryBranches implements clients.ClientAdapter

func (*ClientAdapterImpl) ListSupportedChecksIDs

func (ca *ClientAdapterImpl) ListSupportedChecksIDs() ([]string, error)

type GitlabClient

type GitlabClient interface {
	GetAuthorizedUser() (*gitlab.User, *gitlab.Response, error)
	ListRepositoryBranches(org string, repoId string) ([]*gitlab.Branch, *gitlab.Response, error)
	GetBranchProtection(owner string, repo string, branch string) (*gitlab.ProtectedBranch, *gitlab.Response, error)
	GetApprovalConfiguration(project string) (*gitlab.ProjectApprovals, *gitlab.Response, error)
	GetProjectApprovalRules(project string) ([]*gitlab.ProjectApprovalRule, *gitlab.Response, error)
	GetProjectPushRules(project string) (*gitlab.ProjectPushRules, *gitlab.Response, error)
	GetRepository(owner, repo string) (*gitlab.Project, *gitlab.Response, error)
	GetOrganization(owner string) (*gitlab.Group, *gitlab.Response, error)
}
var (
	Client GitlabClient
)

func InitClient

func InitClient(client *http.Client, token string, host string) (GitlabClient, error)

type GitlabClientImpl

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

func (*GitlabClientImpl) GetApprovalConfiguration

func (gca *GitlabClientImpl) GetApprovalConfiguration(project string) (*gitlab.ProjectApprovals, *gitlab.Response, error)

func (*GitlabClientImpl) GetAuthorizedUser

func (gca *GitlabClientImpl) GetAuthorizedUser() (*gitlab.User, *gitlab.Response, error)

func (*GitlabClientImpl) GetBranchProtection

func (gca *GitlabClientImpl) GetBranchProtection(organization, repo, branch string) (*gitlab.ProtectedBranch, *gitlab.Response, error)

func (*GitlabClientImpl) GetOrganization

func (gca *GitlabClientImpl) GetOrganization(owner string) (*gitlab.Group, *gitlab.Response, error)

func (*GitlabClientImpl) GetProjectApprovalRules

func (gca *GitlabClientImpl) GetProjectApprovalRules(project string) ([]*gitlab.ProjectApprovalRule, *gitlab.Response, error)

func (*GitlabClientImpl) GetProjectPushRules

func (gca *GitlabClientImpl) GetProjectPushRules(project string) (*gitlab.ProjectPushRules, *gitlab.Response, error)

func (*GitlabClientImpl) GetRepository

func (gca *GitlabClientImpl) GetRepository(owner, repo string) (*gitlab.Project, *gitlab.Response, error)

func (*GitlabClientImpl) ListRepositoryBranches

func (gca *GitlabClientImpl) ListRepositoryBranches(org string, repoId string) ([]*gitlab.Branch, *gitlab.Response, error)

Jump to

Keyboard shortcuts

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