Documentation ¶
Overview ¶
Package config @Link https://gitee.com/linngc/center.gf @Copyright Copyright (c) 2022 webos CLI @Author linngc @License
Package config @Link https://gitee.com/linngc/center.gf @Copyright Copyright (c) 2022 webos CLI @Author linngc @License
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ModeVoid = 0 ModeOnlyWrite = 2 ModeOnlyRead = 4 ModeWR = 6 )
View Source
var ( Fs http.FileSystem FileServer http.Handler )
View Source
var Config = &MavenConfig{ Auth: make(map[string]interface{}), RepositoryStore: make(map[string]*Repository), }
Functions ¶
This section is empty.
Types ¶
type AuthUser ¶
type MavenConfig ¶
type MavenConfig struct { LocalRepository string `yaml:"localRepository" default:"./storage/maven"` AuthUser []*AuthUser `yaml:"authUser" default:"[{\"Name\":\"user\",\"Password\":\"password\"}]"` Repository []*Repository `` /* 180-byte string literal not displayed */ Auth map[string]interface{} RepositoryStore map[string]*Repository }
func LoadConfig ¶
func LoadConfig() *MavenConfig
type Repository ¶
type Repository struct { Id string `yaml:"id"` //仓库ID Name string `yaml:"name"` //仓库名字, 随意,唯一即可 Target string `yaml:"target"` //数据目录, localRepository的相对路径, 默认取id值 Mode int `yaml:"mode" default:"6"` //模式,默认为6,参数描述:0 无效 2 仅可写 4 仅可读 6 可读写 Cache bool `yaml:"cache" default:"true"` //是否缓存镜像文件, 默认缓存,参数描述:true 缓存 false不缓存 Mirror []string `yaml:"mirror"` //镜像地址, 会先尝试在本地加载, 如果加载失败, 会尝试从镜像依次读取 }
Click to show internal directories.
Click to hide internal directories.