镜像管理初步完成
Former-commit-id: 62a00d79d83e760d5bf57ec90139e11c5c712f6b
This commit is contained in:
parent
a31b79c33c
commit
b1ed4cb501
|
@ -62,7 +62,7 @@ service pcm {
|
|||
get /hpc/listHistoryJob (listHistoryJobReq) returns (listHistoryJobResp)
|
||||
}
|
||||
|
||||
//hpc二级接口
|
||||
//智算二级接口
|
||||
@server(
|
||||
prefix: pcm/v1
|
||||
group : ai
|
||||
|
@ -168,3 +168,19 @@ service pcm {
|
|||
@handler perCenterComputerPowersHandler
|
||||
get /storage/perCenterComputerPowers (PerCenterComputerPowersReq) returns (PerCenterComputerPowersResp)
|
||||
}
|
||||
|
||||
//镜像接口
|
||||
@server(
|
||||
prefix: pcm/v1
|
||||
group : image
|
||||
)
|
||||
service pcm {
|
||||
@handler uploadImageHandler
|
||||
post /image/upload () returns ()
|
||||
|
||||
@handler imageListHandler
|
||||
get /image/list () returns (imageListResp)
|
||||
|
||||
@handler imageTagsHandler
|
||||
get /image/tags (imageTagsReq) returns (imageTagsResp)
|
||||
}
|
|
@ -8,93 +8,114 @@ info(
|
|||
)
|
||||
|
||||
/****************** screen storage start*************************/
|
||||
type(
|
||||
type (
|
||||
StorageScreenReq {
|
||||
|
||||
}
|
||||
StorageScreenResp {
|
||||
TotalSize int32 `json:"totalSize" copier:"TotalSize"`
|
||||
AiCenterInfos []AiCenterInfos `json:"aiCenterInfos" copier:"AiCenterInfos"`
|
||||
StorageUsed float32 `json:"storageUsed" copier:"StorageUsed"`
|
||||
StorageUsing float32 `json:"storageUsing" copier:"StorageUsing"`
|
||||
UsageRate float32 `json:"usageRate" copier:"UsageRate"`
|
||||
UsingRate float32 `json:"usingRate" copier:"UsingRate"`
|
||||
TotalSize int32 `json:"totalSize" copier:"TotalSize"`
|
||||
AiCenterInfos []AiCenterInfos `json:"aiCenterInfos" copier:"AiCenterInfos"`
|
||||
StorageUsed float32 `json:"storageUsed" copier:"StorageUsed"`
|
||||
StorageUsing float32 `json:"storageUsing" copier:"StorageUsing"`
|
||||
UsageRate float32 `json:"usageRate" copier:"UsageRate"`
|
||||
UsingRate float32 `json:"usingRate" copier:"UsingRate"`
|
||||
Code int32 `json:"code,omitempty"`
|
||||
Msg string `json:"msg,omitempty"`
|
||||
ErrorMsg string `json:"ErrorMsg,omitempty"`
|
||||
}
|
||||
AiCenterInfos {
|
||||
Id string `json:"id" copier:"Id"`
|
||||
Name string `json:"name" copier:"Name"`
|
||||
Desc string `json:"desc" copier:"Desc"`
|
||||
Resource string `json:"resource" copier:"Resource"`
|
||||
TrainJob string `json:"trainJob" copier:"TrainJob"`
|
||||
ComputeScale int32 `json:"computeScale" copier:"ComputeScale"`
|
||||
StorageScale int32 `json:"storageScale" copier:"StorageScale"`
|
||||
Province string `json:"path:"province" copier:"Province"`
|
||||
City string `json:"city" copier:"City"`
|
||||
CoordinateX int32 `json:"coordinateX" copier:"CoordinateX"`
|
||||
CoordinateY int32 `json:"coordinateY" copier:"CoordinateY"`
|
||||
Type int32 `json:"type" copier:"Type"`
|
||||
Weight int32 `json:"weight" copier:"Weight"`
|
||||
ConnectionState int32 `json:"connectionState" copier:"ConnectionState"`
|
||||
BusyState int32 `json:"busyState" copier:"BusyState"`
|
||||
ImageUrl string `json:"imageUrl" copier:"ImageUrl"`
|
||||
AccDevices string `json:"accDevices" copier:"AccDevices"`
|
||||
MarketTime int64 `json:"marketTime" copier:"MarketTime"`
|
||||
CreatedAt int64 `json:"createdAt" copier:"CreatedAt"`
|
||||
AccessTime int32 `json:"accessTime" copier:"AccessTime"`
|
||||
CardRunTime int32 `json:"cardRunTime" copier:"CardRunTime"`
|
||||
JobCount int32 `json:"jobCount" copier:"JobCount"`
|
||||
}
|
||||
Id string `json:"id" copier:"Id"`
|
||||
Name string `json:"name" copier:"Name"`
|
||||
Desc string `json:"desc" copier:"Desc"`
|
||||
Resource string `json:"resource" copier:"Resource"`
|
||||
TrainJob string `json:"trainJob" copier:"TrainJob"`
|
||||
ComputeScale int32 `json:"computeScale" copier:"ComputeScale"`
|
||||
StorageScale int32 `json:"storageScale" copier:"StorageScale"`
|
||||
Province string `json:"path:"province" copier:"Province"`
|
||||
City string `json:"city" copier:"City"`
|
||||
CoordinateX int32 `json:"coordinateX" copier:"CoordinateX"`
|
||||
CoordinateY int32 `json:"coordinateY" copier:"CoordinateY"`
|
||||
Type int32 `json:"type" copier:"Type"`
|
||||
Weight int32 `json:"weight" copier:"Weight"`
|
||||
ConnectionState int32 `json:"connectionState" copier:"ConnectionState"`
|
||||
BusyState int32 `json:"busyState" copier:"BusyState"`
|
||||
ImageUrl string `json:"imageUrl" copier:"ImageUrl"`
|
||||
AccDevices string `json:"accDevices" copier:"AccDevices"`
|
||||
MarketTime int64 `json:"marketTime" copier:"MarketTime"`
|
||||
CreatedAt int64 `json:"createdAt" copier:"CreatedAt"`
|
||||
AccessTime int32 `json:"accessTime" copier:"AccessTime"`
|
||||
CardRunTime int32 `json:"cardRunTime" copier:"CardRunTime"`
|
||||
JobCount int32 `json:"jobCount" copier:"JobCount"`
|
||||
}
|
||||
)
|
||||
/******************screen storage end*************************/
|
||||
|
||||
/******************screen computing power Start*************************/
|
||||
type(
|
||||
DailyPowerScreenReq{
|
||||
|
||||
}
|
||||
|
||||
DailyPowerScreenResp{
|
||||
TotalSize int32 `json:"totalSize" copier:"TotalSize"`
|
||||
DailyComputerPowers []DailyComputerPowers `json:"dailyComputerPowers" copier:"DailyComputerPowers"`
|
||||
Code int32 `json:"code,omitempty"`
|
||||
Msg string `json:"msg,omitempty"`
|
||||
ErrorMsg string `json:"ErrorMsg,omitempty"`
|
||||
}
|
||||
|
||||
DailyComputerPowers{
|
||||
Date string `json:"date" copier:"Date"`
|
||||
ComputerPower float32 `json:"computerPower" copier:"ComputerPower"`
|
||||
}
|
||||
)
|
||||
type(
|
||||
PerCenterComputerPowersReq{
|
||||
type (
|
||||
DailyPowerScreenReq {
|
||||
|
||||
}
|
||||
PerCenterComputerPowersResp{
|
||||
TotalSize int32 `json:"totalSize" copier:"TotalSize"`
|
||||
PerCenterComputerPowers []PerCenterComputerPowers `json:"perCenterComputerPowers" copier:"PerCenterComputerPowers"`
|
||||
AccOtJobInfo AccOtJobInfo `json:"accOtJobInfo" copier:"AccOtJobInfo"`
|
||||
Code int32 `json:"code,omitempty"`
|
||||
Msg string `json:"msg,omitempty"`
|
||||
ErrorMsg string `json:"ErrorMsg,omitempty"`
|
||||
}
|
||||
|
||||
PerCenterComputerPowers{
|
||||
CenterName string `json:"centerName" copier:"CenterName"`
|
||||
ComputerPower float32`json:"computerPower" copier:"ComputerPower"`
|
||||
JobCount int32 `json:"jobCount" copier:"JobCount"`
|
||||
CenterId string `json:"centerId" copier:"CenterId"`
|
||||
}
|
||||
AccOtJobInfo{
|
||||
DailyPowerScreenResp {
|
||||
TotalSize int32 `json:"totalSize" copier:"TotalSize"`
|
||||
DailyComputerPowers []DailyComputerPowers `json:"dailyComputerPowers" copier:"DailyComputerPowers"`
|
||||
Code int32 `json:"code,omitempty"`
|
||||
Msg string `json:"msg,omitempty"`
|
||||
ErrorMsg string `json:"ErrorMsg,omitempty"`
|
||||
}
|
||||
|
||||
DailyComputerPowers {
|
||||
Date string `json:"date" copier:"Date"`
|
||||
ComputerPower float32 `json:"computerPower" copier:"ComputerPower"`
|
||||
}
|
||||
)
|
||||
type (
|
||||
PerCenterComputerPowersReq {
|
||||
|
||||
}
|
||||
PerCenterComputerPowersResp {
|
||||
TotalSize int32 `json:"totalSize" copier:"TotalSize"`
|
||||
PerCenterComputerPowers []PerCenterComputerPowers `json:"perCenterComputerPowers" copier:"PerCenterComputerPowers"`
|
||||
AccOtJobInfo AccOtJobInfo `json:"accOtJobInfo" copier:"AccOtJobInfo"`
|
||||
Code int32 `json:"code,omitempty"`
|
||||
Msg string `json:"msg,omitempty"`
|
||||
ErrorMsg string `json:"ErrorMsg,omitempty"`
|
||||
}
|
||||
|
||||
PerCenterComputerPowers {
|
||||
CenterName string `json:"centerName" copier:"CenterName"`
|
||||
ComputerPower float32 `json:"computerPower" copier:"ComputerPower"`
|
||||
JobCount int32 `json:"jobCount" copier:"JobCount"`
|
||||
CenterId string `json:"centerId" copier:"CenterId"`
|
||||
}
|
||||
AccOtJobInfo {
|
||||
AccRunSec int32 `json:"accRunSec" copier:"AccRunSec"`
|
||||
AccCardRunSec float32`json:"accCardRunSec" copier:"AccCardRunSec"`
|
||||
AccCardRunSec float32 `json:"accCardRunSec" copier:"AccCardRunSec"`
|
||||
AccOtJobNum int32 `json:"accOtJobNum" copier:"AccOtJobNum"`
|
||||
}
|
||||
|
||||
|
||||
)
|
||||
|
||||
/******************screen computing power End*************************/
|
||||
|
||||
|
||||
type (
|
||||
UploadImageReq {
|
||||
name string `json:"name" copier:"name"`
|
||||
}
|
||||
)
|
||||
|
||||
type (
|
||||
imageListResp {
|
||||
repositories []string `json:"repositories" copier:"repositories"`
|
||||
}
|
||||
)
|
||||
|
||||
type (
|
||||
imageTagsReq {
|
||||
name string `json:"name"`
|
||||
}
|
||||
imageTagsResp {
|
||||
name string `json:"name"`
|
||||
tags []string `json:"tags" copier:"tags"`
|
||||
}
|
||||
)
|
|
@ -0,0 +1,17 @@
|
|||
package image
|
||||
|
||||
import (
|
||||
"PCM/common/result"
|
||||
"net/http"
|
||||
|
||||
"PCM/adaptor/PCM-CORE/api/internal/logic/image"
|
||||
"PCM/adaptor/PCM-CORE/api/internal/svc"
|
||||
)
|
||||
|
||||
func ImageListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
l := image.NewImageListLogic(r.Context(), svcCtx)
|
||||
resp, err := l.ImageList()
|
||||
result.HttpResult(r, w, resp, err)
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
package image
|
||||
|
||||
import (
|
||||
"PCM/common/result"
|
||||
"net/http"
|
||||
|
||||
"PCM/adaptor/PCM-CORE/api/internal/logic/image"
|
||||
"PCM/adaptor/PCM-CORE/api/internal/svc"
|
||||
"PCM/adaptor/PCM-CORE/api/internal/types"
|
||||
"github.com/zeromicro/go-zero/rest/httpx"
|
||||
)
|
||||
|
||||
func ImageTagsHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
var req types.ImageTagsReq
|
||||
if err := httpx.Parse(r, &req); err != nil {
|
||||
httpx.ErrorCtx(r.Context(), w, err)
|
||||
return
|
||||
}
|
||||
|
||||
l := image.NewImageTagsLogic(r.Context(), svcCtx)
|
||||
resp, err := l.ImageTags(&req)
|
||||
result.HttpResult(r, w, resp, err)
|
||||
}
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
package image
|
||||
|
||||
import (
|
||||
"PCM/adaptor/PCM-CORE/api/internal/logic/image"
|
||||
types2 "PCM/adaptor/PCM-CORE/api/internal/types"
|
||||
"PCM/common/result"
|
||||
"context"
|
||||
"github.com/zeromicro/go-zero/rest/httpx"
|
||||
"io/ioutil"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"PCM/adaptor/PCM-CORE/api/internal/svc"
|
||||
)
|
||||
|
||||
type LoadBody struct {
|
||||
Stream string `json:"stream"`
|
||||
}
|
||||
|
||||
func UploadImageHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
var req types2.UploadImageReq
|
||||
// 解析yaml文件
|
||||
multipartFile, _, err := r.FormFile("file")
|
||||
if err != nil {
|
||||
result.HttpResult(r, w, nil, err)
|
||||
return
|
||||
}
|
||||
// 加载镜像文件到docker
|
||||
body, err := svcCtx.DockerClient.ImageLoad(context.Background(), multipartFile, false)
|
||||
if err != nil {
|
||||
httpx.ErrorCtx(r.Context(), w, err)
|
||||
return
|
||||
}
|
||||
bytes, err := ioutil.ReadAll(body.Body)
|
||||
loadBody := LoadBody{}
|
||||
err = json.Unmarshal(bytes, &loadBody)
|
||||
if err != nil {
|
||||
httpx.ErrorCtx(r.Context(), w, err)
|
||||
return
|
||||
}
|
||||
imageName := strings.TrimSpace(loadBody.Stream[13:])
|
||||
req.Name = "hub.jcce.dev:18443/repository/docker-hub/jcce/" + imageName
|
||||
// 给镜像打上私有仓库的tag
|
||||
err = svcCtx.DockerClient.ImageTag(context.Background(), imageName, req.Name)
|
||||
if err != nil {
|
||||
httpx.ErrorCtx(r.Context(), w, err)
|
||||
return
|
||||
}
|
||||
l := image.NewUploadImageLogic(r.Context(), svcCtx)
|
||||
err = l.UploadImage(&req)
|
||||
result.HttpResult(r, w, nil, err)
|
||||
}
|
||||
}
|
|
@ -7,6 +7,7 @@ import (
|
|||
ai "PCM/adaptor/PCM-CORE/api/internal/handler/ai"
|
||||
core "PCM/adaptor/PCM-CORE/api/internal/handler/core"
|
||||
hpc "PCM/adaptor/PCM-CORE/api/internal/handler/hpc"
|
||||
image "PCM/adaptor/PCM-CORE/api/internal/handler/image"
|
||||
storage "PCM/adaptor/PCM-CORE/api/internal/handler/storage"
|
||||
"PCM/adaptor/PCM-CORE/api/internal/svc"
|
||||
|
||||
|
@ -252,4 +253,25 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
|||
},
|
||||
rest.WithPrefix("/pcm/v1"),
|
||||
)
|
||||
|
||||
server.AddRoutes(
|
||||
[]rest.Route{
|
||||
{
|
||||
Method: http.MethodPost,
|
||||
Path: "/image/upload",
|
||||
Handler: image.UploadImageHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
Method: http.MethodGet,
|
||||
Path: "/image/list",
|
||||
Handler: image.ImageListHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
Method: http.MethodGet,
|
||||
Path: "/image/tags",
|
||||
Handler: image.ImageTagsHandler(serverCtx),
|
||||
},
|
||||
},
|
||||
rest.WithPrefix("/pcm/v1"),
|
||||
)
|
||||
}
|
||||
|
|
|
@ -32,11 +32,7 @@ func NewScheduleTaskLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Sche
|
|||
}
|
||||
|
||||
func (l *ScheduleTaskLogic) ScheduleTask(req *types.ScheduleTaskReq) (err error) {
|
||||
// check param
|
||||
//checkResult := l.checkSubmitReq(req)
|
||||
//if checkResult != "" {
|
||||
// return resp, result2.NewDefaultError(checkResult)
|
||||
//}
|
||||
|
||||
bytes, err := json.Marshal(req)
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -76,42 +72,3 @@ func (l *ScheduleTaskLogic) ScheduleTask(req *types.ScheduleTaskReq) (err error)
|
|||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (l *ScheduleTaskLogic) checkSubmitReq(req *types.ScheduleTaskReq) string {
|
||||
//var rows *sql.Rows
|
||||
//switch req.ServiceName {
|
||||
//case "kubeNative":
|
||||
//bytes, err := json.Marshal(req.Metadata)
|
||||
//if err != nil {
|
||||
// return ""
|
||||
//}
|
||||
//clouds := tool.UnMarshalK8sStruct(string(bytes), 0)
|
||||
//rows, err := l.svcCtx.Db.Query("select namespace,name from cloud where deleted_flag = 0 ")
|
||||
//if rows != nil && rows.Next() {
|
||||
// var namespace string
|
||||
// var name string
|
||||
// rows.Scan(&namespace, &name)
|
||||
// for _, cloud := range clouds {
|
||||
// if cloud.Namespace == namespace && name == cloud.Name {
|
||||
// return "data already exists."
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
//case "modelArts":
|
||||
// var modelArtsReq modelartsclient.CreateTrainingJobReq
|
||||
// tool.Convert(req.Metadata, &modelArtsReq)
|
||||
// rows, _ = l.svcCtx.Db.Query("select id from ai where project_id = ? and name = ?", modelArtsReq.ProjectId, modelArtsReq.Metadata.Name)
|
||||
// if rows != nil && rows.Next() {
|
||||
// return "data already exists."
|
||||
// }
|
||||
//case "ac":
|
||||
// var acReq *hpcacclient.SubmitJobReq
|
||||
// tool.Convert(req.Metadata, &acReq)
|
||||
// rows, _ = l.svcCtx.Db.Query("select id from hpc where name = ?", acReq.Appname)
|
||||
// if rows != nil && rows.Next() {
|
||||
// return "data already exists."
|
||||
// }
|
||||
//}
|
||||
//
|
||||
return ""
|
||||
}
|
||||
|
|
|
@ -34,21 +34,25 @@ func (l *ListJobLogic) ListJob(req *types.ListJobReq) (resp *types.ListJobResp,
|
|||
acReq := &hpcAC.ListJobReq{}
|
||||
err = copier.CopyWithOption(acReq, req, copier.Option{Converters: tool.Converters})
|
||||
listJobRespAC, err := l.svcCtx.ACRpc.ListJob(l.ctx, acReq)
|
||||
|
||||
for i := 0; i < len(listJobRespAC.Jobs); i++ {
|
||||
jobAC := types.Job{SlurmVersion: "ac"}
|
||||
copier.CopyWithOption(&jobAC, &listJobRespAC.Jobs[i], copier.Option{Converters: tool.Converters})
|
||||
resp.Jobs = append(resp.Jobs, jobAC)
|
||||
if listJobRespAC != nil {
|
||||
for i := 0; i < len(listJobRespAC.Jobs); i++ {
|
||||
jobAC := types.Job{SlurmVersion: "ac"}
|
||||
copier.CopyWithOption(&jobAC, &listJobRespAC.Jobs[i], copier.Option{Converters: tool.Converters})
|
||||
resp.Jobs = append(resp.Jobs, jobAC)
|
||||
}
|
||||
}
|
||||
|
||||
tianheReq := &hpcTH.ListJobReq{}
|
||||
err = copier.CopyWithOption(tianheReq, req, copier.Option{Converters: tool.Converters})
|
||||
listJobRespTH, err := l.svcCtx.THRpc.ListJob(l.ctx, tianheReq)
|
||||
|
||||
for i := 0; i < len(listJobRespTH.Jobs); i++ {
|
||||
jobTH := types.Job{SlurmVersion: "th"}
|
||||
copier.CopyWithOption(&jobTH, &listJobRespTH.Jobs[i], copier.Option{Converters: tool.Converters})
|
||||
resp.Jobs = append(resp.Jobs, jobTH)
|
||||
if l.svcCtx.THRpc != nil {
|
||||
tianheReq := &hpcTH.ListJobReq{}
|
||||
err = copier.CopyWithOption(tianheReq, req, copier.Option{Converters: tool.Converters})
|
||||
listJobRespTH, _ := l.svcCtx.THRpc.ListJob(l.ctx, tianheReq)
|
||||
if listJobRespTH != nil {
|
||||
for i := 0; i < len(listJobRespTH.Jobs); i++ {
|
||||
jobTH := types.Job{SlurmVersion: "th"}
|
||||
copier.CopyWithOption(&jobTH, &listJobRespTH.Jobs[i], copier.Option{Converters: tool.Converters})
|
||||
resp.Jobs = append(resp.Jobs, jobTH)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
resp.Code = 200
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
package image
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"PCM/adaptor/PCM-CORE/api/internal/svc"
|
||||
"PCM/adaptor/PCM-CORE/api/internal/types"
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type ImageListLogic struct {
|
||||
logx.Logger
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
}
|
||||
|
||||
func NewImageListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ImageListLogic {
|
||||
return &ImageListLogic{
|
||||
Logger: logx.WithContext(ctx),
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
}
|
||||
}
|
||||
|
||||
func (l *ImageListLogic) ImageList() (resp *types.ImageListResp, err error) {
|
||||
|
||||
client := &http.Client{}
|
||||
url := fmt.Sprintf("%s/repository/%s/v2/_catalog", "http://10.101.15.175:8081", "pcm")
|
||||
req, err := http.NewRequest("GET", url, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
response, err := client.Do(req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer response.Body.Close()
|
||||
|
||||
if response.StatusCode != 200 {
|
||||
}
|
||||
|
||||
json.NewDecoder(response.Body).Decode(&resp)
|
||||
|
||||
return resp, nil
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
package image
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"PCM/adaptor/PCM-CORE/api/internal/svc"
|
||||
"PCM/adaptor/PCM-CORE/api/internal/types"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type ImageTagsLogic struct {
|
||||
logx.Logger
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
}
|
||||
|
||||
func NewImageTagsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ImageTagsLogic {
|
||||
return &ImageTagsLogic{
|
||||
Logger: logx.WithContext(ctx),
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
}
|
||||
}
|
||||
|
||||
func (l *ImageTagsLogic) ImageTags(req *types.ImageTagsReq) (resp *types.ImageTagsResp, err error) {
|
||||
client := &http.Client{}
|
||||
url := fmt.Sprintf("%s/repository/%s/v2/%s/tags/list", "http://10.101.15.175:8081", "pcm", req.Name)
|
||||
httpReq, err := http.NewRequest("GET", url, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
response, err := client.Do(httpReq)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer response.Body.Close()
|
||||
|
||||
json.NewDecoder(response.Body).Decode(&resp)
|
||||
|
||||
if response.StatusCode != 200 {
|
||||
}
|
||||
return resp, nil
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
package image
|
||||
|
||||
import (
|
||||
"PCM/adaptor/PCM-CORE/api/internal/svc"
|
||||
"PCM/adaptor/PCM-CORE/api/internal/types"
|
||||
"context"
|
||||
"encoding/base64"
|
||||
"encoding/json"
|
||||
types2 "github.com/docker/docker/api/types"
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type UploadImageLogic struct {
|
||||
logx.Logger
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
}
|
||||
|
||||
func NewUploadImageLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UploadImageLogic {
|
||||
return &UploadImageLogic{
|
||||
Logger: logx.WithContext(ctx),
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
}
|
||||
}
|
||||
|
||||
func (l *UploadImageLogic) UploadImage(req *types.UploadImageReq) error {
|
||||
// 推送镜像到registry
|
||||
authConfig := types2.AuthConfig{
|
||||
Username: "admin",
|
||||
Password: "Nudt@123",
|
||||
}
|
||||
authConfigBytes, err := json.Marshal(authConfig)
|
||||
authStr := base64.URLEncoding.EncodeToString(authConfigBytes)
|
||||
_, err = l.svcCtx.DockerClient.ImagePush(l.ctx, req.Name, types2.ImagePushOptions{RegistryAuth: authStr})
|
||||
if err != nil {
|
||||
logx.Error(err.Error())
|
||||
return err
|
||||
}
|
||||
// 删除本地镜像 避免存储资源浪费
|
||||
_, err = l.svcCtx.DockerClient.ImageRemove(l.ctx, req.Name, types2.ImageRemoveOptions{})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -7,9 +7,11 @@ import (
|
|||
"PCM/adaptor/PCM-HPC/PCM-AC/rpc/hpcacclient"
|
||||
"PCM/adaptor/PCM-HPC/PCM-TH/rpc/hpcthclient"
|
||||
"PCM/adaptor/PCM-STORAGE/PCM-CEPH/rpc/cephclient"
|
||||
"github.com/docker/docker/client"
|
||||
"github.com/go-redis/redis/v8"
|
||||
"github.com/robfig/cron/v3"
|
||||
"github.com/zeromicro/go-queue/kq"
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
"github.com/zeromicro/go-zero/zrpc"
|
||||
"gorm.io/driver/mysql"
|
||||
"gorm.io/gorm"
|
||||
|
@ -29,6 +31,7 @@ type ServiceContext struct {
|
|||
THRpc hpcthclient.HpcTH
|
||||
OctopusRpc octopusclient.Octopus
|
||||
CephRpc cephclient.Ceph
|
||||
DockerClient *client.Client
|
||||
}
|
||||
|
||||
func NewServiceContext(c config.Config) *ServiceContext {
|
||||
|
@ -38,6 +41,11 @@ func NewServiceContext(c config.Config) *ServiceContext {
|
|||
SingularTable: true, // 使用单数表名,启用该选项,此时,`User` 的表名应该是 `t_user`
|
||||
},
|
||||
})
|
||||
dockerClient, err := client.NewClientWithOpts()
|
||||
if err != nil {
|
||||
logx.Error(err.Error())
|
||||
return nil
|
||||
}
|
||||
return &ServiceContext{
|
||||
Cron: cron.New(cron.WithSeconds()),
|
||||
DbEngin: dbEngin,
|
||||
|
@ -53,6 +61,7 @@ func NewServiceContext(c config.Config) *ServiceContext {
|
|||
CephRpc: cephclient.NewCeph(zrpc.MustNewClient(c.CephRpcConf)),
|
||||
ACRpc: hpcacclient.NewHpcAC(zrpc.MustNewClient(c.ACRpcConf)),
|
||||
//THRpc: hpcthclient.NewHpcTH(zrpc.MustNewClient(c.THRpcConf)),
|
||||
OctopusRpc: octopusclient.NewOctopus(zrpc.MustNewClient(c.OctopusRpcConf)),
|
||||
OctopusRpc: octopusclient.NewOctopus(zrpc.MustNewClient(c.OctopusRpcConf)),
|
||||
DockerClient: dockerClient,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1910,3 +1910,20 @@ type AccOtJobInfo struct {
|
|||
AccCardRunSec float32 `json:"accCardRunSec" copier:"AccCardRunSec"`
|
||||
AccOtJobNum int32 `json:"accOtJobNum" copier:"AccOtJobNum"`
|
||||
}
|
||||
|
||||
type UploadImageReq struct {
|
||||
Name string `json:"name" copier:"name"`
|
||||
}
|
||||
|
||||
type ImageListResp struct {
|
||||
Repositories []string `json:"repositories" copier:"repositories"`
|
||||
}
|
||||
|
||||
type ImageTagsReq struct {
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
type ImageTagsResp struct {
|
||||
Name string `json:"name"`
|
||||
Tags []string `json:"tags" copier:"tags"`
|
||||
}
|
||||
|
|
14
go.mod
14
go.mod
|
@ -7,6 +7,7 @@ require (
|
|||
github.com/Masterminds/squirrel v1.5.4
|
||||
github.com/aliyun/alibaba-cloud-sdk-go v1.61.1704
|
||||
github.com/bitly/go-simplejson v0.5.0
|
||||
github.com/docker/docker v20.10.24+incompatible
|
||||
github.com/go-redis/redis v6.15.9+incompatible
|
||||
github.com/go-redis/redis/v8 v8.11.5
|
||||
github.com/go-resty/resty/v2 v2.7.0
|
||||
|
@ -15,7 +16,7 @@ require (
|
|||
github.com/nacos-group/nacos-sdk-go/v2 v2.2.1
|
||||
github.com/pkg/errors v0.9.1
|
||||
github.com/robfig/cron/v3 v3.0.1
|
||||
github.com/sirupsen/logrus v1.8.1
|
||||
github.com/sirupsen/logrus v1.9.0
|
||||
github.com/zeromicro/go-queue v1.1.8
|
||||
github.com/zeromicro/go-zero v1.5.1
|
||||
go.opentelemetry.io/otel/trace v1.14.0
|
||||
|
@ -30,6 +31,7 @@ require (
|
|||
)
|
||||
|
||||
require (
|
||||
github.com/Microsoft/go-winio v0.6.1 // indirect
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 // indirect
|
||||
github.com/buger/jsonparser v1.1.1 // indirect
|
||||
|
@ -39,6 +41,9 @@ require (
|
|||
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
|
||||
github.com/docker/distribution v2.8.1+incompatible // indirect
|
||||
github.com/docker/go-connections v0.4.0 // indirect
|
||||
github.com/docker/go-units v0.5.0 // indirect
|
||||
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
|
||||
github.com/fatih/color v1.15.0 // indirect
|
||||
github.com/felixge/fgprof v0.9.3 // indirect
|
||||
|
@ -70,9 +75,13 @@ require (
|
|||
github.com/mattn/go-colorable v0.1.13 // indirect
|
||||
github.com/mattn/go-isatty v0.0.17 // indirect
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
|
||||
github.com/moby/term v0.5.0 // indirect
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||
github.com/morikuni/aec v1.0.0 // indirect
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
|
||||
github.com/opencontainers/go-digest v1.0.0 // indirect
|
||||
github.com/opencontainers/image-spec v1.0.2 // indirect
|
||||
github.com/openzipkin/zipkin-go v0.4.1 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.0.7 // indirect
|
||||
github.com/pierrec/lz4/v4 v4.1.17 // indirect
|
||||
|
@ -98,6 +107,7 @@ require (
|
|||
go.uber.org/automaxprocs v1.5.2 // indirect
|
||||
go.uber.org/multierr v1.9.0 // indirect
|
||||
go.uber.org/zap v1.24.0 // indirect
|
||||
golang.org/x/mod v0.8.0 // indirect
|
||||
golang.org/x/net v0.9.0 // indirect
|
||||
golang.org/x/oauth2 v0.4.0 // indirect
|
||||
golang.org/x/sync v0.1.0 // indirect
|
||||
|
@ -105,6 +115,7 @@ require (
|
|||
golang.org/x/term v0.7.0 // indirect
|
||||
golang.org/x/text v0.9.0 // indirect
|
||||
golang.org/x/time v0.3.0 // indirect
|
||||
golang.org/x/tools v0.6.0 // indirect
|
||||
google.golang.org/appengine v1.6.7 // indirect
|
||||
google.golang.org/genproto v0.0.0-20230123190316-2c411cf9d197 // indirect
|
||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||
|
@ -112,6 +123,7 @@ require (
|
|||
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
gotest.tools/v3 v3.4.0 // indirect
|
||||
k8s.io/klog/v2 v2.80.1 // indirect
|
||||
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect
|
||||
k8s.io/utils v0.0.0-20230115233650-391b47cb4029 // indirect
|
||||
|
|
27
go.sum
27
go.sum
|
@ -385,6 +385,7 @@ cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoIS
|
|||
cloud.google.com/go/workflows v1.8.0/go.mod h1:ysGhmEajwZxGn1OhGOGKsTXc5PyxOc0vfKf5Af+to4M=
|
||||
cloud.google.com/go/workflows v1.9.0/go.mod h1:ZGkj1aFIOd9c8Gerkjjq7OW7I5+l6cSvT3ujaO/WwSA=
|
||||
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
||||
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8=
|
||||
github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24=
|
||||
github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA=
|
||||
github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M=
|
||||
|
@ -404,6 +405,8 @@ github.com/JCCE-nudt/zero-contrib/zrpc/registry/nacos v0.0.0-20230419021610-13bb
|
|||
github.com/JCCE-nudt/zero-contrib/zrpc/registry/nacos v0.0.0-20230419021610-13bbc83fbc3c/go.mod h1:GuCS4be9IH3bSBTvbzz34nszPQDO33PIOv5nviEaFMw=
|
||||
github.com/Masterminds/squirrel v1.5.4 h1:uUcX/aBc8O7Fg9kaISIUsHXdKuqehiXAMQTYX8afzqM=
|
||||
github.com/Masterminds/squirrel v1.5.4/go.mod h1:NNaOrjSoIDfDA40n7sr2tPNZRfjzjA400rg+riTZj10=
|
||||
github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow=
|
||||
github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM=
|
||||
github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ=
|
||||
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
|
||||
github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
|
||||
|
@ -486,6 +489,14 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
|
|||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
|
||||
github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68=
|
||||
github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
|
||||
github.com/docker/docker v20.10.24+incompatible h1:Ugvxm7a8+Gz6vqQYQQ2W7GYq5EUPaAiuPgIfVyI3dYE=
|
||||
github.com/docker/docker v20.10.24+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
|
||||
github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ=
|
||||
github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
|
||||
github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4=
|
||||
github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
|
||||
github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE=
|
||||
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
|
||||
github.com/eapache/go-resiliency v1.2.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs=
|
||||
|
@ -809,6 +820,8 @@ github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182aff
|
|||
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||
github.com/mkevac/debugcharts v0.0.0-20191222103121-ae1c48aa8615/go.mod h1:Ad7oeElCZqA1Ufj0U9/liOF4BtVepxRcTvr2ey7zTvM=
|
||||
github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c=
|
||||
github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0=
|
||||
github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y=
|
||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
|
@ -817,6 +830,8 @@ github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3Rllmb
|
|||
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
|
||||
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
|
||||
github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc=
|
||||
github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A=
|
||||
github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
|
||||
github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
|
||||
|
@ -857,6 +872,10 @@ github.com/onsi/gomega v1.21.1/go.mod h1:iYAIXgPSaDHak0LCMA+AWBpIKBr8WZicMxnE8lu
|
|||
github.com/onsi/gomega v1.22.1/go.mod h1:x6n7VNe4hw0vkyYUM4mjIXx3JbLiPaBPNgB7PRQ1tuM=
|
||||
github.com/onsi/gomega v1.23.0 h1:/oxKu9c2HVap+F3PfKort2Hw5DEU+HGlW8n+tguWsys=
|
||||
github.com/onsi/gomega v1.23.0/go.mod h1:Z/NWtiqwBrwUt4/2loMmHL63EDLnYHmVbuBpDr2vQAg=
|
||||
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
|
||||
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
|
||||
github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM=
|
||||
github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
|
||||
github.com/openzipkin/zipkin-go v0.4.0/go.mod h1:4c3sLeE8xjNqehmF5RpAFLPLJxXscc0R4l6Zg0P1tTQ=
|
||||
github.com/openzipkin/zipkin-go v0.4.1 h1:kNd/ST2yLLWhaWrkgchya40TJabe8Hioj9udfPcEO5A=
|
||||
github.com/openzipkin/zipkin-go v0.4.1/go.mod h1:qY0VqDSN1pOBN94dBc6w2GJlWLiovAyg7Qt6/I9HecM=
|
||||
|
@ -937,8 +956,9 @@ github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeV
|
|||
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
|
||||
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
|
||||
github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
|
||||
github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE=
|
||||
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
|
||||
github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0=
|
||||
github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
|
||||
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
|
||||
github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI=
|
||||
github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
|
||||
|
@ -1129,6 +1149,7 @@ golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2
|
|||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||
golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI=
|
||||
golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8=
|
||||
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
|
@ -1338,6 +1359,7 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc
|
|||
golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
|
@ -1452,6 +1474,7 @@ golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E
|
|||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||
golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA=
|
||||
golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k=
|
||||
golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM=
|
||||
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
|
@ -1736,6 +1759,8 @@ gorm.io/driver/mysql v1.4.7/go.mod h1:SxzItlnT1cb6e1e4ZRpgJN2VYtcqJgqnHxWr4wsP8o
|
|||
gorm.io/gorm v1.23.8/go.mod h1:l2lP/RyAtc1ynaTjFksBde/O8v9oOGIApu2/xRitmZk=
|
||||
gorm.io/gorm v1.24.5 h1:g6OPREKqqlWq4kh/3MCQbZKImeB9e6Xgc4zD+JgNZGE=
|
||||
gorm.io/gorm v1.24.5/go.mod h1:DVrVomtaYTbqs7gB/x2uVvqnXzv0nqjB396B8cG4dBA=
|
||||
gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o=
|
||||
gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g=
|
||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
17edd9451df6a98a1b6f6c64e2d5767cf9f35445
|
Loading…
Reference in New Issue