git

package
v0.0.0-...-560f09a Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GitClone

func GitClone(directory string, requestContext context.Context, upr *packp.ReferenceUpdateRequest, w http.ResponseWriter) error

func GitFork

func GitFork(directory string, requestContext context.Context, upr *packp.ReferenceUpdateRequest, w http.ResponseWriter) error

func GitPull

func GitPull(directory string, requestContext context.Context, upr *packp.ReferenceUpdateRequest, w http.ResponseWriter) error

func GitPush

func GitPush(directory string, requestContext context.Context, upr *packp.UploadPackRequest, w http.ResponseWriter) error

Types

type VCSClient

type VCSClient struct {
	GiteaClient *gitea.Client
	HostUrl     string
	AdminID     int64
}

func CreateVCSClient

func CreateVCSClient(hosturl string, username string, password string, insecure bool) (*VCSClient, error)

func (*VCSClient) Branch

func (v *VCSClient) Branch(ownerName string, repoName string, branchName string, oldBranchName string) (*gitea.Branch, error)

func (*VCSClient) CreateRepo

func (v *VCSClient) CreateRepo(userName string, repoName string, repoDescription string, isPrivate bool,
	readMePath string, gitIgnorePath string, licensePath string, defaultBranch string) (*gitea.Repository, error)

func (*VCSClient) CreateUser

func (v *VCSClient) CreateUser(loginName string, userName string, fullName string, email string,
	password string) (*gitea.User, error)

use snowflake model id for sourceid

func (*VCSClient) DeleteBranch

func (v *VCSClient) DeleteBranch(ownerName string, repoName string, branchName string) error

func (*VCSClient) DeleteRepo

func (v *VCSClient) DeleteRepo(ownerName string, repoName string) error

func (*VCSClient) DeleteUser

func (v *VCSClient) DeleteUser(userName string) error

func (*VCSClient) EditUser

func (v *VCSClient) EditUser(loginName string, userName string, fullName string, email string,
	password string) error

func (*VCSClient) Fork

func (v *VCSClient) Fork(ownerName string, repoName string, orgName *string) (*gitea.Repository, error)

func (*VCSClient) ListAllRepos

func (v *VCSClient) ListAllRepos(ownerName string, pageNum *int, pageSize *int) ([]*gitea.Repository, error)

func (*VCSClient) ListRepoBranches

func (v *VCSClient) ListRepoBranches(ownerName string, repoName string,
	pageNum *int, pageSize *int) ([]*gitea.Branch, error)

func (*VCSClient) ListRepoContents

func (v *VCSClient) ListRepoContents(ownerName string, repoName string, ref string,
	directory string) ([]*gitea.ContentsResponse, error)

func (*VCSClient) LoginAsUser

func (v *VCSClient) LoginAsUser(username string, password string) (*gitea.Client, error)

Jump to

Keyboard shortcuts

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