config

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 29, 2026 License: Apache-2.0 Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadYaml

func ReadYaml[T any](fileName string) (T, error)

Types

type Artifactory

type Artifactory struct {
	User        string `json:"user"`
	AccessToken string `json:"token"`
	BaseURL     URL    `json:"url"`
	Timeout     int    `json:"timeout"`
	BodyLimit   int64  `json:"bodyLimit"`
}

type BitBucketRepo

type BitBucketRepo struct {
	Repo        Repo   `json:"repo"`
	User        string `json:"user"`
	AccessToken string `json:"token"`
	BaseURL     URL    `json:"url"`
	Timeout     int    `json:"timeout"`
	BodyLimit   int64  `json:"bodyLimit"`
}

type Cache

type Cache struct {
	Type        cachetype.Type `json:"type"`
	Local       CacheLocal     `json:"local"`
	Artifactory Artifactory    `json:"artifactory"`
}

type CacheLocal

type CacheLocal struct {
	Dir string `json:"directory"`
}

type Config

type Config struct {
	Listen netip.AddrPort `json:"listen"`
	Domain string         `json:"domain"`
	TLS    TLSConfig      `json:"tls"`
	Cache  Cache          `json:"cache"`
	Proxy  Proxy          `json:"proxy"`
	Local  LocalGit       `json:"local"`
	Log    LogConfig      `json:"log"`
}

type GithubRepo

type GithubRepo struct {
	Repo        Repo   `json:"repo"`
	AccessToken string `json:"token"`
	Timeout     int    `json:"timeout"`
	BodyLimit   int64  `json:"bodyLimit"`
}

type LocalGit

type LocalGit struct {
	Storage string `json:"storage"`
	Repos   []Repo `json:"repo"`
}

type LogConfig

type LogConfig struct {
	Level string `json:"level"`
}

type Proxy

type Proxy struct {
	Github    []GithubRepo    `json:"github"`
	BitBucket []BitBucketRepo `json:"bitbucket"`
}

type Repo

type Repo struct {
	Owner    string   `json:"owner"`
	Name     string   `json:"name"`
	Prefixes []string `json:"prefix"`
	Paths    []string `json:"path"`
}

type TLSConfig

type TLSConfig struct {
	CertFile   string `json:"cert"`
	KeyFile    string `json:"key"`
	CACertFile string `json:"ca"`
}

type URL

type URL struct {
	url.URL
}

func (*URL) UnmarshalText

func (u *URL) UnmarshalText(text []byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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