gitprovider

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BitbucketGitProvider

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

func NewBitbucketGitProvider added in v0.11.0

func NewBitbucketGitProvider(username string, token string) *BitbucketGitProvider

func (*BitbucketGitProvider) GetNamespaces

func (g *BitbucketGitProvider) GetNamespaces() ([]*GitNamespace, error)

func (*BitbucketGitProvider) GetRepoBranches

func (g *BitbucketGitProvider) GetRepoBranches(repositoryId string, namespaceId string) ([]*GitBranch, error)

func (*BitbucketGitProvider) GetRepoPRs

func (g *BitbucketGitProvider) GetRepoPRs(repositoryId string, namespaceId string) ([]*GitPullRequest, error)

func (*BitbucketGitProvider) GetRepositories

func (g *BitbucketGitProvider) GetRepositories(namespace string) ([]*GitRepository, error)

func (*BitbucketGitProvider) GetUser added in v0.11.0

func (g *BitbucketGitProvider) GetUser() (*GitUser, error)

type BranchResponse

type BranchResponse struct {
	Name   string `json:"name"`
	Target struct {
		Hash string `json:"hash"`
	} `json:"target"`
}

type BranchesResponse

type BranchesResponse struct {
	Values []BranchResponse `json:"values"`
}

type ConfigStore added in v0.11.0

type ConfigStore interface {
	List() ([]*GitProviderConfig, error)
	Find(id string) (*GitProviderConfig, error)
	Save(*GitProviderConfig) error
	Delete(*GitProviderConfig) error
}

type GitBranch

type GitBranch struct {
	Name string `json:"name"`
	SHA  string `json:"sha"`

} // @name GitBranch

type GitHubGitProvider

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

func NewGitHubGitProvider added in v0.11.0

func NewGitHubGitProvider(token string) *GitHubGitProvider

func (*GitHubGitProvider) GetNamespaces

func (g *GitHubGitProvider) GetNamespaces() ([]*GitNamespace, error)

func (*GitHubGitProvider) GetRepoBranches

func (g *GitHubGitProvider) GetRepoBranches(repositoryId string, namespaceId string) ([]*GitBranch, error)

func (*GitHubGitProvider) GetRepoPRs

func (g *GitHubGitProvider) GetRepoPRs(repositoryId string, namespaceId string) ([]*GitPullRequest, error)

func (*GitHubGitProvider) GetRepositories

func (g *GitHubGitProvider) GetRepositories(namespace string) ([]*GitRepository, error)

func (*GitHubGitProvider) GetUser added in v0.11.0

func (g *GitHubGitProvider) GetUser() (*GitUser, error)

type GitLabGitProvider

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

func NewGitLabGitProvider added in v0.11.0

func NewGitLabGitProvider(token string, baseApiUrl *string) *GitLabGitProvider

func (*GitLabGitProvider) GetNamespaces

func (g *GitLabGitProvider) GetNamespaces() ([]*GitNamespace, error)

func (*GitLabGitProvider) GetRepoBranches

func (g *GitLabGitProvider) GetRepoBranches(repositoryId string, namespaceId string) ([]*GitBranch, error)

func (*GitLabGitProvider) GetRepoPRs

func (g *GitLabGitProvider) GetRepoPRs(repositoryId string, namespaceId string) ([]*GitPullRequest, error)

func (*GitLabGitProvider) GetRepositories

func (g *GitLabGitProvider) GetRepositories(namespace string) ([]*GitRepository, error)

func (*GitLabGitProvider) GetUser added in v0.11.0

func (g *GitLabGitProvider) GetUser() (*GitUser, error)

type GitNamespace

type GitNamespace struct {
	Id   string `json:"id"`
	Name string `json:"name"`

} // @name GitNamespace

type GitProvider

type GitProvider interface {
	GetNamespaces() ([]*GitNamespace, error)
	GetRepositories(namespace string) ([]*GitRepository, error)
	GetUser() (*GitUser, error)
	GetRepoBranches(repositoryId string, namespaceId string) ([]*GitBranch, error)
	GetRepoPRs(repositoryId string, namespaceId string) ([]*GitPullRequest, error)
}

type GitProviderConfig added in v0.11.0

type GitProviderConfig struct {
	Id         string  `json:"id"`
	Username   string  `json:"username"`
	Token      string  `json:"token"`
	BaseApiUrl *string `json:"baseApiUrl,omitempty"`

} // @name GitProvider

type GitPullRequest

type GitPullRequest struct {
	Name   string `json:"name"`
	Branch string `json:"branch"`

} // @name GitPullRequest

type GitRepository added in v0.11.0

type GitRepository struct {
	Id       string  `json:"id"`
	Url      string  `json:"url"`
	Name     string  `json:"name"`
	Branch   *string `json:"branch,omitempty"`
	Sha      string  `json:"sha"`
	Owner    string  `json:"owner"`
	PrNumber *uint32 `json:"prNumber,omitempty"`
	Source   string  `json:"source"`
	Path     *string `json:"path,omitempty"`

} // @name GitRepository

type GitUser

type GitUser struct {
	Id       string `json:"id"`
	Username string `json:"username"`
	Name     string `json:"name"`
	Email    string `json:"email"`

} // @name GitUser

type GiteaGitProvider added in v0.4.0

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

func NewGiteaGitProvider added in v0.11.0

func NewGiteaGitProvider(token string, baseApiUrl string) *GiteaGitProvider

func (*GiteaGitProvider) GetNamespaces added in v0.4.0

func (g *GiteaGitProvider) GetNamespaces() ([]*GitNamespace, error)

func (*GiteaGitProvider) GetRepoBranches added in v0.4.0

func (g *GiteaGitProvider) GetRepoBranches(repositoryId string, namespaceId string) ([]*GitBranch, error)

func (*GiteaGitProvider) GetRepoPRs added in v0.4.0

func (g *GiteaGitProvider) GetRepoPRs(repositoryId string, namespaceId string) ([]*GitPullRequest, error)

func (*GiteaGitProvider) GetRepositories added in v0.4.0

func (g *GiteaGitProvider) GetRepositories(namespace string) ([]*GitRepository, error)

func (*GiteaGitProvider) GetUser added in v0.11.0

func (g *GiteaGitProvider) GetUser() (*GitUser, error)

Jump to

Keyboard shortcuts

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