maven

package
v0.0.0-...-a6b6bab Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package maven @Link https://gitee.com/linngc/central-mirror @Copyright Copyright (c) 2024 central-mirror CLI @Author linngc @License

Package maven @Link https://gitee.com/linngc/central-mirror @Copyright Copyright (c) 2024 central-mirror CLI @Author linngc @License

Package maven @Link https://gitee.com/linngc/central-mirror @Copyright Copyright (c) 2024 central-mirror CLI @Author linngc @License

Package maven @Link https://gitee.com/linngc/central-mirror @Copyright Copyright (c) 2024 central-mirror CLI @Author linngc @License

Package maven @Link https://gitee.com/linngc/central-mirror @Copyright Copyright (c) 2024 central-mirror CLI @Author linngc @License

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OnMavenCfg

func OnMavenCfg(str string)

OnMavenCfg 初始化配置文件

Types

type MavenConfig

type MavenConfig struct {
	Public     string                 `yaml:"public" default:"\"https://repo1.maven.org/maven2/\""  dc:"Mirrors中央仓库"`
	Mirror     string                 `` /* 185-byte string literal not displayed */
	Repository map[string]*Repository `yaml:"repository"`
}

func GetMavenConfig

func GetMavenConfig() *MavenConfig

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

type MavenProxy

type MavenProxy struct {
	Com *storage.Storage //通用工具类
	// contains filtered or unexported fields
}

func Client

func Client(ctx context.Context) *MavenProxy

Client 仓库连接

func (*MavenProxy) DeployMapping

func (c *MavenProxy) DeployMapping() (u *cacheModel.ObjectsInfo, err error)

DeployMapping maven pom.xml put请求时候入口 最终请求示例: http://127.0.0.1:10010/proxy/maven/public/org/springframework/boot/spring-boot/2.5.6/spring-boot-2.5.6.jar @param libName 示例 public @param moduleName 示例 org/springframework/boot/spring-boot/2.5.6/spring-boot-2.5.6.jar

func (*MavenProxy) Get

func (c *MavenProxy) Get() (u *cacheModel.ObjectsInfo, err error)

Get maven pom.xml get/head请求时候入口 最终请求示例: http://127.0.0.1:10010/proxy/maven/public/org/springframework/boot/spring-boot/2.5.6/spring-boot-2.5.6.jar libName 示例 public @param jarPath 示例 org/springframework/boot/spring-boot/2.5.6/spring-boot-2.5.6.jar

func (*MavenProxy) GetLibNames

func (c *MavenProxy) GetLibNames() (libs map[string]string, err error)

GetLibNames 获取已配置的仓库名称信息 最终请求示例:http://127.0.0.1:10010/api/maven/getRepository

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" dc:"是否鉴权, 默认鉴权,参数描述:true 鉴权 false不鉴权"`
	Cache bool   `yaml:"cache" dc:"是否缓存镜像文件, 默认缓存,参数描述:true 缓存 false不缓存"`
}

Jump to

Keyboard shortcuts

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