gitea

package
v0.0.0-...-c079afc Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateRSAKeyPair

func GenerateRSAKeyPair(bits int) (userkeypriv, userkeypub string, err error)

Types

type Gitea

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

Gitea holds the gitea functionality config vars

func Init

func Init(giteaURL, token, cloneAddr, webhookRepoURL, webhookRepoSecret, webhookURL, webhookSecret string) *Gitea

Init gitea config vars

func (*Gitea) Repo

func (g *Gitea) Repo(user string, repo string) (*Repo, error)

func (*Gitea) WebhookDeploy

func (g *Gitea) WebhookDeploy(user, repo, keypriv, keypub, cloneurl, multiweb string) error

type Repo

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

func (*Repo) CreateWebhook

func (r *Repo) CreateWebhook() error

CreateWebhook create a webhook on the user repo

func (*Repo) Delete

func (r *Repo) Delete() error

Delete the repo

func (*Repo) DeployKey

func (r *Repo) DeployKey(keypub string) error

DeployKey put a deploy key on the user repo

func (*Repo) Exists

func (r *Repo) Exists() bool

Exists checks if the repo exists.

func (*Repo) GetSSHURL

func (r *Repo) GetSSHURL() (string, error)

Get repo info

func (*Repo) Migrate

func (r *Repo) Migrate() error

Migrate template repo to new user repo

func (*Repo) UserID

func (r *Repo) UserID() (int, error)

UserID check users exists and return user id

Jump to

Keyboard shortcuts

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