Documentation
¶
Index ¶
- func Bool_to_int(input bool) int
- func Build_DSN(cfg *config.Config) (string, string)
- func Config_path(input string) string
- func DB_AutoInc(dbtype string) string
- func DB_Random(dbtype string) string
- func IPfamilies(host string) map[int]int
- func IPversion(ip string) string
- func InitDatabase(dbh *sqlx.DB) bool
- func Load_config(path string) (*config.Config, bool)
- func Name_to_ip(host string) net.IP
- func TableCount(dbh *sqlx.DB, database string) int
- type CacheStats
- type CheckResult
- type CheckTask
- type Issue
- type Location
- type Mirror
- type Repo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Bool_to_int ¶
func Config_path ¶
func DB_AutoInc ¶
func IPfamilies ¶
func InitDatabase ¶
func Name_to_ip ¶
Types ¶
type CacheStats ¶
type Location ¶
type Location struct {
Known bool
Continent string // One of: AF, AN, AS, EU, NA, OC, SA
// https://dev.maxmind.com/geoip/geoip2/geoip2-city-country-csv-databases/
Country string // ISO 3166-1 Code
Region string // ISO 3166-2 Code Subdivision (US state, Canadian province, etc.)
Longitude float64 // Currently unused
Latitude float64 // Currently unused
}
type Mirror ¶
type Mirror struct {
ID int `json:"id" db:"mirror_id"`
Name string `json:"name"`
Basedir string `json:"basedir"`
BasedirAlt string `json:"basedir_altarch" db:"basedir_altarch"`
IPv4 int `json:"ipv4" db:"ipv4"`
IPv6 int `json:"ipv6" db:"ipv6"`
HTTP int `json:"http" db:"http"`
HTTPS int `json:"https" db:"https"`
Rsync int `json:"rsync" db:"rsync"`
Continent string `json:"continent" db:"continent"`
Country string `json:"country" db:"country"`
Region string `json:"region" db:"region"`
Latitude float64 `json:"latitude" db:"latitude"`
Longitude float64 `json:"longitude" db:"longitude"`
Enabled bool `json:"enabled" db:"enabled"`
}
type Repo ¶
type Repo struct {
ID int `json:"id" db:"repo_id"`
MRelease int `json:"release" db:"major_release"`
Path string `json:"path" db:"path"`
Name string `json:"name" db:"name"`
Arch string `json:"arch" db:"arch"`
Altarch bool `json:"is_altarch" db:"is_altarch"`
Enabled bool `json:"enabled" db:"enabled"`
}
Click to show internal directories.
Click to hide internal directories.