config

package
v0.0.0-...-0f99c9b Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

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"`
}

type BitBucketRepo

type BitBucketRepo struct {
	Repo        Repo   `json:"repo"`
	User        string `json:"user"`
	AccessToken string `json:"token"`
	BaseURL     URL    `json:"url"`
}

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"`
}

type GithubRepo

type GithubRepo struct {
	Repo        Repo   `json:"repo"`
	AccessToken string `json:"token"`
}

type LocalGit

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

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