config

package
v0.0.0-...-2d55ef2 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 4 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 Config

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

type Github

type Github struct {
	AccessToken string       `json:"token"`
	Repos       []GithubRepo `json:"repo"`
}

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 Github `json:"github"`
}

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

Jump to

Keyboard shortcuts

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