Documentation
¶
Index ¶
Constants ¶
View Source
const ( ForgeName = "forgejo" TokenEnv = "CODEBERG_TOKEN" DefaultAPI = "https://__HOST__/api/v1" )
Variables ¶
This section is empty.
Functions ¶
func ForgeRegistry ¶
ForgeRegistry returns all registered forge metadata.
func RegisterForge ¶
func RegisterForge(meta ForgeMeta, f factory)
RegisterForge adds a forge to the registry. Called by each adapter's init.
Types ¶
type Config ¶
type Config struct {
Forge string
Host string
Owner string
Repo string
APIURL string
Token string
HTTP *http.Client
}
Config is everything an adapter needs to talk to one repository.
type ForgeMeta ¶
type ForgeMeta struct {
Name string
TokenEnv string
DefaultAPI func(host string) string
HostPatterns []string // Host substrings that identify this forge
}
ForgeMeta holds per-forge metadata.
func GetForgeMeta ¶
GetForgeMeta returns metadata for a forge, or zero if unknown.
Click to show internal directories.
Click to hide internal directories.