config

package
v0.0.0-...-52e4a05 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package config @Link https://gitee.com/linngc/center.gf @Copyright Copyright (c) 2022 center CLI @Author linngc @License

Package config @Link https://gitee.com/linngc/center.gf @Copyright Copyright (c) 2022 center CLI @Author linngc @License

Package config @Link https://gitee.com/linngc/center.gf @Copyright Copyright (c) 2022 center CLI @Author linngc @License

Package config @Link https://gitee.com/linngc/center.gf @Copyright Copyright (c) 2022 center CLI @Author linngc @License

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GolangDecodeTo

func GolangDecodeTo(b []byte)

func MavenDecodeTo

func MavenDecodeTo(b []byte)

func NpmDecodeTo

func NpmDecodeTo(b []byte)

Types

type GolangConfig

type GolangConfig struct {
	Cache   string              `` /* 176-byte string literal not displayed */
	Central []string            `yaml:"central" default:"[\"https://goproxy.io/\"]"  dc:"Mirrors中央仓库"`
	Mirror  []string            `` /* 172-byte string literal not displayed */
	Sumdb   map[string][]string `yaml:"sumdb" dc:"sum校验服务器地址,默认使用配置的默认值"`
}

func GetGolangConfig

func GetGolangConfig() *GolangConfig

GetGolangConfig 获取golang配置的资源文件信息

type MavenConfig

type MavenConfig struct {
	Cache      string                 `` /* 176-byte string literal not displayed */
	Central    []string               `yaml:"central" default:"[\"https://repo1.maven.org/maven2/\"]"  dc:"Mirrors中央仓库"`
	Mirror     []string               `` /* 222-byte string literal not displayed */
	Repository map[string]*Repository `yaml:"repository" default:"[{\"Id\":\"public\",\"Name\":\"mirror\"}]"`
}

func GetMavenConfig

func GetMavenConfig() *MavenConfig

GetMavenConfig 获取maven配置的资源文件信息

type NpmConfig

type NpmConfig struct {
	Cache   string   `` /* 176-byte string literal not displayed */
	Central []string `yaml:"central" default:""  dc:"Mirrors中央仓库"`
	Mirror  []string `yaml:"mirror" default:"" dc:"镜像地址, 会先尝试在本地加载, 如果加载失败, 会尝试从镜像依次读取"`
}

func GetNpmConfig

func GetNpmConfig() *NpmConfig

GetNpmConfig 获取npm配置的资源文件信息

type Repository

type Repository struct {
	Id    string `yaml:"id" dc:"仓库ID"`
	Name  string `yaml:"name" dc:"仓库名字, 随意,唯一即可"`
	Mode  int    `yaml:"mode" default:"6" dc:"模式,默认为6,参数描述:0 无效 2 仅可写 4 仅可读 6 可读写"`
	Auth  bool   `yaml:"auth" default:"true" dc:"是否鉴权, 默认鉴权,参数描述:true 鉴权 false不鉴权"`
	Cache bool   `yaml:"cache" default:"true" dc:"是否缓存镜像文件, 默认缓存,参数描述:true 缓存 false不缓存"`
}

Jump to

Keyboard shortcuts

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