scm

package
v1.7.16 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SupportedClients

func SupportedClients() []string

SupportedClients return list of all supported clients

Types

type Bitbucket

type Bitbucket struct {
	// extend the bitbucket client
	*bitbucket.Client
}

func (Bitbucket) GetOrgRepos

func (c Bitbucket) GetOrgRepos(targetOrg string) ([]Repo, error)

GetOrgRepos gets org repos

func (Bitbucket) GetType

func (_ Bitbucket) GetType() string

func (Bitbucket) GetUserRepos

func (c Bitbucket) GetUserRepos(targetUser string) ([]Repo, error)

GetUserRepos gets user repos from bitbucket

func (Bitbucket) NewClient

func (_ Bitbucket) NewClient() (Client, error)

NewClient create new bitbucket scm client

type Client

type Client interface {
	NewClient() (Client, error)

	GetUserRepos(targetUsername string) ([]Repo, error)
	GetOrgRepos(targetOrg string) ([]Repo, error)

	GetType() string
}

Client define the interface a scm client has to have

func GetClient

func GetClient(cType string) (Client, error)

type Gitea

type Gitea struct {
	// extend the gitea client
	*gitea.Client
	// contains filtered or unexported fields
}

func (Gitea) GetOrgRepos

func (c Gitea) GetOrgRepos(targetOrg string) ([]Repo, error)

GetOrgRepos fetches repo data from a specific group

func (Gitea) GetType

func (_ Gitea) GetType() string

func (Gitea) GetUserRepos

func (c Gitea) GetUserRepos(targetUsername string) ([]Repo, error)

GetUserRepos gets all of a users gitlab repos

func (Gitea) NewClient

func (_ Gitea) NewClient() (Client, error)

NewClient create new gitea scm client

type Github

type Github struct {
	// extend the github client
	*github.Client
	// contains filtered or unexported fields
}

func (Github) GetOrgRepos

func (c Github) GetOrgRepos(targetOrg string) ([]Repo, error)

GetOrgRepos gets org repos

func (Github) GetType

func (_ Github) GetType() string

func (Github) GetUserRepos

func (c Github) GetUserRepos(targetUser string) ([]Repo, error)

GetUserRepos gets user repos

func (Github) NewClient

func (_ Github) NewClient() (Client, error)

NewClient create new github scm client

type Gitlab

type Gitlab struct {
	// extend the gitlab client
	*gitlab.Client
}

func (Gitlab) GetGroupRepos added in v1.7.1

func (c Gitlab) GetGroupRepos(targetGroup string) ([]Repo, error)

GetGroupRepos fetches repo data from a specific group

func (Gitlab) GetOrgRepos

func (c Gitlab) GetOrgRepos(targetOrg string) ([]Repo, error)

GetOrgRepos fetches repo data from a specific group

func (Gitlab) GetTopLevelGroups added in v1.7.1

func (c Gitlab) GetTopLevelGroups() ([]string, error)

GetTopLevelGroups all top level org groups

func (Gitlab) GetType

func (_ Gitlab) GetType() string

func (Gitlab) GetUserRepos

func (c Gitlab) GetUserRepos(targetUsername string) ([]Repo, error)

GetUserRepos gets all of a users gitlab repos

func (Gitlab) NewClient

func (_ Gitlab) NewClient() (Client, error)

NewClient create new gitlab scm client

type Repo

type Repo struct {
	Name        string
	HostPath    string
	Path        string
	URL         string
	CloneURL    string
	CloneBranch string
	IsWiki      bool
}

Repo represents an SCM repo

Jump to

Keyboard shortcuts

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