api

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GiteaServer = os.Getenv("GITEA_SERVER")
	GiteaOrg    = os.Getenv("GITEA_ORG")
	GiteaToken  = os.Getenv("GITEA_ACCESS_TOKEN")
)

Functions

func CreateRepo

func CreateRepo(name string) error

CreateRepo creates a repository on GitHub

func Login

func Login() error

Login obtains OAuth tokens from GitHub

func MigrateRepo

func MigrateRepo(options MigrateRepoOptions) error

func SetupPushMirror

func SetupPushMirror(options SetupPushMirrorOptions) error

Types

type MigrateRepoOptions

type MigrateRepoOptions struct {
	GitURI  string
	Name    string
	Mirror  bool // if true, mirror the repository
	Private bool // if true, create a private repository
}

MigrateRepoOptions represents the options for migrating a repository

type SetupPushMirrorOptions

type SetupPushMirrorOptions struct {
	UsernameRepo string
	GitURI       string
}

Jump to

Keyboard shortcuts

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