gits

package
v0.0.0-...-9be0976 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Git

type Git interface {
	ListRepositories(org string) ([]*GitRepository, error)
	ListBranch(repoName string) ([]string, error)
}

type GitArgs

type GitArgs struct {
	Username string `json:"username"`
	ApiToken string `json:"apitoken"`
	Password string `json:"password,omitempty"`
	Url      string `json:"url"`
}

type GitRepository

type GitRepository struct {
	ID          int64  `json:"id"`
	Name        string `json:"name"`
	FullName    string `json:"full_name"`
	Size        int    `json:"size"`
	HTMLURL     string `json:"html_url"`
	SSHURL      string `json:"ssh_url"`
	CloneURL    string `json:"clone_url"`
	OriginalURL string `json:"original_url"`
}

Repository represents a repository

type GiteaClient

type GiteaClient struct {
	Client   *gitea.Client
	UserName string
}

func NewGiteaClient

func NewGiteaClient(gitArgs *GitArgs) *GiteaClient

NewGiteaClient new a gitea clientv2

func (*GiteaClient) ListBranches

func (client *GiteaClient) ListBranches(repoName string) ([]string, error)

ListBranch get a repo all Branch

func (*GiteaClient) ListRepositories

func (client *GiteaClient) ListRepositories(org string) ([]*GitRepository, error)

ListRepositories get current user all repos by org

Jump to

Keyboard shortcuts

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