feat: as docker mirror registry
feat: add global proxy config upgrade: upgrade front(angular) to 19 chore: deployment staff 1. Dockerfile: build frontend, backend, and run in nginx base image
This commit is contained in:
parent
aac6c67a5f
commit
6e866b83e4
2
.dockerignore
Normal file
2
.dockerignore
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
front/node_modules
|
||||||
|
data
|
4
.gitignore
vendored
4
.gitignore
vendored
@ -6,4 +6,8 @@
|
|||||||
*.db
|
*.db
|
||||||
images
|
images
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
data
|
||||||
x
|
x
|
||||||
|
node_modules
|
||||||
|
Dockerfile.nf
|
||||||
|
__debug_*
|
25
Dockerfile
25
Dockerfile
@ -1,4 +1,11 @@
|
|||||||
FROM repo.me/my/golang:latest AS builder
|
FROM node:lts AS fronter
|
||||||
|
|
||||||
|
WORKDIR /build/front
|
||||||
|
COPY front /build/front
|
||||||
|
RUN npm i --registry https://registry.npmmirror.com
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
|
FROM golang:latest AS builder
|
||||||
|
|
||||||
ENV GO111MODULE on
|
ENV GO111MODULE on
|
||||||
ENV CGO_ENABLED 0
|
ENV CGO_ENABLED 0
|
||||||
@ -10,19 +17,17 @@ WORKDIR /build
|
|||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
RUN go mod download
|
RUN go mod download
|
||||||
RUN go build -ldflags '-s -w' -o repo_app .
|
RUN go build -ldflags '-s -w' -o server .
|
||||||
|
|
||||||
FROM repository.umisen.com/external/alpine:latest
|
FROM nginx:alpine
|
||||||
|
|
||||||
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories && apk add curl
|
|
||||||
|
|
||||||
ENV TZ Asia/Shanghai
|
ENV TZ Asia/Shanghai
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
RUN mkdir -p /data
|
COPY --from=builder /build/server /app/server
|
||||||
|
COPY --from=builder /build/deployment/nginx.conf /etc/nginx/nginx.conf
|
||||||
|
COPY --from=builder /build/deployment/endpoint.sh /app
|
||||||
|
COPY --from=fronter /build/front/dist /app/dist
|
||||||
|
|
||||||
COPY --from=builder /build/repo_app /app/repo_app
|
ENTRYPOINT [ "/app/endpoint.sh" ]
|
||||||
COPY etc /app/etc
|
|
||||||
|
|
||||||
CMD ["/app/repo_app", "-crt", "/app/etc/repo.me.crt", "-key", "/app/etc/repo.me.key", "-data", "/data"]
|
|
@ -21,11 +21,11 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: repo-me
|
- name: repo-me
|
||||||
image: repository.umisen.com/build/repo.me:v240613
|
image: repository.umisen.com/build/repo.me:"$TAG"
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
command: ["/app/repo_app", "-crt", "/app/etc/repo.me.crt", "-key", "/app/etc/repo.me.key", "-data", "/data"]
|
command: ["some args"]
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 443
|
- containerPort: 80
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
memory: 50Mi
|
memory: 50Mi
|
8
deployment/endpoint.sh
Executable file
8
deployment/endpoint.sh
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# start nginx
|
||||||
|
nginx -c /etc/nginx/nginx.conf
|
||||||
|
|
||||||
|
echo "args = $@"
|
||||||
|
|
||||||
|
/app/server "$@"
|
53
deployment/nginx.conf
Normal file
53
deployment/nginx.conf
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
user root;
|
||||||
|
worker_processes auto;
|
||||||
|
pid /run/nginx.pid;
|
||||||
|
error_log /var/log/nginx/error.log;
|
||||||
|
include /etc/nginx/modules-enabled/*.conf;
|
||||||
|
|
||||||
|
events {
|
||||||
|
worker_connections 768;
|
||||||
|
}
|
||||||
|
|
||||||
|
http {
|
||||||
|
tcp_nopush on;
|
||||||
|
types_hash_max_size 2048;
|
||||||
|
|
||||||
|
include /etc/nginx/mime.types;
|
||||||
|
default_type application/octet-stream;
|
||||||
|
|
||||||
|
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
|
||||||
|
ssl_prefer_server_ciphers on;
|
||||||
|
|
||||||
|
# log_format custom '[$time_local] [$remote_addr] [$status] [$request_time] [$request_uri]';
|
||||||
|
# access_log /var/log/nginx/access.log custom;
|
||||||
|
access_log off;
|
||||||
|
|
||||||
|
gzip on;
|
||||||
|
|
||||||
|
server {
|
||||||
|
client_max_body_size 5m;
|
||||||
|
|
||||||
|
location /_api {
|
||||||
|
proxy_pass http://127.0.0.1:8383;
|
||||||
|
|
||||||
|
# Add headers to support SSE
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Connection '';
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
|
||||||
|
# Disable buffering for SSE
|
||||||
|
proxy_buffering off;
|
||||||
|
proxy_cache off;
|
||||||
|
proxy_ignore_client_abort on;
|
||||||
|
}
|
||||||
|
|
||||||
|
location / {
|
||||||
|
root /app/dist/front/browser;
|
||||||
|
index index.html;
|
||||||
|
try_files $uri $uri/ /index.html;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
14663
front/package-lock.json
generated
Normal file
14663
front/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -10,25 +10,24 @@
|
|||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/animations": "^17.3.0",
|
"@angular/animations": "^19.0.5",
|
||||||
"@angular/cdk": "17.3.4",
|
"@angular/cdk": "19.0.4",
|
||||||
"@angular/common": "^17.3.0",
|
"@angular/common": "^19.0.5",
|
||||||
"@angular/compiler": "^17.3.0",
|
"@angular/compiler": "^19.0.5",
|
||||||
"@angular/core": "^17.3.0",
|
"@angular/core": "^19.0.5",
|
||||||
"@angular/forms": "^17.3.0",
|
"@angular/forms": "^19.0.5",
|
||||||
"@angular/material": "17.3.4",
|
"@angular/material": "19.0.4",
|
||||||
"@angular/material-experimental": "17.3.4",
|
"@angular/platform-browser": "^19.0.5",
|
||||||
"@angular/platform-browser": "^17.3.0",
|
"@angular/platform-browser-dynamic": "^19.0.5",
|
||||||
"@angular/platform-browser-dynamic": "^17.3.0",
|
"@angular/router": "^19.0.5",
|
||||||
"@angular/router": "^17.3.0",
|
|
||||||
"rxjs": "~7.8.0",
|
"rxjs": "~7.8.0",
|
||||||
"tslib": "^2.3.0",
|
"tslib": "^2.3.0",
|
||||||
"zone.js": "~0.14.3"
|
"zone.js": "~0.15.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@angular-devkit/build-angular": "^17.3.4",
|
"@angular-devkit/build-angular": "^19.0.6",
|
||||||
"@angular/cli": "^17.3.4",
|
"@angular/cli": "^19.0.6",
|
||||||
"@angular/compiler-cli": "^17.3.0",
|
"@angular/compiler-cli": "^19.0.5",
|
||||||
"@types/jasmine": "~5.1.0",
|
"@types/jasmine": "~5.1.0",
|
||||||
"jasmine-core": "~5.1.0",
|
"jasmine-core": "~5.1.0",
|
||||||
"karma": "~6.4.0",
|
"karma": "~6.4.0",
|
||||||
@ -36,6 +35,6 @@
|
|||||||
"karma-coverage": "~2.2.0",
|
"karma-coverage": "~2.2.0",
|
||||||
"karma-jasmine": "~5.1.0",
|
"karma-jasmine": "~5.1.0",
|
||||||
"karma-jasmine-html-reporter": "~2.1.0",
|
"karma-jasmine-html-reporter": "~2.1.0",
|
||||||
"typescript": "~5.4.2"
|
"typescript": "~5.6.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
12802
front/pnpm-lock.yaml
generated
12802
front/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -3,7 +3,7 @@
|
|||||||
<button mat-icon-button class="favorite-icon" aria-label="icon-button with heart icon">
|
<button mat-icon-button class="favorite-icon" aria-label="icon-button with heart icon">
|
||||||
<mat-icon>favorite</mat-icon>
|
<mat-icon>favorite</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
<span>NF Repo</span>
|
<span>repo.me</span>
|
||||||
|
|
||||||
<div style="margin-left:auto;">
|
<div style="margin-left:auto;">
|
||||||
<button mat-icon-button matTooltip="帮我下载镜像" (click)="downloadImage()">
|
<button mat-icon-button matTooltip="帮我下载镜像" (click)="downloadImage()">
|
||||||
@ -29,9 +29,9 @@
|
|||||||
<td mat-cell *matCellDef="let element">
|
<td mat-cell *matCellDef="let element">
|
||||||
<button mat-icon-button aria-label="expand row" (click)="showTags($event, element)">
|
<button mat-icon-button aria-label="expand row" (click)="showTags($event, element)">
|
||||||
@if (expandedElement === element) {
|
@if (expandedElement === element) {
|
||||||
<mat-icon>keyboard_arrow_up</mat-icon>
|
<mat-icon>keyboard_arrow_up</mat-icon>
|
||||||
} @else {
|
} @else {
|
||||||
<mat-icon>keyboard_arrow_down</mat-icon>
|
<mat-icon>keyboard_arrow_down</mat-icon>
|
||||||
}
|
}
|
||||||
</button>
|
</button>
|
||||||
</td>
|
</td>
|
||||||
@ -74,12 +74,11 @@
|
|||||||
|
|
||||||
<ng-container matColumnDef="expandedDetail">
|
<ng-container matColumnDef="expandedDetail">
|
||||||
<td mat-cell *matCellDef="let element" [attr.colspan]="columnsToDisplayWithExpand.length">
|
<td mat-cell *matCellDef="let element" [attr.colspan]="columnsToDisplayWithExpand.length">
|
||||||
<div class="repo-element-detail"
|
<div class="repo-element-detail" [@detailExpand]="element == expandedElement ? 'expanded' : 'collapsed'">
|
||||||
[@detailExpand]="element == expandedElement ? 'expanded' : 'collapsed'">
|
|
||||||
@if (element.Tags) {
|
@if (element.Tags) {
|
||||||
@for (tag of element.Tags.list; track tag) {
|
@for (tag of element.Tags.list; track tag) {
|
||||||
<mat-chip-option color="primary">{{ tag.tag }}</mat-chip-option>
|
<mat-chip-option color="primary">{{ tag.tag }}</mat-chip-option>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
@ -87,10 +86,9 @@
|
|||||||
|
|
||||||
|
|
||||||
<tr mat-header-row *matHeaderRowDef="columnsToDisplayWithExpand"></tr>
|
<tr mat-header-row *matHeaderRowDef="columnsToDisplayWithExpand"></tr>
|
||||||
<tr mat-row *matRowDef="let element; columns: columnsToDisplayWithExpand;"
|
<tr mat-row *matRowDef="let element; columns: columnsToDisplayWithExpand;" class="repo-element-row"
|
||||||
class="repo-element-row"
|
[class.repo-expanded-row]="expandedElement === element"
|
||||||
[class.repo-expanded-row]="expandedElement === element"
|
(click)="expandedElement = expandedElement === element ? null : element">
|
||||||
(click)="expandedElement = expandedElement === element ? null : element">
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr mat-row *matRowDef="let row; columns: ['expandedDetail']" class="repo-detail-row"></tr>
|
<tr mat-row *matRowDef="let row; columns: ['expandedDetail']" class="repo-detail-row"></tr>
|
||||||
</table>
|
</table>
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
import {Component} from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import {Repo} from "./interface/repo";
|
import { Repo } from "./interface/repo";
|
||||||
import {RepoService} from "./service/repo.service";
|
import { RepoService } from "./service/repo.service";
|
||||||
import {FormControl, ReactiveFormsModule} from "@angular/forms";
|
import { FormControl, ReactiveFormsModule } from "@angular/forms";
|
||||||
import {MatToolbar} from "@angular/material/toolbar";
|
import { MatToolbar } from "@angular/material/toolbar";
|
||||||
import {MatIconButton} from "@angular/material/button";
|
import { MatIconButton } from "@angular/material/button";
|
||||||
import {MatFormField, MatLabel, MatSuffix} from "@angular/material/form-field";
|
import { MatFormField, MatLabel, MatSuffix } from "@angular/material/form-field";
|
||||||
import {MatTooltip} from "@angular/material/tooltip";
|
import { MatTooltip } from "@angular/material/tooltip";
|
||||||
import {MatIcon} from "@angular/material/icon";
|
import { MatIcon } from "@angular/material/icon";
|
||||||
import {MatInput} from "@angular/material/input";
|
import { MatInput } from "@angular/material/input";
|
||||||
import {Clipboard} from '@angular/cdk/clipboard';
|
import { Clipboard } from '@angular/cdk/clipboard';
|
||||||
import {
|
import {
|
||||||
MatCell,
|
MatCell,
|
||||||
MatCellDef,
|
MatCellDef,
|
||||||
@ -18,16 +18,15 @@ import {
|
|||||||
MatHeaderRow, MatHeaderRowDef, MatRow, MatRowDef,
|
MatHeaderRow, MatHeaderRowDef, MatRow, MatRowDef,
|
||||||
MatTable
|
MatTable
|
||||||
} from "@angular/material/table";
|
} from "@angular/material/table";
|
||||||
import {DatePipe} from "@angular/common";
|
import { DatePipe } from "@angular/common";
|
||||||
import {animate, state, style, transition, trigger} from "@angular/animations";
|
import { animate, state, style, transition, trigger } from "@angular/animations";
|
||||||
import {MatChipOption} from "@angular/material/chips";
|
import { MatChipOption } from "@angular/material/chips";
|
||||||
import {MatDialog} from "@angular/material/dialog";
|
import { MatDialog } from "@angular/material/dialog";
|
||||||
import {DownloadImageComponent} from "./component/download-image/download-image.component";
|
import { DownloadImageComponent } from "./component/download-image/download-image.component";
|
||||||
import {CapacityPipe} from "./pipe/capacity.pipe";
|
import { CapacityPipe } from "./pipe/capacity.pipe";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-root',
|
selector: 'app-root',
|
||||||
standalone: true,
|
|
||||||
imports: [
|
imports: [
|
||||||
MatToolbar,
|
MatToolbar,
|
||||||
MatIconButton,
|
MatIconButton,
|
||||||
@ -56,11 +55,11 @@ import {CapacityPipe} from "./pipe/capacity.pipe";
|
|||||||
styleUrl: './app.component.scss',
|
styleUrl: './app.component.scss',
|
||||||
animations: [
|
animations: [
|
||||||
trigger('detailExpand', [
|
trigger('detailExpand', [
|
||||||
state('collapsed', style({height: '0px', minHeight: '0'})),
|
state('collapsed', style({ height: '0px', minHeight: '0' })),
|
||||||
state('expanded', style({height: '*'})),
|
state('expanded', style({ height: '*' })),
|
||||||
transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),
|
transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),
|
||||||
]),
|
]),
|
||||||
],
|
]
|
||||||
})
|
})
|
||||||
export class AppComponent {
|
export class AppComponent {
|
||||||
title = 'front';
|
title = 'front';
|
||||||
@ -91,10 +90,10 @@ export class AppComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
copyImageCommand(item: Repo) {
|
copyImageCommand(item: Repo) {
|
||||||
this.clipboard.copy(`docker pull ${this.repo_svc.settings().base_address}/${item.repo}:${item.tag}`)
|
this.clipboard.copy(`docker pull ${this.repo_svc.settings().repo_name}/${item.repo}:${item.tag}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
downloadImage() {
|
downloadImage() {
|
||||||
this.dialog.open(DownloadImageComponent, {data: {}})
|
this.dialog.open(DownloadImageComponent, { data: {} })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@ import {provideRouter} from '@angular/router';
|
|||||||
|
|
||||||
import {routes} from './app.routes';
|
import {routes} from './app.routes';
|
||||||
import {alerterInterceptor} from "./interceptor/alerter.interceptor";
|
import {alerterInterceptor} from "./interceptor/alerter.interceptor";
|
||||||
import {HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi} from "@angular/common/http";
|
import { HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi } from "@angular/common/http";
|
||||||
import {provideAnimations} from "@angular/platform-browser/animations";
|
import {provideAnimations} from "@angular/platform-browser/animations";
|
||||||
|
|
||||||
|
|
||||||
|
@ -7,7 +7,8 @@
|
|||||||
<mat-dialog-content class="mat-typography">
|
<mat-dialog-content class="mat-typography">
|
||||||
<p>
|
<p>
|
||||||
<mat-form-field appearance="outline">
|
<mat-form-field appearance="outline">
|
||||||
<mat-label>云上镜像名称</mat-label>
|
<mat-label style="margin-left: 1.5rem">云上镜像名称</mat-label>
|
||||||
|
<span matTextPrefix>library/</span>
|
||||||
<input matInput placeholder="golang:1.22.2-alpine3.19" [(ngModel)]="source">
|
<input matInput placeholder="golang:1.22.2-alpine3.19" [(ngModel)]="source">
|
||||||
<mat-icon matSuffix>clear</mat-icon>
|
<mat-icon matSuffix>clear</mat-icon>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
@ -15,7 +16,7 @@
|
|||||||
<p>
|
<p>
|
||||||
<mat-form-field appearance="outline">
|
<mat-form-field appearance="outline">
|
||||||
<mat-label style="margin-left: 1.5rem">本地镜像名称</mat-label>
|
<mat-label style="margin-left: 1.5rem">本地镜像名称</mat-label>
|
||||||
<span matTextPrefix>{{ repo_svc.settings().base_address + '/ ' }}</span>
|
<span matTextPrefix>{{ repo_svc.settings().repo_name + '/ ' }}</span>
|
||||||
<input matInput placeholder="external/golang:latest" [(ngModel)]="target">
|
<input matInput placeholder="external/golang:latest" [(ngModel)]="target">
|
||||||
<mat-icon matSuffix>clear</mat-icon>
|
<mat-icon matSuffix>clear</mat-icon>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {Component} from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import {
|
import {
|
||||||
MatDialogActions,
|
MatDialogActions,
|
||||||
MatDialogClose,
|
MatDialogClose,
|
||||||
@ -6,20 +6,19 @@ import {
|
|||||||
MatDialogRef,
|
MatDialogRef,
|
||||||
MatDialogTitle
|
MatDialogTitle
|
||||||
} from "@angular/material/dialog";
|
} from "@angular/material/dialog";
|
||||||
import {MatButton} from "@angular/material/button";
|
import { MatButton } from "@angular/material/button";
|
||||||
import {MatFormField, MatLabel, MatPrefix, MatSuffix} from "@angular/material/form-field";
|
import { MatFormField, MatLabel, MatPrefix, MatSuffix } from "@angular/material/form-field";
|
||||||
import {MatInput} from "@angular/material/input";
|
import { MatInput } from "@angular/material/input";
|
||||||
import {MatIcon} from "@angular/material/icon";
|
import { MatIcon } from "@angular/material/icon";
|
||||||
import {RepoService} from "../../service/repo.service";
|
import { RepoService } from "../../service/repo.service";
|
||||||
import {HttpClient} from "@angular/common/http";
|
import { HttpClient } from "@angular/common/http";
|
||||||
import {FormsModule} from "@angular/forms";
|
import { FormsModule } from "@angular/forms";
|
||||||
import {CdkConnectedOverlay, CdkOverlayOrigin} from "@angular/cdk/overlay";
|
import { CdkConnectedOverlay, CdkOverlayOrigin } from "@angular/cdk/overlay";
|
||||||
import {MatProgressSpinner} from "@angular/material/progress-spinner";
|
import { MatProgressSpinner } from "@angular/material/progress-spinner";
|
||||||
import {MsgService} from "../../service/msg.service";
|
import { MsgService } from "../../service/msg.service";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-download-image',
|
selector: 'app-download-image',
|
||||||
standalone: true,
|
|
||||||
imports: [
|
imports: [
|
||||||
MatDialogTitle,
|
MatDialogTitle,
|
||||||
MatDialogContent,
|
MatDialogContent,
|
||||||
@ -33,9 +32,7 @@ import {MsgService} from "../../service/msg.service";
|
|||||||
MatFormField,
|
MatFormField,
|
||||||
MatPrefix,
|
MatPrefix,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
CdkConnectedOverlay,
|
|
||||||
MatProgressSpinner,
|
MatProgressSpinner,
|
||||||
CdkOverlayOrigin
|
|
||||||
],
|
],
|
||||||
templateUrl: './download-image.component.html',
|
templateUrl: './download-image.component.html',
|
||||||
styleUrl: './download-image.component.scss'
|
styleUrl: './download-image.component.scss'
|
||||||
@ -48,7 +45,7 @@ export class DownloadImageComponent {
|
|||||||
title = '下载云上镜像'
|
title = '下载云上镜像'
|
||||||
inProgress = false
|
inProgress = false
|
||||||
|
|
||||||
readonly url_proxy_download = '/api/repo/proxy'
|
readonly url_proxy_download = '/_api/repo/proxy'
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
public repo_svc: RepoService,
|
public repo_svc: RepoService,
|
||||||
@ -67,14 +64,14 @@ export class DownloadImageComponent {
|
|||||||
async proxyDownload() {
|
async proxyDownload() {
|
||||||
const response = await fetch(this.url_proxy_download, {
|
const response = await fetch(this.url_proxy_download, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
body: JSON.stringify({target: this.target, source: this.source, proxy: this.proxy}),
|
body: JSON.stringify({ target: this.target, source: this.source, proxy: this.proxy }),
|
||||||
headers: {"Content-Type": "application/json"},
|
headers: { "Content-Type": "application/json" },
|
||||||
})
|
})
|
||||||
const reader = response.body?.pipeThrough(new TextDecoderStream()).getReader()
|
const reader = response.body?.pipeThrough(new TextDecoderStream()).getReader()
|
||||||
if (reader) {
|
if (reader) {
|
||||||
this.inProgress = true
|
this.inProgress = true
|
||||||
while (true) {
|
while (true) {
|
||||||
const {value, done} = await reader.read()
|
const { value, done } = await reader.read()
|
||||||
if (done) {
|
if (done) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,4 @@
|
|||||||
import {
|
import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest, HttpResponse } from '@angular/common/http';
|
||||||
HttpEvent,
|
|
||||||
HttpHandler,
|
|
||||||
HttpInterceptor,
|
|
||||||
HttpRequest,
|
|
||||||
HttpResponse
|
|
||||||
} from '@angular/common/http';
|
|
||||||
import {map, Observable} from "rxjs";
|
import {map, Observable} from "rxjs";
|
||||||
import {Response} from "../interface/response";
|
import {Response} from "../interface/response";
|
||||||
import {MsgService} from "../service/msg.service";
|
import {MsgService} from "../service/msg.service";
|
||||||
|
@ -17,5 +17,5 @@ export interface Repo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface Settings {
|
export interface Settings {
|
||||||
base_address: string
|
repo_name: string
|
||||||
}
|
}
|
||||||
|
@ -95,8 +95,8 @@ export class MsgService {
|
|||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'snack-message-success',
|
selector: 'snack-message-success',
|
||||||
template: `
|
template: `
|
||||||
<div class="snack-message-success snack-message">
|
<div class="snack-message-success snack-message">
|
||||||
<div>
|
<div>
|
||||||
<mat-icon>cancel</mat-icon>
|
<mat-icon>cancel</mat-icon>
|
||||||
@ -106,11 +106,10 @@ export class MsgService {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`,
|
`,
|
||||||
standalone: true,
|
imports: [
|
||||||
imports: [
|
MatIconModule
|
||||||
MatIconModule
|
],
|
||||||
],
|
styles: [`
|
||||||
styles: [`
|
|
||||||
.snack-message-success {
|
.snack-message-success {
|
||||||
}
|
}
|
||||||
`]
|
`]
|
||||||
@ -126,8 +125,8 @@ export class SnackMessageSuccess {
|
|||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'snack-message-info',
|
selector: 'snack-message-info',
|
||||||
template: `
|
template: `
|
||||||
<div class="snack-message-info snack-message">
|
<div class="snack-message-info snack-message">
|
||||||
<div>
|
<div>
|
||||||
<mat-icon>cancel</mat-icon>
|
<mat-icon>cancel</mat-icon>
|
||||||
@ -137,11 +136,10 @@ export class SnackMessageSuccess {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`,
|
`,
|
||||||
standalone: true,
|
imports: [
|
||||||
imports: [
|
MatIconModule
|
||||||
MatIconModule
|
],
|
||||||
],
|
styles: [`
|
||||||
styles: [`
|
|
||||||
.snack-message-info {
|
.snack-message-info {
|
||||||
}
|
}
|
||||||
`]
|
`]
|
||||||
@ -156,8 +154,8 @@ export class SnackMessageInfo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'snack-message-warning',
|
selector: 'snack-message-warning',
|
||||||
template: `
|
template: `
|
||||||
<div class="snack-message-warning snack-message">
|
<div class="snack-message-warning snack-message">
|
||||||
<div>
|
<div>
|
||||||
<mat-icon>cancel</mat-icon>
|
<mat-icon>cancel</mat-icon>
|
||||||
@ -167,11 +165,10 @@ export class SnackMessageInfo {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`,
|
`,
|
||||||
standalone: true,
|
imports: [
|
||||||
imports: [
|
MatIconModule
|
||||||
MatIconModule
|
],
|
||||||
],
|
styles: [`
|
||||||
styles: [`
|
|
||||||
.snack-message-warning {
|
.snack-message-warning {
|
||||||
}
|
}
|
||||||
`]
|
`]
|
||||||
@ -186,8 +183,8 @@ export class SnackMessageWarning {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'snack-message-error',
|
selector: 'snack-message-error',
|
||||||
template: `
|
template: `
|
||||||
<div class="snack-message-error snack-message">
|
<div class="snack-message-error snack-message">
|
||||||
<div>
|
<div>
|
||||||
<mat-icon>cancel</mat-icon>
|
<mat-icon>cancel</mat-icon>
|
||||||
@ -197,11 +194,10 @@ export class SnackMessageWarning {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`,
|
`,
|
||||||
standalone: true,
|
imports: [
|
||||||
imports: [
|
MatIconModule
|
||||||
MatIconModule
|
],
|
||||||
],
|
styles: [`
|
||||||
styles: [`
|
|
||||||
`]
|
`]
|
||||||
})
|
})
|
||||||
export class SnackMessageError {
|
export class SnackMessageError {
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import {Injectable, signal, WritableSignal} from '@angular/core';
|
import { Injectable, signal, WritableSignal } from '@angular/core';
|
||||||
import {Repo, Settings} from '../interface/repo'
|
import { Repo, Settings } from '../interface/repo'
|
||||||
import {Response} from "../interface/response";
|
import { Response } from "../interface/response";
|
||||||
import {HttpClient} from "@angular/common/http";
|
import { HttpClient } from "@angular/common/http";
|
||||||
import {MsgService} from "./msg.service";
|
import { MsgService } from "./msg.service";
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
@ -10,14 +10,14 @@ import {MsgService} from "./msg.service";
|
|||||||
export class RepoService {
|
export class RepoService {
|
||||||
|
|
||||||
readonly init_catalog = [
|
readonly init_catalog = [
|
||||||
{id: 1, created_at: 1713164091576, updated_at: 1713164091576, digest_id: 1, repo: "external/golang", tag: "latest"},
|
{ id: 1, created_at: 1713164091576, updated_at: 1713164091576, digest_id: 1, repo: "external/golang", tag: "latest" },
|
||||||
{id: 2, created_at: 1713164091576, updated_at: 1713164091576, digest_id: 2, repo: "external/alpine", tag: "latest"},
|
{ id: 2, created_at: 1713164091576, updated_at: 1713164091576, digest_id: 2, repo: "external/alpine", tag: "latest" },
|
||||||
{id: 3, created_at: 1713164091576, updated_at: 1713164091576, digest_id: 3, repo: "external/nginx", tag: "latest"},
|
{ id: 3, created_at: 1713164091576, updated_at: 1713164091576, digest_id: 3, repo: "external/nginx", tag: "latest" },
|
||||||
] as Repo[]
|
] as Repo[]
|
||||||
|
|
||||||
readonly url_settings = '/api/repo/settings'
|
readonly url_settings = '/_api/repo/settings'
|
||||||
readonly url_catalog = '/api/repo/list'
|
readonly url_catalog = '/_api/repo/list'
|
||||||
readonly url_tag = '/api/repo/tag/list'
|
readonly url_tag = '/_api/repo/tag/list'
|
||||||
|
|
||||||
settings = signal({} as Settings)
|
settings = signal({} as Settings)
|
||||||
|
|
||||||
@ -58,7 +58,7 @@ export class RepoService {
|
|||||||
}).subscribe(res => {
|
}).subscribe(res => {
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
this.catalog.update(v => {
|
this.catalog.update(v => {
|
||||||
return {...v, limit: limit, last: last, keyword: keyword, list: res.data.list, total: res.data.total}
|
return { ...v, limit: limit, last: last, keyword: keyword, list: res.data.list, total: res.data.total }
|
||||||
})
|
})
|
||||||
|
|
||||||
return
|
return
|
||||||
|
@ -1,15 +1,18 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>Front</title>
|
<title>❤repo️</title>
|
||||||
<base href="/">
|
<base href="/">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet">
|
||||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="mat-typography">
|
<body class="mat-typography">
|
||||||
<app-root></app-root>
|
<app-root></app-root>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"/api": {
|
"/_api": {
|
||||||
"target": "https://repo.me",
|
"target": "http://127.0.0.1:8383",
|
||||||
"secure": false
|
"secure": false
|
||||||
}
|
}
|
||||||
}
|
}
|
74
go.mod
74
go.mod
@ -7,24 +7,17 @@ require (
|
|||||||
github.com/aws/aws-sdk-go-v2/config v1.27.11
|
github.com/aws/aws-sdk-go-v2/config v1.27.11
|
||||||
github.com/aws/aws-sdk-go-v2/credentials v1.17.11
|
github.com/aws/aws-sdk-go-v2/credentials v1.17.11
|
||||||
github.com/aws/aws-sdk-go-v2/service/s3 v1.53.1
|
github.com/aws/aws-sdk-go-v2/service/s3 v1.53.1
|
||||||
github.com/containers/image/v5 v5.30.0
|
|
||||||
github.com/glebarez/sqlite v1.11.0
|
github.com/glebarez/sqlite v1.11.0
|
||||||
github.com/google/go-containerregistry v0.19.0
|
github.com/google/go-containerregistry v0.19.0
|
||||||
github.com/jackc/pgtype v1.14.3
|
github.com/jackc/pgtype v1.14.3
|
||||||
github.com/loveuer/nf v0.2.1
|
github.com/jedib0t/go-pretty/v6 v6.6.5
|
||||||
github.com/opencontainers/go-digest v1.0.0
|
github.com/loveuer/nf v0.3.0
|
||||||
github.com/samber/lo v1.39.0
|
github.com/samber/lo v1.39.0
|
||||||
github.com/sirupsen/logrus v1.9.3
|
|
||||||
github.com/spf13/cast v1.6.0
|
github.com/spf13/cast v1.6.0
|
||||||
gorm.io/gorm v1.25.9
|
gorm.io/gorm v1.25.9
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
dario.cat/mergo v1.0.0 // indirect
|
|
||||||
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect
|
|
||||||
github.com/BurntSushi/toml v1.3.2 // indirect
|
|
||||||
github.com/Microsoft/go-winio v0.6.1 // indirect
|
|
||||||
github.com/Microsoft/hcsshim v0.12.0-rc.3 // indirect
|
|
||||||
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2 // indirect
|
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2 // indirect
|
||||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1 // indirect
|
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1 // indirect
|
||||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5 // indirect
|
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5 // indirect
|
||||||
@ -39,79 +32,38 @@ require (
|
|||||||
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.4 // indirect
|
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.4 // indirect
|
||||||
github.com/aws/aws-sdk-go-v2/service/sts v1.28.6 // indirect
|
github.com/aws/aws-sdk-go-v2/service/sts v1.28.6 // indirect
|
||||||
github.com/aws/smithy-go v1.20.2 // indirect
|
github.com/aws/smithy-go v1.20.2 // indirect
|
||||||
github.com/containerd/cgroups/v3 v3.0.2 // indirect
|
|
||||||
github.com/containerd/errdefs v0.1.0 // indirect
|
|
||||||
github.com/containerd/stargz-snapshotter/estargz v0.15.1 // indirect
|
github.com/containerd/stargz-snapshotter/estargz v0.15.1 // indirect
|
||||||
github.com/containers/libtrust v0.0.0-20230121012942-c1716e8a8d01 // indirect
|
|
||||||
github.com/containers/ocicrypt v1.1.9 // indirect
|
|
||||||
github.com/containers/storage v1.53.0 // indirect
|
|
||||||
github.com/cyphar/filepath-securejoin v0.2.4 // indirect
|
|
||||||
github.com/distribution/reference v0.5.0 // indirect
|
|
||||||
github.com/docker/cli v25.0.3+incompatible // indirect
|
github.com/docker/cli v25.0.3+incompatible // indirect
|
||||||
github.com/docker/distribution v2.8.3+incompatible // indirect
|
github.com/docker/distribution v2.8.3+incompatible // indirect
|
||||||
github.com/docker/docker v25.0.3+incompatible // indirect
|
github.com/docker/docker v25.0.3+incompatible // indirect
|
||||||
github.com/docker/docker-credential-helpers v0.8.1 // indirect
|
github.com/docker/docker-credential-helpers v0.8.1 // indirect
|
||||||
github.com/docker/go-connections v0.5.0 // indirect
|
|
||||||
github.com/docker/go-units v0.5.0 // indirect
|
|
||||||
github.com/dustin/go-humanize v1.0.1 // indirect
|
github.com/dustin/go-humanize v1.0.1 // indirect
|
||||||
github.com/fatih/color v1.17.0 // indirect
|
github.com/fatih/color v1.18.0 // indirect
|
||||||
github.com/felixge/httpsnoop v1.0.4 // indirect
|
|
||||||
github.com/glebarez/go-sqlite v1.21.2 // indirect
|
github.com/glebarez/go-sqlite v1.21.2 // indirect
|
||||||
github.com/go-logr/logr v1.4.1 // indirect
|
github.com/google/go-cmp v0.6.0 // indirect
|
||||||
github.com/go-logr/stdr v1.2.2 // indirect
|
|
||||||
github.com/gogo/protobuf v1.3.2 // indirect
|
|
||||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
|
|
||||||
github.com/google/go-intervals v0.0.2 // indirect
|
|
||||||
github.com/google/uuid v1.6.0 // indirect
|
github.com/google/uuid v1.6.0 // indirect
|
||||||
github.com/gorilla/mux v1.8.1 // indirect
|
|
||||||
github.com/hashicorp/errwrap v1.1.0 // indirect
|
|
||||||
github.com/hashicorp/go-multierror v1.1.1 // indirect
|
|
||||||
github.com/jackc/pgio v1.0.0 // indirect
|
github.com/jackc/pgio v1.0.0 // indirect
|
||||||
github.com/jinzhu/inflection v1.0.0 // indirect
|
github.com/jinzhu/inflection v1.0.0 // indirect
|
||||||
github.com/jinzhu/now v1.1.5 // indirect
|
github.com/jinzhu/now v1.1.5 // indirect
|
||||||
github.com/json-iterator/go v1.1.12 // indirect
|
|
||||||
github.com/klauspost/compress v1.17.7 // indirect
|
github.com/klauspost/compress v1.17.7 // indirect
|
||||||
github.com/klauspost/pgzip v1.2.6 // indirect
|
|
||||||
github.com/mattn/go-colorable v0.1.13 // indirect
|
github.com/mattn/go-colorable v0.1.13 // indirect
|
||||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||||
github.com/mattn/go-shellwords v1.0.12 // indirect
|
github.com/mattn/go-runewidth v0.0.15 // indirect
|
||||||
github.com/mattn/go-sqlite3 v1.14.22 // indirect
|
|
||||||
github.com/mistifyio/go-zfs/v3 v3.0.1 // indirect
|
|
||||||
github.com/mitchellh/go-homedir v1.1.0 // indirect
|
github.com/mitchellh/go-homedir v1.1.0 // indirect
|
||||||
github.com/moby/sys/mountinfo v0.7.1 // indirect
|
github.com/opencontainers/go-digest v1.0.0 // indirect
|
||||||
github.com/moby/sys/user v0.1.0 // indirect
|
|
||||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
|
||||||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
|
||||||
github.com/opencontainers/image-spec v1.1.0 // indirect
|
github.com/opencontainers/image-spec v1.1.0 // indirect
|
||||||
github.com/opencontainers/runtime-spec v1.2.0 // indirect
|
|
||||||
github.com/opencontainers/selinux v1.11.0 // indirect
|
|
||||||
github.com/ostreedev/ostree-go v0.0.0-20210805093236-719684c64e4f // indirect
|
|
||||||
github.com/pkg/errors v0.9.1 // indirect
|
github.com/pkg/errors v0.9.1 // indirect
|
||||||
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
|
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
|
||||||
|
github.com/rivo/uniseg v0.2.0 // indirect
|
||||||
github.com/rogpeppe/go-internal v1.12.0 // indirect
|
github.com/rogpeppe/go-internal v1.12.0 // indirect
|
||||||
github.com/sylabs/sif/v2 v2.15.1 // indirect
|
github.com/sirupsen/logrus v1.9.3 // indirect
|
||||||
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 // indirect
|
github.com/stretchr/testify v1.9.0 // indirect
|
||||||
github.com/tchap/go-patricia/v2 v2.3.1 // indirect
|
|
||||||
github.com/ulikunitz/xz v0.5.11 // indirect
|
|
||||||
github.com/vbatts/tar-split v0.11.5 // indirect
|
github.com/vbatts/tar-split v0.11.5 // indirect
|
||||||
go.opencensus.io v0.24.0 // indirect
|
|
||||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 // indirect
|
|
||||||
go.opentelemetry.io/otel v1.25.0 // indirect
|
|
||||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.25.0 // indirect
|
|
||||||
go.opentelemetry.io/otel/metric v1.25.0 // indirect
|
|
||||||
go.opentelemetry.io/otel/sdk v1.25.0 // indirect
|
|
||||||
go.opentelemetry.io/otel/trace v1.25.0 // indirect
|
|
||||||
go.opentelemetry.io/proto/otlp v1.2.0 // indirect
|
|
||||||
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect
|
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect
|
||||||
golang.org/x/mod v0.15.0 // indirect
|
golang.org/x/sync v0.10.0 // indirect
|
||||||
golang.org/x/sync v0.6.0 // indirect
|
golang.org/x/sys v0.28.0 // indirect
|
||||||
golang.org/x/sys v0.18.0 // indirect
|
golang.org/x/text v0.21.0 // indirect
|
||||||
golang.org/x/time v0.3.0 // indirect
|
gotest.tools/v3 v3.5.1 // indirect
|
||||||
golang.org/x/tools v0.18.0 // indirect
|
|
||||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect
|
|
||||||
google.golang.org/grpc v1.63.0 // indirect
|
|
||||||
google.golang.org/protobuf v1.33.0 // indirect
|
|
||||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
|
||||||
modernc.org/libc v1.22.5 // indirect
|
modernc.org/libc v1.22.5 // indirect
|
||||||
modernc.org/mathutil v1.5.0 // indirect
|
modernc.org/mathutil v1.5.0 // indirect
|
||||||
modernc.org/memory v1.5.0 // indirect
|
modernc.org/memory v1.5.0 // indirect
|
||||||
|
267
go.sum
267
go.sum
@ -1,18 +1,5 @@
|
|||||||
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
|
||||||
dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk=
|
|
||||||
dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk=
|
|
||||||
github.com/14rcole/gopopulate v0.0.0-20180821133914-b175b219e774 h1:SCbEWT58NSt7d2mcFdvxC9uyrdcTfvBbPLThhkDmXzg=
|
|
||||||
github.com/14rcole/gopopulate v0.0.0-20180821133914-b175b219e774/go.mod h1:6/0dYRLLXyJjbkIPeeGyoJ/eKOSI0eU6eTlCBYibgd0=
|
|
||||||
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0=
|
|
||||||
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E=
|
|
||||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||||
github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8=
|
|
||||||
github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
|
|
||||||
github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=
|
github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=
|
||||||
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/Microsoft/hcsshim v0.12.0-rc.3 h1:5GNGrobGs/sN/0nFO21W9k4lFn+iXXZAE8fCZbmdRak=
|
|
||||||
github.com/Microsoft/hcsshim v0.12.0-rc.3/go.mod h1:WuNfcaYNaw+KpCEsZCIM6HCEmu0c5HfXpi+dDSmveP0=
|
|
||||||
github.com/aws/aws-sdk-go-v2 v1.26.1 h1:5554eUqIYVWpU0YmeeYZ0wU64H2VLBs8TlhRB2L+EkA=
|
github.com/aws/aws-sdk-go-v2 v1.26.1 h1:5554eUqIYVWpU0YmeeYZ0wU64H2VLBs8TlhRB2L+EkA=
|
||||||
github.com/aws/aws-sdk-go-v2 v1.26.1/go.mod h1:ffIFB97e2yNsv4aTSGkqtHnppsIJzw7G7BReUZ3jCXM=
|
github.com/aws/aws-sdk-go-v2 v1.26.1/go.mod h1:ffIFB97e2yNsv4aTSGkqtHnppsIJzw7G7BReUZ3jCXM=
|
||||||
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2 h1:x6xsQXGSmW6frevwDA+vi/wqhp1ct18mVXYN08/93to=
|
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2 h1:x6xsQXGSmW6frevwDA+vi/wqhp1ct18mVXYN08/93to=
|
||||||
@ -49,42 +36,15 @@ github.com/aws/aws-sdk-go-v2/service/sts v1.28.6 h1:cwIxeBttqPN3qkaAjcEcsh8NYr8n
|
|||||||
github.com/aws/aws-sdk-go-v2/service/sts v1.28.6/go.mod h1:FZf1/nKNEkHdGGJP/cI2MoIMquumuRK6ol3QQJNDxmw=
|
github.com/aws/aws-sdk-go-v2/service/sts v1.28.6/go.mod h1:FZf1/nKNEkHdGGJP/cI2MoIMquumuRK6ol3QQJNDxmw=
|
||||||
github.com/aws/smithy-go v1.20.2 h1:tbp628ireGtzcHDDmLT/6ADHidqnwgF57XOXZe6tp4Q=
|
github.com/aws/smithy-go v1.20.2 h1:tbp628ireGtzcHDDmLT/6ADHidqnwgF57XOXZe6tp4Q=
|
||||||
github.com/aws/smithy-go v1.20.2/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E=
|
github.com/aws/smithy-go v1.20.2/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E=
|
||||||
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
|
|
||||||
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
|
|
||||||
github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM=
|
|
||||||
github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
|
|
||||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
|
||||||
github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
|
|
||||||
github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
|
||||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
|
||||||
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
|
|
||||||
github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ=
|
github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ=
|
||||||
github.com/containerd/cgroups/v3 v3.0.2 h1:f5WFqIVSgo5IZmtTT3qVBo6TzI1ON6sycSBKkymb9L0=
|
|
||||||
github.com/containerd/cgroups/v3 v3.0.2/go.mod h1:JUgITrzdFqp42uI2ryGA+ge0ap/nxzYgkGmIcetmErE=
|
|
||||||
github.com/containerd/errdefs v0.1.0 h1:m0wCRBiu1WJT/Fr+iOoQHMQS/eP5myQ8lCv4Dz5ZURM=
|
|
||||||
github.com/containerd/errdefs v0.1.0/go.mod h1:YgWiiHtLmSeBrvpw+UfPijzbLaB77mEG1WwJTDETIV0=
|
|
||||||
github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I=
|
|
||||||
github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo=
|
|
||||||
github.com/containerd/stargz-snapshotter/estargz v0.15.1 h1:eXJjw9RbkLFgioVaTG+G/ZW/0kEe2oEKCdS/ZxIyoCU=
|
github.com/containerd/stargz-snapshotter/estargz v0.15.1 h1:eXJjw9RbkLFgioVaTG+G/ZW/0kEe2oEKCdS/ZxIyoCU=
|
||||||
github.com/containerd/stargz-snapshotter/estargz v0.15.1/go.mod h1:gr2RNwukQ/S9Nv33Lt6UC7xEx58C+LHRdoqbEKjz1Kk=
|
github.com/containerd/stargz-snapshotter/estargz v0.15.1/go.mod h1:gr2RNwukQ/S9Nv33Lt6UC7xEx58C+LHRdoqbEKjz1Kk=
|
||||||
github.com/containers/image/v5 v5.30.0 h1:CmHeSwI6W2kTRWnUsxATDFY5TEX4b58gPkaQcEyrLIA=
|
|
||||||
github.com/containers/image/v5 v5.30.0/go.mod h1:gSD8MVOyqBspc0ynLsuiMR9qmt8UQ4jpVImjmK0uXfk=
|
|
||||||
github.com/containers/libtrust v0.0.0-20230121012942-c1716e8a8d01 h1:Qzk5C6cYglewc+UyGf6lc8Mj2UaPTHy/iF2De0/77CA=
|
|
||||||
github.com/containers/libtrust v0.0.0-20230121012942-c1716e8a8d01/go.mod h1:9rfv8iPl1ZP7aqh9YA68wnZv2NUDbXdcdPHVz0pFbPY=
|
|
||||||
github.com/containers/ocicrypt v1.1.9 h1:2Csfba4jse85Raxk5HIyEk8OwZNjRvfkhEGijOjIdEM=
|
|
||||||
github.com/containers/ocicrypt v1.1.9/go.mod h1:dTKx1918d8TDkxXvarscpNVY+lyPakPNFN4jwA9GBys=
|
|
||||||
github.com/containers/storage v1.53.0 h1:VSES3C/u1pxjTJIXvLrSmyP7OBtDky04oGu07UvdTEA=
|
|
||||||
github.com/containers/storage v1.53.0/go.mod h1:pujcoOSc+upx15Jirdkebhtd8uJiLwbSd/mYT6zDJK8=
|
|
||||||
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
|
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
|
||||||
github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
|
github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
|
||||||
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
|
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
|
||||||
github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg=
|
|
||||||
github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4=
|
|
||||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
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/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0=
|
|
||||||
github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
|
|
||||||
github.com/docker/cli v25.0.3+incompatible h1:KLeNs7zws74oFuVhgZQ5ONGZiXUUdgsdy6/EsX/6284=
|
github.com/docker/cli v25.0.3+incompatible h1:KLeNs7zws74oFuVhgZQ5ONGZiXUUdgsdy6/EsX/6284=
|
||||||
github.com/docker/cli v25.0.3+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
|
github.com/docker/cli v25.0.3+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
|
||||||
github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk=
|
github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk=
|
||||||
@ -93,22 +53,10 @@ github.com/docker/docker v25.0.3+incompatible h1:D5fy/lYmY7bvZa0XTZ5/UJPljor41F+
|
|||||||
github.com/docker/docker v25.0.3+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
|
github.com/docker/docker v25.0.3+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
|
||||||
github.com/docker/docker-credential-helpers v0.8.1 h1:j/eKUktUltBtMzKqmfLB0PAgqYyMHOp5vfsD1807oKo=
|
github.com/docker/docker-credential-helpers v0.8.1 h1:j/eKUktUltBtMzKqmfLB0PAgqYyMHOp5vfsD1807oKo=
|
||||||
github.com/docker/docker-credential-helpers v0.8.1/go.mod h1:P3ci7E3lwkZg6XiHdRKft1KckHiO9a2rNtyFbZ/ry9M=
|
github.com/docker/docker-credential-helpers v0.8.1/go.mod h1:P3ci7E3lwkZg6XiHdRKft1KckHiO9a2rNtyFbZ/ry9M=
|
||||||
github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c=
|
|
||||||
github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc=
|
|
||||||
github.com/docker/go-metrics v0.0.1 h1:AgB/0SvBxihN0X8OR4SjsblXkbMvalQ8cjmtKQ2rQV8=
|
|
||||||
github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw=
|
|
||||||
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/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
|
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
|
||||||
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
|
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
|
||||||
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM=
|
||||||
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU=
|
||||||
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
|
|
||||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
|
||||||
github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4=
|
|
||||||
github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI=
|
|
||||||
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
|
|
||||||
github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
|
|
||||||
github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
|
github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
|
||||||
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
|
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
|
||||||
github.com/glebarez/go-sqlite v1.21.2 h1:3a6LFC4sKahUunAmynQKLZceZCOzUthkRkEAl9gAXWo=
|
github.com/glebarez/go-sqlite v1.21.2 h1:3a6LFC4sKahUunAmynQKLZceZCOzUthkRkEAl9gAXWo=
|
||||||
@ -117,60 +65,17 @@ github.com/glebarez/sqlite v1.11.0 h1:wSG0irqzP6VurnMEpFGer5Li19RpIRi2qvQz++w0GM
|
|||||||
github.com/glebarez/sqlite v1.11.0/go.mod h1:h8/o8j5wiAsqSPoWELDUdJXhjAhsVliSn7bWZjOhrgQ=
|
github.com/glebarez/sqlite v1.11.0/go.mod h1:h8/o8j5wiAsqSPoWELDUdJXhjAhsVliSn7bWZjOhrgQ=
|
||||||
github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY=
|
github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY=
|
||||||
github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=
|
github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=
|
||||||
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
|
||||||
github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
|
|
||||||
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
|
|
||||||
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
|
|
||||||
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
|
|
||||||
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
|
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
|
||||||
github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
|
github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
|
||||||
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
|
|
||||||
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
|
|
||||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
|
||||||
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
|
||||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE=
|
|
||||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
|
||||||
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
|
||||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
|
||||||
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
|
||||||
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
|
|
||||||
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
|
|
||||||
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
|
|
||||||
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
|
|
||||||
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
|
|
||||||
github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
|
|
||||||
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
|
||||||
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
|
|
||||||
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
|
|
||||||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
|
||||||
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
|
||||||
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
|
||||||
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
|
||||||
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
|
||||||
github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
|
||||||
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
|
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
|
||||||
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||||
github.com/google/go-containerregistry v0.19.0 h1:uIsMRBV7m/HDkDxE/nXMnv1q+lOOSPlQ/ywc5JbB8Ic=
|
github.com/google/go-containerregistry v0.19.0 h1:uIsMRBV7m/HDkDxE/nXMnv1q+lOOSPlQ/ywc5JbB8Ic=
|
||||||
github.com/google/go-containerregistry v0.19.0/go.mod h1:u0qB2l7mvtWVR5kNcbFIhFY1hLbf8eeGapA+vbFDCtQ=
|
github.com/google/go-containerregistry v0.19.0/go.mod h1:u0qB2l7mvtWVR5kNcbFIhFY1hLbf8eeGapA+vbFDCtQ=
|
||||||
github.com/google/go-intervals v0.0.2 h1:FGrVEiUnTRKR8yE04qzXYaJMtnIYqobR5QbblK3ixcM=
|
|
||||||
github.com/google/go-intervals v0.0.2/go.mod h1:MkaR3LNRfeKLPmqgJYs4E66z5InYjmCjbbr4TQlcT6Y=
|
|
||||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
|
||||||
github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26 h1:Xim43kblpZXfIBQsbuBVKCudVG457BR2GZFIz3uw3hQ=
|
github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26 h1:Xim43kblpZXfIBQsbuBVKCudVG457BR2GZFIz3uw3hQ=
|
||||||
github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26/go.mod h1:dDKJzRmX4S37WGHujM7tX//fmj1uioxKzKxz3lo4HJo=
|
github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26/go.mod h1:dDKJzRmX4S37WGHujM7tX//fmj1uioxKzKxz3lo4HJo=
|
||||||
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
|
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
|
||||||
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
|
||||||
github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
|
||||||
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
||||||
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||||
github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY=
|
|
||||||
github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ=
|
|
||||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 h1:/c3QmbOGMGTOumP2iT/rCwB7b0QDGLKzqOmktBjT+Is=
|
|
||||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1/go.mod h1:5SN9VR2LTsRFsrEC6FHgRbTWrTHu6tqPeKxEQv15giM=
|
|
||||||
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
|
||||||
github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I=
|
|
||||||
github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
|
||||||
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
|
|
||||||
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
|
|
||||||
github.com/jackc/chunkreader v1.0.0 h1:4s39bBR8ByfqH+DKm8rQA3E1LHZWB9XWcrz8fqaZbe0=
|
github.com/jackc/chunkreader v1.0.0 h1:4s39bBR8ByfqH+DKm8rQA3E1LHZWB9XWcrz8fqaZbe0=
|
||||||
github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo=
|
github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo=
|
||||||
github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk=
|
github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk=
|
||||||
@ -221,18 +126,15 @@ github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0f
|
|||||||
github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
|
github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
|
||||||
github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
|
github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
|
||||||
github.com/jackc/puddle v1.3.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
|
github.com/jackc/puddle v1.3.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
|
||||||
|
github.com/jedib0t/go-pretty/v6 v6.6.5 h1:9PgMJOVBedpgYLI56jQRJYqngxYAAzfEUua+3NgSqAo=
|
||||||
|
github.com/jedib0t/go-pretty/v6 v6.6.5/go.mod h1:Uq/HrbhuFty5WSVNfjpQQe47x16RwVGXIveNGEyGtHs=
|
||||||
github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
|
github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
|
||||||
github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
|
github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
|
||||||
github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ=
|
github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ=
|
||||||
github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
|
github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
|
||||||
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
|
|
||||||
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
|
|
||||||
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
|
|
||||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||||
github.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg=
|
github.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg=
|
||||||
github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
|
github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
|
||||||
github.com/klauspost/pgzip v1.2.6 h1:8RXeL5crjEUFnR2/Sn6GJNWtSQ3Dk8pq4CL3jvdDyjU=
|
|
||||||
github.com/klauspost/pgzip v1.2.6/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs=
|
|
||||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||||
github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||||
@ -248,8 +150,8 @@ github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
|
|||||||
github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
|
github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
|
||||||
github.com/lib/pq v1.10.2 h1:AqzbZs4ZoCBp+GtejcpCpcxM3zlSMx29dXbUSeVtJb8=
|
github.com/lib/pq v1.10.2 h1:AqzbZs4ZoCBp+GtejcpCpcxM3zlSMx29dXbUSeVtJb8=
|
||||||
github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
|
github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
|
||||||
github.com/loveuer/nf v0.2.1 h1:VTx7CA2+aDmeOT47F6y8U3Ab/Xm4BPOxxkomgNtAxPk=
|
github.com/loveuer/nf v0.3.0 h1:ITPzgeiO32OstVJzrg/i3kmKmv+WeYx2anYHVRZtIv8=
|
||||||
github.com/loveuer/nf v0.2.1/go.mod h1:mR3Hc3j6kivKS+QwaYULYuiZOLQCfcaRPTtK260pBaw=
|
github.com/loveuer/nf v0.3.0/go.mod h1:M6reF17/kJBis30H4DxR5hrtgo/oJL4AV4cBe4HzJLw=
|
||||||
github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ=
|
github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ=
|
||||||
github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
||||||
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
|
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
|
||||||
@ -260,58 +162,24 @@ github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Ky
|
|||||||
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
||||||
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
|
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
|
||||||
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
||||||
github.com/mattn/go-shellwords v1.0.12 h1:M2zGm7EW6UQJvDeQxo4T51eKPurbeFbe8WtebGE2xrk=
|
github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U=
|
||||||
github.com/mattn/go-shellwords v1.0.12/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y=
|
github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
|
||||||
github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU=
|
|
||||||
github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=
|
|
||||||
github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo=
|
|
||||||
github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
|
|
||||||
github.com/mistifyio/go-zfs/v3 v3.0.1 h1:YaoXgBePoMA12+S1u/ddkv+QqxcfiZK4prI6HPnkFiU=
|
|
||||||
github.com/mistifyio/go-zfs/v3 v3.0.1/go.mod h1:CzVgeB0RvF2EGzQnytKVvVSDwmKJXxkOTUGbNrTja/k=
|
|
||||||
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
|
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
|
||||||
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||||
github.com/moby/sys/mountinfo v0.7.1 h1:/tTvQaSJRr2FshkhXiIpux6fQ2Zvc4j7tAhMTStAG2g=
|
|
||||||
github.com/moby/sys/mountinfo v0.7.1/go.mod h1:IJb6JQeOklcdMU9F5xQ8ZALD+CUr5VlGpwtX+VE0rpI=
|
|
||||||
github.com/moby/sys/user v0.1.0 h1:WmZ93f5Ux6het5iituh9x2zAG7NFY9Aqi49jjE1PaQg=
|
|
||||||
github.com/moby/sys/user v0.1.0/go.mod h1:fKJhFOnsCN6xZ5gSfbM6zaHGgDJMrqt9/reuj4T7MmU=
|
|
||||||
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=
|
|
||||||
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/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A=
|
|
||||||
github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
|
|
||||||
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
|
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/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
|
||||||
github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug=
|
github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug=
|
||||||
github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM=
|
github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM=
|
||||||
github.com/opencontainers/runtime-spec v1.2.0 h1:z97+pHb3uELt/yiAWD691HNHQIF07bE7dzrbT927iTk=
|
|
||||||
github.com/opencontainers/runtime-spec v1.2.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
|
|
||||||
github.com/opencontainers/selinux v1.11.0 h1:+5Zbo97w3Lbmb3PeqQtpmTkMwsW5nRI3YaLpt7tQ7oU=
|
|
||||||
github.com/opencontainers/selinux v1.11.0/go.mod h1:E5dMC3VPuVvVHDYmi78qvhJp8+M586T4DlDRYpFkyec=
|
|
||||||
github.com/ostreedev/ostree-go v0.0.0-20210805093236-719684c64e4f h1:/UDgs8FGMqwnHagNDPGOlts35QkhAZ8by3DR7nMih7M=
|
|
||||||
github.com/ostreedev/ostree-go v0.0.0-20210805093236-719684c64e4f/go.mod h1:J6OG6YJVEWopen4avK3VNQSnALmmjvniMmni/YFYAwc=
|
|
||||||
github.com/otiai10/copy v1.14.0 h1:dCI/t1iTdYGtkvCuBG2BgR6KZa83PTclw4U5n2wAllU=
|
|
||||||
github.com/otiai10/copy v1.14.0/go.mod h1:ECfuL02W+/FkTWZWgQqXPWZgW9oeKCSQ5qVfSc4qc4w=
|
|
||||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||||
github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q=
|
|
||||||
github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY=
|
|
||||||
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
|
||||||
github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw=
|
|
||||||
github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI=
|
|
||||||
github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY=
|
|
||||||
github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY=
|
|
||||||
github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI=
|
|
||||||
github.com/prometheus/procfs v0.11.1/go.mod h1:eesXgaPo1q7lBpVMoMy0ZOFTth9hBn4W/y0/p/ScXhY=
|
|
||||||
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
|
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
|
||||||
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE=
|
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE=
|
||||||
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
|
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
|
||||||
|
github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY=
|
||||||
|
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
|
||||||
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
||||||
github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8=
|
github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8=
|
||||||
github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4=
|
github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4=
|
||||||
@ -321,10 +189,6 @@ github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThC
|
|||||||
github.com/samber/lo v1.39.0 h1:4gTz1wUhNYLhFSKl6O+8peW0v2F4BCY034GRpU9WnuA=
|
github.com/samber/lo v1.39.0 h1:4gTz1wUhNYLhFSKl6O+8peW0v2F4BCY034GRpU9WnuA=
|
||||||
github.com/samber/lo v1.39.0/go.mod h1:+m/ZKRl6ClXCE2Lgf3MsQlWfh4bn1bz6CXEOxnEXnEA=
|
github.com/samber/lo v1.39.0/go.mod h1:+m/ZKRl6ClXCE2Lgf3MsQlWfh4bn1bz6CXEOxnEXnEA=
|
||||||
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
|
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
|
||||||
github.com/sebdah/goldie/v2 v2.5.3 h1:9ES/mNN+HNUbNWpVAlrzuZ7jE+Nrczbj8uFRjM7624Y=
|
|
||||||
github.com/sebdah/goldie/v2 v2.5.3/go.mod h1:oZ9fp0+se1eapSRjfYbsV/0Hqhbuu3bJVvKI/NNtssI=
|
|
||||||
github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8=
|
|
||||||
github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I=
|
|
||||||
github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4=
|
github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4=
|
||||||
github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
|
github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
|
||||||
github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
|
github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
|
||||||
@ -348,38 +212,10 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO
|
|||||||
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
||||||
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
|
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
|
||||||
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
||||||
github.com/sylabs/sif/v2 v2.15.1 h1:75BcunPOY11fVhe02/WHuNLTfDd3OHH0ex0MuuNMYX0=
|
|
||||||
github.com/sylabs/sif/v2 v2.15.1/go.mod h1:YiwCUdZOhiohnPbyxuxvCZa+03HwAaiC+vfAKZPR8nQ=
|
|
||||||
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 h1:kdXcSzyDtseVEc4yCz2qF8ZrQvIDBJLl4S1c3GCXmoI=
|
|
||||||
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
|
|
||||||
github.com/tchap/go-patricia/v2 v2.3.1 h1:6rQp39lgIYZ+MHmdEq4xzuk1t7OdC35z/xm0BGhTkes=
|
|
||||||
github.com/tchap/go-patricia/v2 v2.3.1/go.mod h1:VZRHKAb53DLaG+nA9EaYYiaEx6YztwDlLElMsnSHD4k=
|
|
||||||
github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8=
|
|
||||||
github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
|
|
||||||
github.com/vbatts/tar-split v0.11.5 h1:3bHCTIheBm1qFTcgh9oPu+nNBtX+XJIupG/vacinCts=
|
github.com/vbatts/tar-split v0.11.5 h1:3bHCTIheBm1qFTcgh9oPu+nNBtX+XJIupG/vacinCts=
|
||||||
github.com/vbatts/tar-split v0.11.5/go.mod h1:yZbwRsSeGjusneWgA781EKej9HF8vme8okylkAeNKLk=
|
github.com/vbatts/tar-split v0.11.5/go.mod h1:yZbwRsSeGjusneWgA781EKej9HF8vme8okylkAeNKLk=
|
||||||
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
|
||||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
|
||||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||||
github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q=
|
github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q=
|
||||||
go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0=
|
|
||||||
go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo=
|
|
||||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 h1:x8Z78aZx8cOF0+Kkazoc7lwUNMGy0LrzEMxTm4BbTxg=
|
|
||||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0/go.mod h1:62CPTSry9QZtOaSsE3tOzhx6LzDhHnXJ6xHeMNNiM6Q=
|
|
||||||
go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k=
|
|
||||||
go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg=
|
|
||||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.25.0 h1:dT33yIHtmsqpixFsSQPwNeY5drM9wTcoL8h0FWF4oGM=
|
|
||||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.25.0/go.mod h1:h95q0LBGh7hlAC08X2DhSeyIG02YQ0UyioTCVAqRPmc=
|
|
||||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0 h1:IeMeyr1aBvBiPVYihXIaeIZba6b8E1bYp7lbdxK8CQg=
|
|
||||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0/go.mod h1:oVdCUtjq9MK9BlS7TtucsQwUcXcymNiEDjgDD2jMtZU=
|
|
||||||
go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA=
|
|
||||||
go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s=
|
|
||||||
go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo=
|
|
||||||
go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw=
|
|
||||||
go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM=
|
|
||||||
go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I=
|
|
||||||
go.opentelemetry.io/proto/otlp v1.2.0 h1:pVeZGk7nXDC9O2hncA6nHldxEjm6LByfA2aN8IOkz94=
|
|
||||||
go.opentelemetry.io/proto/otlp v1.2.0/go.mod h1:gGpR8txAl5M03pDhMC79G6SdqNV26naRm/KDsgaHD8A=
|
|
||||||
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||||
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||||
go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
|
go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
|
||||||
@ -403,51 +239,29 @@ golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5y
|
|||||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||||
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
|
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
|
||||||
golang.org/x/crypto v0.20.0/go.mod h1:Xwo95rrVNIoSMx9wa1JroENMToLWn3RNVrTBpLHgZPQ=
|
golang.org/x/crypto v0.20.0/go.mod h1:Xwo95rrVNIoSMx9wa1JroENMToLWn3RNVrTBpLHgZPQ=
|
||||||
golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA=
|
golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI=
|
||||||
golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs=
|
golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
|
||||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
|
||||||
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 h1:LfspQV/FYTatPTr/3HzIcmiUFH7PGP+OQ6mgDYo3yuQ=
|
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 h1:LfspQV/FYTatPTr/3HzIcmiUFH7PGP+OQ6mgDYo3yuQ=
|
||||||
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc=
|
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc=
|
||||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
|
||||||
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
|
|
||||||
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
|
||||||
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||||
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
|
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
|
||||||
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
|
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
|
||||||
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
|
||||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
|
||||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||||
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||||
golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8=
|
|
||||||
golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
|
||||||
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=
|
|
||||||
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
|
||||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||||
golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||||
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
|
||||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
|
||||||
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
|
||||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||||
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||||
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
|
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
|
||||||
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
|
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
|
||||||
golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc=
|
|
||||||
golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
|
|
||||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
|
||||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
||||||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
||||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
||||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
||||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
|
golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ=
|
||||||
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
|
||||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
@ -458,10 +272,8 @@ golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7w
|
|||||||
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/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-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-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
@ -470,8 +282,8 @@ golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|||||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||||
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
|
golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA=
|
||||||
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||||
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
|
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
|
||||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||||
@ -486,66 +298,27 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
|||||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||||
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||||
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||||
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
|
|
||||||
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||||
golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4=
|
golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo=
|
||||||
golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
|
||||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||||
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
|
||||||
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
|
|
||||||
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||||
golang.org/x/tools v0.0.0-20190425163242-31fd60d6bfdc/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
golang.org/x/tools v0.0.0-20190425163242-31fd60d6bfdc/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||||
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
|
||||||
golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||||
golang.org/x/tools v0.0.0-20190823170909-c4a336ef6a2f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
golang.org/x/tools v0.0.0-20190823170909-c4a336ef6a2f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||||
golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||||
golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||||
golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||||
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
|
||||||
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
|
||||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||||
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
|
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
|
||||||
golang.org/x/tools v0.18.0 h1:k8NLag8AGHnn+PHbl7g43CtqZAwG60vZkLqgyZgIHgQ=
|
|
||||||
golang.org/x/tools v0.18.0/go.mod h1:GL7B4CwcLLeo59yx/9UWWuNOW1n3VZ4f5axWfML7Lcg=
|
|
||||||
golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
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=
|
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
|
||||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
|
|
||||||
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
|
||||||
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
|
|
||||||
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
|
|
||||||
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
|
|
||||||
google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY=
|
|
||||||
google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de h1:jFNzHPIeuzhdRwVhbZdiym9q0ory/xY3sA+v2wPg8I0=
|
|
||||||
google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8=
|
|
||||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY=
|
|
||||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY=
|
|
||||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
|
||||||
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
|
||||||
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
|
|
||||||
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
|
|
||||||
google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=
|
|
||||||
google.golang.org/grpc v1.63.0 h1:WjKe+dnvABXyPJMD7KDNLxtoGk5tgk+YFWN6cBWjZE8=
|
|
||||||
google.golang.org/grpc v1.63.0/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA=
|
|
||||||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
|
||||||
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
|
||||||
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
|
|
||||||
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
|
|
||||||
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
|
|
||||||
google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
|
||||||
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
|
||||||
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
|
||||||
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
|
|
||||||
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
|
|
||||||
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
|
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
|
||||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
|
||||||
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
|
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
|
||||||
gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s=
|
gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s=
|
||||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||||
@ -554,12 +327,8 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
|||||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
gorm.io/gorm v1.25.9 h1:wct0gxZIELDk8+ZqF/MVnHLkA1rvYlBWUMv2EdsK1g8=
|
gorm.io/gorm v1.25.9 h1:wct0gxZIELDk8+ZqF/MVnHLkA1rvYlBWUMv2EdsK1g8=
|
||||||
gorm.io/gorm v1.25.9/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8=
|
gorm.io/gorm v1.25.9/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8=
|
||||||
gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo=
|
|
||||||
gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw=
|
|
||||||
gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU=
|
gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU=
|
||||||
gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU=
|
gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU=
|
||||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
|
||||||
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
|
||||||
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
|
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
|
||||||
modernc.org/libc v1.22.5 h1:91BNch/e5B0uPbJFgqbxXuOnxBQjlS//icfQEGmvyjE=
|
modernc.org/libc v1.22.5 h1:91BNch/e5B0uPbJFgqbxXuOnxBQjlS//icfQEGmvyjE=
|
||||||
modernc.org/libc v1.22.5/go.mod h1:jj+Z7dTNX8fBScMVNRAYZ/jF91K8fdT2hYMThc3YjBY=
|
modernc.org/libc v1.22.5/go.mod h1:jj+Z7dTNX8fBScMVNRAYZ/jF91K8fdT2hYMThc3YjBY=
|
||||||
|
@ -2,11 +2,12 @@ package api
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"github.com/loveuer/nf"
|
|
||||||
"nf-repo/internal/handler"
|
"nf-repo/internal/handler"
|
||||||
"nf-repo/internal/interfaces"
|
"nf-repo/internal/interfaces"
|
||||||
"nf-repo/internal/middleware/front"
|
|
||||||
"nf-repo/internal/opt"
|
"nf-repo/internal/opt"
|
||||||
|
|
||||||
|
"github.com/loveuer/nf"
|
||||||
)
|
)
|
||||||
|
|
||||||
func NewApi(
|
func NewApi(
|
||||||
@ -23,14 +24,14 @@ func NewApi(
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
api := app.Group("/api/repo")
|
api := app.Group("/_api/repo")
|
||||||
api.Get("/settings", handler.RepoSettings)
|
api.Get("/settings", handler.RepoSettings)
|
||||||
api.Get("/list", handler.RepoList(mh))
|
api.Get("/list", handler.RepoList(mh))
|
||||||
api.Get("/tag/list", handler.TagList(mh))
|
api.Get("/tag/list", handler.TagList(mh))
|
||||||
api.Post("/proxy", handler.ProxyDownloadImage(mh, bh))
|
api.Post("/proxy", handler.ProxyDownloadImage(mh, bh))
|
||||||
}
|
}
|
||||||
|
|
||||||
app.Use(front.NewFront(&front.DefaultFront, "dist/front/browser"))
|
// app.Use(front.NewFront(&front.DefaultFront, "dist/front/browser"))
|
||||||
|
|
||||||
return app
|
return app
|
||||||
}
|
}
|
||||||
|
151
internal/controller/pull.go
Normal file
151
internal/controller/pull.go
Normal file
@ -0,0 +1,151 @@
|
|||||||
|
package controller
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"context"
|
||||||
|
"encoding/json"
|
||||||
|
"fmt"
|
||||||
|
"io"
|
||||||
|
"net/http"
|
||||||
|
"net/url"
|
||||||
|
|
||||||
|
"nf-repo/internal/interfaces"
|
||||||
|
"nf-repo/internal/model"
|
||||||
|
"nf-repo/internal/opt"
|
||||||
|
|
||||||
|
"github.com/google/go-containerregistry/pkg/name"
|
||||||
|
v1 "github.com/google/go-containerregistry/pkg/v1"
|
||||||
|
"github.com/google/go-containerregistry/pkg/v1/remote"
|
||||||
|
)
|
||||||
|
|
||||||
|
func PullRepo(ctx context.Context, repo string, tag string, proxy string,
|
||||||
|
mh interfaces.ManifestHandler, bh interfaces.BlobHandler,
|
||||||
|
) (*v1.Manifest, error) {
|
||||||
|
if repo == "" || tag == "" {
|
||||||
|
return nil, fmt.Errorf("invalid repo or tag")
|
||||||
|
}
|
||||||
|
|
||||||
|
var (
|
||||||
|
err error
|
||||||
|
transport = &http.Transport{}
|
||||||
|
puller *remote.Puller
|
||||||
|
tn name.Tag
|
||||||
|
des *remote.Descriptor
|
||||||
|
img v1.Image
|
||||||
|
manifest *v1.Manifest
|
||||||
|
bs []byte
|
||||||
|
mhash model.Hash
|
||||||
|
target = fmt.Sprintf("%s:%s", repo, tag)
|
||||||
|
)
|
||||||
|
|
||||||
|
if opt.Proxy != nil {
|
||||||
|
transport.Proxy = http.ProxyURL(opt.Proxy)
|
||||||
|
}
|
||||||
|
|
||||||
|
if proxy != "" {
|
||||||
|
var pu *url.URL
|
||||||
|
if pu, err = url.Parse(proxy); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
transport.Proxy = http.ProxyURL(pu)
|
||||||
|
}
|
||||||
|
|
||||||
|
if puller, err = remote.NewPuller(
|
||||||
|
remote.WithTransport(transport),
|
||||||
|
); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if tn, err = name.NewTag(target); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if des, err = puller.Get(ctx, tn); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if img, err = des.Image(); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if manifest, err = img.Manifest(); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
total := model.ManifestCountSize(manifest)
|
||||||
|
size := 0
|
||||||
|
_ = total
|
||||||
|
|
||||||
|
var (
|
||||||
|
tly v1.Layer
|
||||||
|
tdigest v1.Hash
|
||||||
|
treader io.ReadCloser
|
||||||
|
)
|
||||||
|
|
||||||
|
if tly, err = img.LayerByDigest(manifest.Config.Digest); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if tdigest, err = tly.Digest(); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if treader, err = tly.Uncompressed(); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
defer treader.Close()
|
||||||
|
|
||||||
|
if err = bh.Put(
|
||||||
|
ctx,
|
||||||
|
target,
|
||||||
|
model.Hash{Algorithm: tdigest.Algorithm, Hex: tdigest.Hex},
|
||||||
|
treader,
|
||||||
|
); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
size = size + int(manifest.Config.Size)
|
||||||
|
|
||||||
|
if bs, err = json.Marshal(manifest); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if mhash, _, err = model.SHA256(bytes.NewReader(bs)); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
for idx := range manifest.Layers {
|
||||||
|
var (
|
||||||
|
reader io.ReadCloser
|
||||||
|
lyHash v1.Hash
|
||||||
|
ly v1.Layer
|
||||||
|
)
|
||||||
|
|
||||||
|
lyHash = manifest.Layers[idx].Digest
|
||||||
|
|
||||||
|
if ly, err = img.LayerByDigest(manifest.Layers[idx].Digest); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if reader, err = ly.Compressed(); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
defer reader.Close()
|
||||||
|
|
||||||
|
if err = bh.Put(ctx, repo, model.Hash{Algorithm: lyHash.Algorithm, Hex: lyHash.Hex}, reader); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
size = size + int(manifest.Layers[idx].Size)
|
||||||
|
}
|
||||||
|
|
||||||
|
if re := mh.Put(ctx, repo, tag, mhash.String(), &model.RepoSimpleManifest{
|
||||||
|
ContentType: string(manifest.MediaType),
|
||||||
|
Blob: bs,
|
||||||
|
}); re != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
return manifest, nil
|
||||||
|
}
|
@ -3,17 +3,18 @@ package handler
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/loveuer/nf"
|
|
||||||
"github.com/sirupsen/logrus"
|
|
||||||
"io"
|
"io"
|
||||||
"log"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"nf-repo/internal/model"
|
|
||||||
"nf-repo/internal/opt"
|
|
||||||
"nf-repo/internal/util/rerr"
|
|
||||||
"nf-repo/internal/verify"
|
|
||||||
"path"
|
"path"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"nf-repo/internal/model"
|
||||||
|
"nf-repo/internal/opt"
|
||||||
|
"nf-repo/internal/tool/rerr"
|
||||||
|
"nf-repo/internal/verify"
|
||||||
|
|
||||||
|
"github.com/loveuer/nf"
|
||||||
|
"github.com/loveuer/nf/nft/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
func handleBlobs(c *nf.Ctx) error {
|
func handleBlobs(c *nf.Ctx) error {
|
||||||
@ -39,15 +40,8 @@ func handleBlobs(c *nf.Ctx) error {
|
|||||||
rangeHeader := c.Get("Range")
|
rangeHeader := c.Get("Range")
|
||||||
repo := c.Request.URL.Host + path.Join(elem[1:len(elem)-2]...)
|
repo := c.Request.URL.Host + path.Join(elem[1:len(elem)-2]...)
|
||||||
|
|
||||||
logrus.
|
log.Debug("handleBlob: path = %s, method = %s, target = %s, service = %s, repo = %s, digest = %s",
|
||||||
WithField("handler", "handleBlob").
|
c.Path(), c.Method(), target, service, repo, digest)
|
||||||
WithField("path", c.Path()).
|
|
||||||
WithField("method", c.Method()).
|
|
||||||
WithField("target", target).
|
|
||||||
WithField("service", service).
|
|
||||||
WithField("repo", repo).
|
|
||||||
WithField("digest", digest).
|
|
||||||
Debug()
|
|
||||||
|
|
||||||
switch c.Method() {
|
switch c.Method() {
|
||||||
case http.MethodHead:
|
case http.MethodHead:
|
||||||
@ -68,7 +62,7 @@ func handleBlobs(c *nf.Ctx) error {
|
|||||||
} else if err != nil {
|
} else if err != nil {
|
||||||
var re model.RedirectError
|
var re model.RedirectError
|
||||||
if errors.As(err, &re) {
|
if errors.As(err, &re) {
|
||||||
http.Redirect(c.RawWriter(), c.Request, re.Location, re.Code)
|
http.Redirect(c.Writer, c.Request, re.Location, re.Code)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
return rerr.Error(c, rerr.ErrInternal(err))
|
return rerr.Error(c, rerr.ErrInternal(err))
|
||||||
@ -93,11 +87,12 @@ func handleBlobs(c *nf.Ctx) error {
|
|||||||
|
|
||||||
size, err = b.blobHandler.Stat(c.Request.Context(), repo, h)
|
size, err = b.blobHandler.Stat(c.Request.Context(), repo, h)
|
||||||
if errors.Is(err, opt.ErrNotFound) {
|
if errors.Is(err, opt.ErrNotFound) {
|
||||||
|
log.Error("handleBlobs: mirror registry get repo not found, repo = %s", repo)
|
||||||
return rerr.Error(c, rerr.ErrBlobUnknown)
|
return rerr.Error(c, rerr.ErrBlobUnknown)
|
||||||
} else if err != nil {
|
} else if err != nil {
|
||||||
var re model.RedirectError
|
var re model.RedirectError
|
||||||
if errors.As(err, &re) {
|
if errors.As(err, &re) {
|
||||||
http.Redirect(c.RawWriter(), c.Request, re.Location, re.Code)
|
http.Redirect(c.Writer, c.Request, re.Location, re.Code)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -110,7 +105,7 @@ func handleBlobs(c *nf.Ctx) error {
|
|||||||
} else if err != nil {
|
} else if err != nil {
|
||||||
var re model.RedirectError
|
var re model.RedirectError
|
||||||
if errors.As(err, &re) {
|
if errors.As(err, &re) {
|
||||||
http.Redirect(c.RawWriter(), c.Request, re.Location, re.Code)
|
http.Redirect(c.Writer, c.Request, re.Location, re.Code)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -162,7 +157,7 @@ func handleBlobs(c *nf.Ctx) error {
|
|||||||
c.Status(http.StatusOK)
|
c.Status(http.StatusOK)
|
||||||
}
|
}
|
||||||
|
|
||||||
_, err = io.Copy(c.RawWriter(), r)
|
_, err = io.Copy(c.Writer, r)
|
||||||
return err
|
return err
|
||||||
|
|
||||||
case http.MethodPost:
|
case http.MethodPost:
|
||||||
@ -190,7 +185,7 @@ func handleBlobs(c *nf.Ctx) error {
|
|||||||
|
|
||||||
if err = b.blobHandler.Put(c.Request.Context(), repo, h, vrc); err != nil {
|
if err = b.blobHandler.Put(c.Request.Context(), repo, h, vrc); err != nil {
|
||||||
if errors.As(err, &verify.Error{}) {
|
if errors.As(err, &verify.Error{}) {
|
||||||
log.Printf("Digest mismatch: %v", err)
|
log.Info("Digest mismatch: %v", err)
|
||||||
return rerr.Error(c, rerr.ErrDigestMismatch)
|
return rerr.Error(c, rerr.ErrDigestMismatch)
|
||||||
}
|
}
|
||||||
return rerr.Error(c, rerr.ErrInternal(err))
|
return rerr.Error(c, rerr.ErrInternal(err))
|
||||||
|
@ -1,12 +1,14 @@
|
|||||||
package handler
|
package handler
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/loveuer/nf"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"strconv"
|
||||||
|
|
||||||
"nf-repo/internal/interfaces"
|
"nf-repo/internal/interfaces"
|
||||||
"nf-repo/internal/model"
|
"nf-repo/internal/model"
|
||||||
"nf-repo/internal/util/rerr"
|
"nf-repo/internal/tool/rerr"
|
||||||
"strconv"
|
|
||||||
|
"github.com/loveuer/nf"
|
||||||
)
|
)
|
||||||
|
|
||||||
func handleCatalog(ctx *nf.Ctx, m interfaces.ManifestHandler) error {
|
func handleCatalog(ctx *nf.Ctx, m interfaces.ManifestHandler) error {
|
||||||
|
@ -2,30 +2,30 @@ package handler
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/loveuer/nf"
|
|
||||||
"github.com/sirupsen/logrus"
|
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"strings"
|
||||||
|
|
||||||
|
"nf-repo/internal/controller"
|
||||||
"nf-repo/internal/interfaces"
|
"nf-repo/internal/interfaces"
|
||||||
"nf-repo/internal/model"
|
"nf-repo/internal/model"
|
||||||
"nf-repo/internal/util/rerr"
|
"nf-repo/internal/tool/rerr"
|
||||||
"strings"
|
|
||||||
|
v1 "github.com/google/go-containerregistry/pkg/v1"
|
||||||
|
"github.com/loveuer/nf"
|
||||||
|
"github.com/loveuer/nf/nft/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
func handleManifest(ctx *nf.Ctx, m interfaces.ManifestHandler) error {
|
func handleManifest(ctx *nf.Ctx, m interfaces.ManifestHandler, blobHandler interfaces.BlobHandler) error {
|
||||||
elem := strings.Split(ctx.Path(), "/")
|
elem := strings.Split(ctx.Path(), "/")
|
||||||
elem = elem[1:]
|
elem = elem[1:]
|
||||||
target := elem[len(elem)-1]
|
target := elem[len(elem)-1]
|
||||||
repo := strings.Join(elem[1:len(elem)-2], "/")
|
repo := strings.Join(elem[1:len(elem)-2], "/")
|
||||||
|
|
||||||
logrus.
|
log.Debug("handleManifest: path = %s, method = %s, repo = %s, target = %s",
|
||||||
WithField("handler", "handleManifest").
|
ctx.Path(), ctx.Method(), repo, target)
|
||||||
WithField("path", ctx.Path()).
|
|
||||||
WithField("method", ctx.Method()).
|
|
||||||
WithField("repo", repo).
|
|
||||||
WithField("target", target).
|
|
||||||
Debug()
|
|
||||||
|
|
||||||
switch ctx.Method() {
|
switch ctx.Method() {
|
||||||
case http.MethodGet:
|
case http.MethodGet:
|
||||||
@ -38,6 +38,22 @@ func handleManifest(ctx *nf.Ctx, m interfaces.ManifestHandler) error {
|
|||||||
)
|
)
|
||||||
|
|
||||||
if reader, contentType, re = m.Get(ctx.Request.Context(), repo, target); re != nil {
|
if reader, contentType, re = m.Get(ctx.Request.Context(), repo, target); re != nil {
|
||||||
|
if re.Status == 404 {
|
||||||
|
log.Debug("handleManifest: repo not found, start pull, repo = %s, tag = %s", repo, target)
|
||||||
|
var manifest *v1.Manifest
|
||||||
|
if manifest, err = controller.PullRepo(ctx.Context(), repo, target, "", m, blobHandler); err != nil {
|
||||||
|
return rerr.Error(ctx, &rerr.RepositoryError{
|
||||||
|
Status: http.StatusInternalServerError,
|
||||||
|
Code: "INTERNAL_SERVER_ERROR",
|
||||||
|
Message: err.Error(),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
contentType = string(manifest.MediaType)
|
||||||
|
bs, _ = json.Marshal(manifest)
|
||||||
|
goto RETURN_GET
|
||||||
|
}
|
||||||
|
|
||||||
return rerr.Error(ctx, re)
|
return rerr.Error(ctx, re)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -49,6 +65,8 @@ func handleManifest(ctx *nf.Ctx, m interfaces.ManifestHandler) error {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RETURN_GET:
|
||||||
|
|
||||||
h, _, _ := model.SHA256(bytes.NewReader(bs))
|
h, _, _ := model.SHA256(bytes.NewReader(bs))
|
||||||
ctx.Set("Docker-Content-Digest", h.String())
|
ctx.Set("Docker-Content-Digest", h.String())
|
||||||
ctx.Set("Content-Type", contentType)
|
ctx.Set("Content-Type", contentType)
|
||||||
@ -107,16 +125,8 @@ func handleManifest(ctx *nf.Ctx, m interfaces.ManifestHandler) error {
|
|||||||
ContentType: ctx.Get("Content-Type"),
|
ContentType: ctx.Get("Content-Type"),
|
||||||
}
|
}
|
||||||
|
|
||||||
logrus.
|
log.Debug("handleManifest: path = %s, method = %s, repo = %s, target = %s, digest = %s, content-type = %s, content = %s",
|
||||||
WithField("handler", "handleManifest").
|
ctx.Path(), ctx.Method(), repo, target, digest, ctx.Get("Content-Type"), buf.String())
|
||||||
WithField("path", ctx.Path()).
|
|
||||||
WithField("method", ctx.Method()).
|
|
||||||
WithField("repo", repo).
|
|
||||||
WithField("target", target).
|
|
||||||
WithField("digest", digest).
|
|
||||||
WithField("content-type", ctx.Get("Content-Type")).
|
|
||||||
WithField("content", buf.String()).
|
|
||||||
Debug()
|
|
||||||
|
|
||||||
if err := m.Put(ctx.Request.Context(), repo, target, digest, &mf); err != nil {
|
if err := m.Put(ctx.Request.Context(), repo, target, digest, &mf); err != nil {
|
||||||
return rerr.Error(ctx, err)
|
return rerr.Error(ctx, err)
|
||||||
|
@ -4,14 +4,16 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/loveuer/nf"
|
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"nf-repo/internal/interfaces"
|
"nf-repo/internal/interfaces"
|
||||||
"nf-repo/internal/model"
|
"nf-repo/internal/model"
|
||||||
"nf-repo/internal/model/types"
|
"nf-repo/internal/model/types"
|
||||||
"nf-repo/internal/util/rerr"
|
"nf-repo/internal/tool/rerr"
|
||||||
"strings"
|
|
||||||
|
"github.com/loveuer/nf"
|
||||||
)
|
)
|
||||||
|
|
||||||
func handleReferrers(ctx *nf.Ctx, m interfaces.ManifestHandler) error {
|
func handleReferrers(ctx *nf.Ctx, m interfaces.ManifestHandler) error {
|
||||||
@ -51,7 +53,7 @@ func handleReferrers(ctx *nf.Ctx, m interfaces.ManifestHandler) error {
|
|||||||
ctx.Set("Content-Length", fmt.Sprint(len(msg)))
|
ctx.Set("Content-Length", fmt.Sprint(len(msg)))
|
||||||
ctx.Set("Content-Type", string(types.OCIImageIndex))
|
ctx.Set("Content-Type", string(types.OCIImageIndex))
|
||||||
ctx.Status(http.StatusOK)
|
ctx.Status(http.StatusOK)
|
||||||
_, err = io.Copy(ctx.RawWriter(), bytes.NewReader(msg))
|
_, err = io.Copy(ctx.Writer, bytes.NewReader(msg))
|
||||||
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -4,25 +4,28 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/google/go-containerregistry/pkg/name"
|
|
||||||
"github.com/google/go-containerregistry/pkg/v1"
|
|
||||||
"github.com/google/go-containerregistry/pkg/v1/remote"
|
|
||||||
"github.com/loveuer/nf"
|
|
||||||
"github.com/sirupsen/logrus"
|
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"nf-repo/internal/interfaces"
|
"nf-repo/internal/interfaces"
|
||||||
"nf-repo/internal/model"
|
"nf-repo/internal/model"
|
||||||
"nf-repo/internal/opt"
|
"nf-repo/internal/opt"
|
||||||
"nf-repo/internal/util/r"
|
"nf-repo/internal/tool/r"
|
||||||
"nf-repo/internal/util/rerr"
|
"nf-repo/internal/tool/rerr"
|
||||||
"strings"
|
|
||||||
|
"github.com/google/go-containerregistry/pkg/name"
|
||||||
|
v1 "github.com/google/go-containerregistry/pkg/v1"
|
||||||
|
"github.com/google/go-containerregistry/pkg/v1/remote"
|
||||||
|
"github.com/loveuer/nf"
|
||||||
|
"github.com/loveuer/nf/nft/log"
|
||||||
|
"github.com/loveuer/nf/nft/resp"
|
||||||
)
|
)
|
||||||
|
|
||||||
func RepoSettings(c *nf.Ctx) error {
|
func RepoSettings(c *nf.Ctx) error {
|
||||||
return r.Resp200(c, nf.Map{
|
return resp.Resp200(c, nf.Map{
|
||||||
"base_address": opt.BaseAddress,
|
"repo_name": opt.Cfg.RepoName,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -42,7 +45,7 @@ func RepoList(mh interfaces.ManifestHandler) nf.HandlerFunc {
|
|||||||
)
|
)
|
||||||
|
|
||||||
if err = c.QueryParser(req); err != nil {
|
if err = c.QueryParser(req); err != nil {
|
||||||
return r.Resp400(c, err.Error())
|
return resp.Resp400(c, err.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
if req.N == 0 {
|
if req.N == 0 {
|
||||||
@ -50,14 +53,14 @@ func RepoList(mh interfaces.ManifestHandler) nf.HandlerFunc {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if req.N > 1000 {
|
if req.N > 1000 {
|
||||||
return r.Resp400(c, "limit invalid: too big")
|
return resp.Resp400(c, "limit invalid: too big")
|
||||||
}
|
}
|
||||||
|
|
||||||
if catalog, re = mh.Catalog(c.Request.Context(), req.N, req.Last, req.Keyword); re != nil {
|
if catalog, re = mh.Catalog(c.Request.Context(), req.N, req.Last, req.Keyword); re != nil {
|
||||||
return r.Resp(c, uint32(re.Status), "", re.Code, re.Message)
|
return resp.Resp(c, uint32(re.Status), "", re.Code, re.Message)
|
||||||
}
|
}
|
||||||
|
|
||||||
return r.Resp200(c, nf.Map{"list": catalog.Repos, "total": 0})
|
return resp.Resp200(c, nf.Map{"list": catalog.Repos, "total": 0})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -127,7 +130,7 @@ func ProxyDownloadImage(mh interfaces.ManifestHandler, bh interfaces.BlobHandler
|
|||||||
manifest *v1.Manifest
|
manifest *v1.Manifest
|
||||||
bs []byte
|
bs []byte
|
||||||
mhash model.Hash
|
mhash model.Hash
|
||||||
//progressCh = make(chan v1.Update, 16)
|
// progressCh = make(chan v1.Update, 16)
|
||||||
)
|
)
|
||||||
|
|
||||||
if err = c.BodyParser(req); err != nil {
|
if err = c.BodyParser(req); err != nil {
|
||||||
@ -144,21 +147,18 @@ func ProxyDownloadImage(mh interfaces.ManifestHandler, bh interfaces.BlobHandler
|
|||||||
}
|
}
|
||||||
|
|
||||||
repo, tag := repoTags[0], repoTags[1]
|
repo, tag := repoTags[0], repoTags[1]
|
||||||
repo = strings.TrimPrefix(repo, opt.BaseAddress)
|
repo = strings.TrimPrefix(repo, opt.Cfg.RepoName)
|
||||||
repo = strings.Trim(repo, "/")
|
repo = strings.Trim(repo, "/")
|
||||||
|
|
||||||
if req.Source == "" {
|
if req.Source == "" {
|
||||||
return r.Resp400(c, "source invalid")
|
return r.Resp400(c, "source invalid")
|
||||||
}
|
}
|
||||||
|
|
||||||
imageName := fmt.Sprintf("%s/%s:%s", opt.BaseAddress, repo, tag)
|
log.Debug("ProxyDownloadImage: req = %#v, repo = %s", *req, repo)
|
||||||
_ = imageName
|
|
||||||
|
|
||||||
logrus.
|
if opt.Proxy != nil {
|
||||||
WithField("path", "handler.ProxyDownloadImage").
|
transport.Proxy = http.ProxyURL(opt.Proxy)
|
||||||
WithField("req", *req).
|
}
|
||||||
WithField("repo", repo).
|
|
||||||
Debug()
|
|
||||||
|
|
||||||
if req.Proxy != "" {
|
if req.Proxy != "" {
|
||||||
var pu *url.URL
|
var pu *url.URL
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
package handler
|
package handler
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/loveuer/nf"
|
|
||||||
"github.com/sirupsen/logrus"
|
|
||||||
"nf-repo/internal/interfaces"
|
"nf-repo/internal/interfaces"
|
||||||
"nf-repo/internal/opt"
|
"nf-repo/internal/opt"
|
||||||
"nf-repo/internal/util/rerr"
|
"nf-repo/internal/tool/rerr"
|
||||||
|
|
||||||
|
"github.com/loveuer/nf"
|
||||||
|
"github.com/loveuer/nf/nft/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
type blob struct {
|
type blob struct {
|
||||||
@ -13,9 +14,7 @@ type blob struct {
|
|||||||
uploadHandler interfaces.UploadHandler
|
uploadHandler interfaces.UploadHandler
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var b = &blob{}
|
||||||
b = &blob{}
|
|
||||||
)
|
|
||||||
|
|
||||||
func Root(bh interfaces.BlobHandler, uh interfaces.UploadHandler, mh interfaces.ManifestHandler) nf.HandlerFunc {
|
func Root(bh interfaces.BlobHandler, uh interfaces.UploadHandler, mh interfaces.ManifestHandler) nf.HandlerFunc {
|
||||||
b.blobHandler = bh
|
b.blobHandler = bh
|
||||||
@ -26,7 +25,7 @@ func Root(bh interfaces.BlobHandler, uh interfaces.UploadHandler, mh interfaces.
|
|||||||
}
|
}
|
||||||
|
|
||||||
if isManifest(c) {
|
if isManifest(c) {
|
||||||
return handleManifest(c, mh)
|
return handleManifest(c, mh, bh)
|
||||||
}
|
}
|
||||||
|
|
||||||
if isTags(c) {
|
if isTags(c) {
|
||||||
@ -43,11 +42,7 @@ func Root(bh interfaces.BlobHandler, uh interfaces.UploadHandler, mh interfaces.
|
|||||||
|
|
||||||
c.SetHeader("Docker-Distribution-API-Version", "registry/2.0")
|
c.SetHeader("Docker-Distribution-API-Version", "registry/2.0")
|
||||||
|
|
||||||
logrus.
|
log.Warn("root.go Root: path = %s, method = %s, headers = %v", c.Path(), c.Method(), c.Request.Header)
|
||||||
WithField("path", c.Path()).
|
|
||||||
WithField("method", c.Method()).
|
|
||||||
WithField("headers", c.Request.Header).
|
|
||||||
Warn()
|
|
||||||
|
|
||||||
return rerr.Error(c, rerr.ErrUnauthorized)
|
return rerr.Error(c, rerr.ErrUnauthorized)
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,14 @@
|
|||||||
package handler
|
package handler
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/loveuer/nf"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"nf-repo/internal/interfaces"
|
"nf-repo/internal/interfaces"
|
||||||
"nf-repo/internal/model"
|
"nf-repo/internal/model"
|
||||||
"nf-repo/internal/util/rerr"
|
"nf-repo/internal/tool/rerr"
|
||||||
"strings"
|
|
||||||
|
"github.com/loveuer/nf"
|
||||||
)
|
)
|
||||||
|
|
||||||
func handleTags(ctx *nf.Ctx, m interfaces.ManifestHandler) error {
|
func handleTags(ctx *nf.Ctx, m interfaces.ManifestHandler) error {
|
||||||
|
@ -3,17 +3,19 @@ package blobs
|
|||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"context"
|
"context"
|
||||||
|
"io"
|
||||||
|
"strings"
|
||||||
|
|
||||||
|
"nf-repo/internal/interfaces"
|
||||||
|
"nf-repo/internal/model"
|
||||||
|
"nf-repo/internal/verify"
|
||||||
|
|
||||||
"github.com/aws/aws-sdk-go-v2/aws"
|
"github.com/aws/aws-sdk-go-v2/aws"
|
||||||
"github.com/aws/aws-sdk-go-v2/config"
|
"github.com/aws/aws-sdk-go-v2/config"
|
||||||
"github.com/aws/aws-sdk-go-v2/credentials"
|
"github.com/aws/aws-sdk-go-v2/credentials"
|
||||||
"github.com/aws/aws-sdk-go-v2/service/s3"
|
"github.com/aws/aws-sdk-go-v2/service/s3"
|
||||||
"github.com/aws/aws-sdk-go-v2/service/s3/types"
|
"github.com/aws/aws-sdk-go-v2/service/s3/types"
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/loveuer/nf/nft/log"
|
||||||
"io"
|
|
||||||
"nf-repo/internal/interfaces"
|
|
||||||
"nf-repo/internal/model"
|
|
||||||
"nf-repo/internal/verify"
|
|
||||||
"strings"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type s3Handler struct {
|
type s3Handler struct {
|
||||||
@ -76,22 +78,17 @@ func (s *s3Handler) Put(ctx context.Context, repo string, hash model.Hash, rc io
|
|||||||
ACL: types.ObjectCannedACLPublicRead,
|
ACL: types.ObjectCannedACLPublicRead,
|
||||||
Body: bytes.NewReader(bs),
|
Body: bytes.NewReader(bs),
|
||||||
}, s3.WithAPIOptions(
|
}, s3.WithAPIOptions(
|
||||||
//v4.AddUnsignedPayloadMiddleware,
|
// v4.AddUnsignedPayloadMiddleware,
|
||||||
//v4.RemoveComputePayloadSHA256Middleware,
|
// v4.RemoveComputePayloadSHA256Middleware,
|
||||||
)); err != nil {
|
)); err != nil {
|
||||||
logrus.
|
log.Debug("s3Handler: put object err, err = %s", err.Error())
|
||||||
WithField("path", "s3Handler.Put").
|
|
||||||
WithField("err", err).
|
|
||||||
Debug()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *s3Handler) Delete(ctx context.Context, repo string, hash model.Hash) error {
|
func (s *s3Handler) Delete(ctx context.Context, repo string, hash model.Hash) error {
|
||||||
var (
|
var err error
|
||||||
err error
|
|
||||||
)
|
|
||||||
|
|
||||||
if _, err = s.client.DeleteObject(ctx, &s3.DeleteObjectInput{
|
if _, err = s.client.DeleteObject(ctx, &s3.DeleteObjectInput{
|
||||||
Bucket: aws.String(s.bucket),
|
Bucket: aws.String(s.bucket),
|
||||||
@ -128,7 +125,7 @@ func NewS3BlobHandler(
|
|||||||
Value: aws.Credentials{AccessKeyID: accessKey, SecretAccessKey: secretKey},
|
Value: aws.Credentials{AccessKeyID: accessKey, SecretAccessKey: secretKey},
|
||||||
}),
|
}),
|
||||||
); err != nil {
|
); err != nil {
|
||||||
logrus.Panicf("init s3 client err: %v", err)
|
log.Panic("init s3 client err: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
client = s3.NewFromConfig(cfg, func(options *s3.Options) {
|
client = s3.NewFromConfig(cfg, func(options *s3.Options) {
|
||||||
@ -139,16 +136,16 @@ func NewS3BlobHandler(
|
|||||||
Bucket: aws.String(bucket),
|
Bucket: aws.String(bucket),
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
if !strings.Contains(err.Error(), "404") {
|
if !strings.Contains(err.Error(), "404") {
|
||||||
logrus.Panicf("init s3 bucket err: %v", err)
|
log.Panic("init s3 bucket err: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
logrus.Info("s3 bucket not found, start create...")
|
log.Info("s3 bucket not found, start create...")
|
||||||
|
|
||||||
if _, err = client.CreateBucket(ctx, &s3.CreateBucketInput{
|
if _, err = client.CreateBucket(ctx, &s3.CreateBucketInput{
|
||||||
Bucket: aws.String(bucket),
|
Bucket: aws.String(bucket),
|
||||||
ACL: types.BucketCannedACLPublicRead,
|
ACL: types.BucketCannedACLPublicRead,
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
logrus.Panicf("create s3 bucket err: %v", err)
|
log.Panic("create s3 bucket err: %v", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,13 +2,15 @@ package dbs
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"github.com/glebarez/sqlite"
|
|
||||||
"github.com/sirupsen/logrus"
|
|
||||||
"gorm.io/gorm"
|
|
||||||
"nf-repo/internal/interfaces"
|
|
||||||
"nf-repo/internal/opt"
|
|
||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
|
|
||||||
|
"nf-repo/internal/interfaces"
|
||||||
|
"nf-repo/internal/opt"
|
||||||
|
|
||||||
|
"github.com/glebarez/sqlite"
|
||||||
|
"github.com/loveuer/nf/nft/log"
|
||||||
|
"gorm.io/gorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
type tx struct {
|
type tx struct {
|
||||||
@ -18,7 +20,7 @@ type tx struct {
|
|||||||
func (t *tx) TX(ctx context.Context) *gorm.DB {
|
func (t *tx) TX(ctx context.Context) *gorm.DB {
|
||||||
db := t.db.Session(&gorm.Session{}).WithContext(ctx)
|
db := t.db.Session(&gorm.Session{}).WithContext(ctx)
|
||||||
|
|
||||||
if opt.Debug {
|
if opt.Cfg.Debug {
|
||||||
db = db.Debug()
|
db = db.Debug()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -31,24 +33,18 @@ func newTX(db *gorm.DB) interfaces.Database {
|
|||||||
|
|
||||||
func Must(database interfaces.Database, err error) interfaces.Database {
|
func Must(database interfaces.Database, err error) interfaces.Database {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logrus.
|
log.Panic("tx.Must: err = %s", err.Error())
|
||||||
WithField("path", "tx.Must").
|
|
||||||
WithField("err", err.Error()).
|
|
||||||
Panic()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if database == nil {
|
if database == nil {
|
||||||
logrus.
|
log.Panic("tx.Must: database is nil")
|
||||||
WithField("path", "tx.Must").
|
|
||||||
WithField("err", "database is nil").
|
|
||||||
Panic()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return database
|
return database
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewSqliteTX(filepath string) (interfaces.Database, error) {
|
func NewSqliteTX(filepath string) (interfaces.Database, error) {
|
||||||
if err := os.MkdirAll(path.Dir(filepath), 0755); err != nil {
|
if err := os.MkdirAll(path.Dir(filepath), 0o755); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,8 +3,9 @@ package interfaces
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
"nf-repo/internal/model"
|
"nf-repo/internal/model"
|
||||||
"nf-repo/internal/util/rerr"
|
"nf-repo/internal/tool/rerr"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ManifestHandler interface {
|
type ManifestHandler interface {
|
||||||
|
@ -6,16 +6,18 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/samber/lo"
|
|
||||||
"github.com/sirupsen/logrus"
|
|
||||||
"gorm.io/gorm"
|
|
||||||
"gorm.io/gorm/clause"
|
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"nf-repo/internal/interfaces"
|
"nf-repo/internal/interfaces"
|
||||||
"nf-repo/internal/model"
|
"nf-repo/internal/model"
|
||||||
"nf-repo/internal/util/rerr"
|
"nf-repo/internal/tool/rerr"
|
||||||
"nf-repo/internal/util/tools"
|
"nf-repo/internal/tool/tools"
|
||||||
|
|
||||||
|
"github.com/loveuer/nf/nft/log"
|
||||||
|
"github.com/samber/lo"
|
||||||
|
"gorm.io/gorm"
|
||||||
|
"gorm.io/gorm/clause"
|
||||||
)
|
)
|
||||||
|
|
||||||
type pm struct {
|
type pm struct {
|
||||||
@ -56,7 +58,7 @@ func (m *dbManifests) Get(ctx context.Context, repo string, target string) (io.R
|
|||||||
return io.NopCloser(bytes.NewReader(pd.Content)), pd.ContentType, nil
|
return io.NopCloser(bytes.NewReader(pd.Content)), pd.ContentType, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
var pm = new(model.PackageManifest)
|
pm := new(model.PackageManifest)
|
||||||
|
|
||||||
if err = m.db.TX(tools.Timeout(5)).
|
if err = m.db.TX(tools.Timeout(5)).
|
||||||
Model(&model.PackageManifest{}).
|
Model(&model.PackageManifest{}).
|
||||||
@ -80,11 +82,7 @@ func (m *dbManifests) Get(ctx context.Context, repo string, target string) (io.R
|
|||||||
Where("id", pm.DigestId).
|
Where("id", pm.DigestId).
|
||||||
Take(pd).
|
Take(pd).
|
||||||
Error; err != nil {
|
Error; err != nil {
|
||||||
logrus.
|
log.Error("dbManifests: get err, digest = %s, err = %s", pm.Digest, err.Error())
|
||||||
WithField("path", "dbManifests.Get").
|
|
||||||
WithField("digest", pm.DigestId).
|
|
||||||
WithField("err", err.Error()).
|
|
||||||
Error()
|
|
||||||
return nil, "", rerr.ErrInternal(err)
|
return nil, "", rerr.ErrInternal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -92,7 +90,6 @@ func (m *dbManifests) Get(ctx context.Context, repo string, target string) (io.R
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (m *dbManifests) Put(ctx context.Context, repo string, tag string, digest string, mf *model.RepoSimpleManifest) *rerr.RepositoryError {
|
func (m *dbManifests) Put(ctx context.Context, repo string, tag string, digest string, mf *model.RepoSimpleManifest) *rerr.RepositoryError {
|
||||||
|
|
||||||
var (
|
var (
|
||||||
err error
|
err error
|
||||||
pm = &model.PackageManifest{
|
pm = &model.PackageManifest{
|
||||||
@ -132,13 +129,11 @@ func (m *dbManifests) Put(ctx context.Context, repo string, tag string, digest s
|
|||||||
Column: clause.Column{Name: "size"},
|
Column: clause.Column{Name: "size"},
|
||||||
Value: pd.Size,
|
Value: pd.Size,
|
||||||
},
|
},
|
||||||
}}).
|
},
|
||||||
|
}).
|
||||||
Create(pd).
|
Create(pd).
|
||||||
Error; err != nil {
|
Error; err != nil {
|
||||||
logrus.
|
log.Error("dbManifests: put create err, err = %s", err.Error())
|
||||||
WithField("path", "dbManifests.Put.Create").
|
|
||||||
WithField("err", err.Error()).
|
|
||||||
Error()
|
|
||||||
return rerr.ErrInternal(err)
|
return rerr.ErrInternal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -156,10 +151,7 @@ func (m *dbManifests) Put(ctx context.Context, repo string, tag string, digest s
|
|||||||
"digest_id": pm.DigestId,
|
"digest_id": pm.DigestId,
|
||||||
}).
|
}).
|
||||||
Error; err != nil {
|
Error; err != nil {
|
||||||
logrus.
|
log.Debug("dbManifests: put updates err, err = %s", err.Error())
|
||||||
WithField("path", "dbManifests.Put.Updates").
|
|
||||||
WithField("err", err.Error()).
|
|
||||||
Debug()
|
|
||||||
return rerr.ErrInternal(err)
|
return rerr.ErrInternal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -167,9 +159,7 @@ func (m *dbManifests) Put(ctx context.Context, repo string, tag string, digest s
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (m *dbManifests) Delete(ctx context.Context, repo string, target string) *rerr.RepositoryError {
|
func (m *dbManifests) Delete(ctx context.Context, repo string, target string) *rerr.RepositoryError {
|
||||||
var (
|
var err error
|
||||||
err error
|
|
||||||
)
|
|
||||||
|
|
||||||
if err = m.db.TX(tools.Timeout(5)).
|
if err = m.db.TX(tools.Timeout(5)).
|
||||||
Where("repo", repo).
|
Where("repo", repo).
|
||||||
@ -286,12 +276,7 @@ func (m *dbManifests) Referrers(ctx context.Context, repo string, target string)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
logrus.
|
log.Debug("dbManifests: referrers take err, repo = %s, target = %s, err = %s", repo, target, err.Error())
|
||||||
WithField("path", "dbManifests.Referrers.Take").
|
|
||||||
WithField("repo", repo).
|
|
||||||
WithField("target", target).
|
|
||||||
WithField("err", err.Error()).
|
|
||||||
Debug()
|
|
||||||
|
|
||||||
return nil, rerr.ErrInternal(err)
|
return nil, rerr.ErrInternal(err)
|
||||||
}
|
}
|
||||||
@ -309,11 +294,7 @@ func (m *dbManifests) Referrers(ctx context.Context, repo string, target string)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
logrus.
|
log.Error("dbManifests: referrers take err, repo = %s, target = %s, err = %s", repo, target, err.Error())
|
||||||
WithField("path", "dbManifests.Referrers.Take").
|
|
||||||
WithField("repo", repo).
|
|
||||||
WithField("target", target).
|
|
||||||
Error()
|
|
||||||
|
|
||||||
return nil, rerr.ErrInternal(err)
|
return nil, rerr.ErrInternal(err)
|
||||||
}
|
}
|
||||||
@ -323,23 +304,14 @@ func (m *dbManifests) Referrers(ctx context.Context, repo string, target string)
|
|||||||
Take(pd).
|
Take(pd).
|
||||||
Error; err != nil {
|
Error; err != nil {
|
||||||
|
|
||||||
logrus.
|
log.Error("dbManifests: referrers take err, repo = %s, target = %s, err = %s", repo, target, err.Error())
|
||||||
WithField("path", "dbManifests.Referrers.Take").
|
|
||||||
WithField("repo", repo).
|
|
||||||
WithField("target", target).
|
|
||||||
Error()
|
|
||||||
|
|
||||||
return nil, rerr.ErrInternal(err)
|
return nil, rerr.ErrInternal(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if err = json.Unmarshal(pd.Content, manifest); err != nil {
|
if err = json.Unmarshal(pd.Content, manifest); err != nil {
|
||||||
logrus.
|
log.Debug("dbManifests: referrers unmarshal err, repo %s, target = %s, err = %s", repo, target, err.Error())
|
||||||
WithField("path", "dbManifests.Referrers.Unmarshal").
|
|
||||||
WithField("repo", repo).
|
|
||||||
WithField("target", target).
|
|
||||||
WithField("err", err.Error()).
|
|
||||||
Debug()
|
|
||||||
return nil, rerr.ErrInternal(err)
|
return nil, rerr.ErrInternal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -347,18 +319,13 @@ func (m *dbManifests) Referrers(ctx context.Context, repo string, target string)
|
|||||||
}
|
}
|
||||||
|
|
||||||
func NewManifestDBHandler(tx interfaces.Database) interfaces.ManifestHandler {
|
func NewManifestDBHandler(tx interfaces.Database) interfaces.ManifestHandler {
|
||||||
var (
|
var err error
|
||||||
err error
|
|
||||||
)
|
|
||||||
|
|
||||||
if err = tx.TX(tools.Timeout(5)).AutoMigrate(
|
if err = tx.TX(tools.Timeout(5)).AutoMigrate(
|
||||||
&model.PackageManifest{},
|
&model.PackageManifest{},
|
||||||
&model.PackageDigest{},
|
&model.PackageDigest{},
|
||||||
); err != nil {
|
); err != nil {
|
||||||
logrus.
|
log.Panic("NewManifestDBHandler: db auto_migrate failed, err = %s", err.Error())
|
||||||
WithField("path", "NewManifestDBHandler").
|
|
||||||
WithField("method", "AutoMigrate").
|
|
||||||
Panic(err)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return &dbManifests{db: tx}
|
return &dbManifests{db: tx}
|
||||||
|
@ -5,16 +5,18 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/sirupsen/logrus"
|
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
"nf-repo/internal/interfaces"
|
|
||||||
"nf-repo/internal/model"
|
|
||||||
"nf-repo/internal/model/types"
|
|
||||||
"nf-repo/internal/util/rerr"
|
|
||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
|
"nf-repo/internal/interfaces"
|
||||||
|
"nf-repo/internal/model"
|
||||||
|
"nf-repo/internal/model/types"
|
||||||
|
"nf-repo/internal/tool/rerr"
|
||||||
|
|
||||||
|
"github.com/loveuer/nf/nft/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
type memManifest struct {
|
type memManifest struct {
|
||||||
@ -203,7 +205,7 @@ func (m *memManifest) Put(ctx context.Context, repo string, target string, diges
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// TODO: Probably want to do an existence check for blobs.
|
// TODO: Probably want to do an existence check for blobs.
|
||||||
logrus.Warnf("TODO: Check blobs for %q", desc.Digest)
|
log.Warn("TODO: Check blobs for %q", desc.Digest)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
@ -3,8 +3,9 @@ package interfaces
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
"nf-repo/internal/model"
|
"nf-repo/internal/model"
|
||||||
"nf-repo/internal/util/rerr"
|
"nf-repo/internal/tool/rerr"
|
||||||
)
|
)
|
||||||
|
|
||||||
type UploadHandler interface {
|
type UploadHandler interface {
|
||||||
|
@ -4,17 +4,19 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/sirupsen/logrus"
|
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
"nf-repo/internal/interfaces"
|
|
||||||
"nf-repo/internal/model"
|
|
||||||
"nf-repo/internal/util/rerr"
|
|
||||||
"nf-repo/internal/verify"
|
|
||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"nf-repo/internal/interfaces"
|
||||||
|
"nf-repo/internal/model"
|
||||||
|
"nf-repo/internal/tool/rerr"
|
||||||
|
"nf-repo/internal/verify"
|
||||||
|
|
||||||
|
"github.com/loveuer/nf/nft/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
type localUploader struct {
|
type localUploader struct {
|
||||||
@ -52,10 +54,9 @@ func (l *localUploader) Write(ctx context.Context, id string, reader io.ReadClos
|
|||||||
|
|
||||||
if start > 0 {
|
if start > 0 {
|
||||||
flag = os.O_APPEND | os.O_RDWR
|
flag = os.O_APPEND | os.O_RDWR
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if f, err = os.OpenFile(filename, flag, 0644); err != nil {
|
if f, err = os.OpenFile(filename, flag, 0o644); err != nil {
|
||||||
return 0, rerr.ErrInternal(err)
|
return 0, rerr.ErrInternal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -84,7 +85,7 @@ func (l *localUploader) Done(ctx context.Context, bh interfaces.BlobHandler, id
|
|||||||
filename = path.Join(l.basedir, id)
|
filename = path.Join(l.basedir, id)
|
||||||
)
|
)
|
||||||
|
|
||||||
if f, err = os.OpenFile(filename, os.O_RDONLY, 0644); err != nil {
|
if f, err = os.OpenFile(filename, os.O_RDONLY, 0o644); err != nil {
|
||||||
return rerr.ErrInternal(err)
|
return rerr.ErrInternal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -96,19 +97,11 @@ func (l *localUploader) Done(ctx context.Context, bh interfaces.BlobHandler, id
|
|||||||
}
|
}
|
||||||
defer vrc.Close()
|
defer vrc.Close()
|
||||||
|
|
||||||
logrus.
|
log.Error("localUploader: upload done, id = %s, size = %d", id, size)
|
||||||
WithField("path", "localUploader.Done").
|
|
||||||
WithField("id", id).
|
|
||||||
WithField("size", size).
|
|
||||||
Error()
|
|
||||||
|
|
||||||
if err := bh.Put(ctx, repo, hash, vrc); err != nil {
|
if err := bh.Put(ctx, repo, hash, vrc); err != nil {
|
||||||
if errors.As(err, &verify.Error{}) {
|
if errors.As(err, &verify.Error{}) {
|
||||||
logrus.
|
log.Debug("localUploader: blob handler put err, repo = %s, hash = %s, err = %s", repo, hash.String(), fmt.Sprintf("Digest mismatch: %v", err))
|
||||||
WithField("path", "handleBlobs.Put").
|
|
||||||
WithField("repo", repo).
|
|
||||||
WithField("hash", hash.String()).
|
|
||||||
WithField("err", fmt.Sprintf("Digest mismatch: %v", err)).Debug()
|
|
||||||
return rerr.ErrDigestMismatch
|
return rerr.ErrDigestMismatch
|
||||||
}
|
}
|
||||||
return rerr.ErrInternal(err)
|
return rerr.ErrInternal(err)
|
||||||
@ -118,27 +111,17 @@ func (l *localUploader) Done(ctx context.Context, bh interfaces.BlobHandler, id
|
|||||||
f.Close()
|
f.Close()
|
||||||
|
|
||||||
if err = os.Remove(filename); err != nil {
|
if err = os.Remove(filename); err != nil {
|
||||||
logrus.
|
log.Warn("localUploader: os remove err, filename = %s, err = %s", filename, err.Error())
|
||||||
WithField("path", "localUploader.Done.Remove").
|
|
||||||
WithField("filename", filename).
|
|
||||||
WithField("err", err.Error()).
|
|
||||||
Warn()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewLocalUploader(basedir string) interfaces.UploadHandler {
|
func NewLocalUploader(basedir string) interfaces.UploadHandler {
|
||||||
var (
|
var err error
|
||||||
err error
|
|
||||||
)
|
|
||||||
|
|
||||||
if err = os.MkdirAll(basedir, 0755); err != nil {
|
if err = os.MkdirAll(basedir, 0o755); err != nil {
|
||||||
logrus.
|
log.Panic("NewLocalUploader: os MkdirAll err, basedir = %s, err = %s", basedir, err.Error())
|
||||||
WithField("path", "uploads.localUploader.NewLocalUploader").
|
|
||||||
WithField("basedir", basedir).
|
|
||||||
WithField("err", err.Error()).
|
|
||||||
Panic()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return &localUploader{lock: sync.Mutex{}, basedir: basedir, sizeMap: make(map[string]int)}
|
return &localUploader{lock: sync.Mutex{}, basedir: basedir, sizeMap: make(map[string]int)}
|
||||||
|
@ -5,16 +5,18 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/sirupsen/logrus"
|
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
"nf-repo/internal/interfaces"
|
|
||||||
"nf-repo/internal/model"
|
|
||||||
"nf-repo/internal/util/rerr"
|
|
||||||
"nf-repo/internal/verify"
|
|
||||||
"strconv"
|
"strconv"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"nf-repo/internal/interfaces"
|
||||||
|
"nf-repo/internal/model"
|
||||||
|
"nf-repo/internal/tool/rerr"
|
||||||
|
"nf-repo/internal/verify"
|
||||||
|
|
||||||
|
"github.com/loveuer/nf/nft/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
type memUploader struct {
|
type memUploader struct {
|
||||||
@ -77,11 +79,7 @@ func (m *memUploader) Done(ctx context.Context, bh interfaces.BlobHandler, id st
|
|||||||
|
|
||||||
if err := bh.Put(ctx, repo, hash, vrc); err != nil {
|
if err := bh.Put(ctx, repo, hash, vrc); err != nil {
|
||||||
if errors.As(err, &verify.Error{}) {
|
if errors.As(err, &verify.Error{}) {
|
||||||
logrus.
|
log.Debug("memUploader: handle blob put err, repo = %s, hash = %s, err = %s", repo, hash.String(), fmt.Sprintf("Digest mismatch: %v", err))
|
||||||
WithField("path", "handleBlobs.Put").
|
|
||||||
WithField("repo", repo).
|
|
||||||
WithField("hash", hash.String()).
|
|
||||||
WithField("err", fmt.Sprintf("Digest mismatch: %v", err)).Debug()
|
|
||||||
return rerr.ErrDigestMismatch
|
return rerr.ErrDigestMismatch
|
||||||
}
|
}
|
||||||
return rerr.ErrInternal(err)
|
return rerr.ErrInternal(err)
|
||||||
|
@ -1,333 +0,0 @@
|
|||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
Package: @angular/core
|
|
||||||
License: "MIT"
|
|
||||||
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
Package: rxjs
|
|
||||||
License: "Apache-2.0"
|
|
||||||
|
|
||||||
Apache License
|
|
||||||
Version 2.0, January 2004
|
|
||||||
http://www.apache.org/licenses/
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
||||||
|
|
||||||
1. Definitions.
|
|
||||||
|
|
||||||
"License" shall mean the terms and conditions for use, reproduction,
|
|
||||||
and distribution as defined by Sections 1 through 9 of this document.
|
|
||||||
|
|
||||||
"Licensor" shall mean the copyright owner or entity authorized by
|
|
||||||
the copyright owner that is granting the License.
|
|
||||||
|
|
||||||
"Legal Entity" shall mean the union of the acting entity and all
|
|
||||||
other entities that control, are controlled by, or are under common
|
|
||||||
control with that entity. For the purposes of this definition,
|
|
||||||
"control" means (i) the power, direct or indirect, to cause the
|
|
||||||
direction or management of such entity, whether by contract or
|
|
||||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
||||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
||||||
|
|
||||||
"You" (or "Your") shall mean an individual or Legal Entity
|
|
||||||
exercising permissions granted by this License.
|
|
||||||
|
|
||||||
"Source" form shall mean the preferred form for making modifications,
|
|
||||||
including but not limited to software source code, documentation
|
|
||||||
source, and configuration files.
|
|
||||||
|
|
||||||
"Object" form shall mean any form resulting from mechanical
|
|
||||||
transformation or translation of a Source form, including but
|
|
||||||
not limited to compiled object code, generated documentation,
|
|
||||||
and conversions to other media types.
|
|
||||||
|
|
||||||
"Work" shall mean the work of authorship, whether in Source or
|
|
||||||
Object form, made available under the License, as indicated by a
|
|
||||||
copyright notice that is included in or attached to the work
|
|
||||||
(an example is provided in the Appendix below).
|
|
||||||
|
|
||||||
"Derivative Works" shall mean any work, whether in Source or Object
|
|
||||||
form, that is based on (or derived from) the Work and for which the
|
|
||||||
editorial revisions, annotations, elaborations, or other modifications
|
|
||||||
represent, as a whole, an original work of authorship. For the purposes
|
|
||||||
of this License, Derivative Works shall not include works that remain
|
|
||||||
separable from, or merely link (or bind by name) to the interfaces of,
|
|
||||||
the Work and Derivative Works thereof.
|
|
||||||
|
|
||||||
"Contribution" shall mean any work of authorship, including
|
|
||||||
the original version of the Work and any modifications or additions
|
|
||||||
to that Work or Derivative Works thereof, that is intentionally
|
|
||||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
||||||
or by an individual or Legal Entity authorized to submit on behalf of
|
|
||||||
the copyright owner. For the purposes of this definition, "submitted"
|
|
||||||
means any form of electronic, verbal, or written communication sent
|
|
||||||
to the Licensor or its representatives, including but not limited to
|
|
||||||
communication on electronic mailing lists, source code control systems,
|
|
||||||
and issue tracking systems that are managed by, or on behalf of, the
|
|
||||||
Licensor for the purpose of discussing and improving the Work, but
|
|
||||||
excluding communication that is conspicuously marked or otherwise
|
|
||||||
designated in writing by the copyright owner as "Not a Contribution."
|
|
||||||
|
|
||||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
||||||
on behalf of whom a Contribution has been received by Licensor and
|
|
||||||
subsequently incorporated within the Work.
|
|
||||||
|
|
||||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
copyright license to reproduce, prepare Derivative Works of,
|
|
||||||
publicly display, publicly perform, sublicense, and distribute the
|
|
||||||
Work and such Derivative Works in Source or Object form.
|
|
||||||
|
|
||||||
3. Grant of Patent License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
(except as stated in this section) patent license to make, have made,
|
|
||||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
||||||
where such license applies only to those patent claims licensable
|
|
||||||
by such Contributor that are necessarily infringed by their
|
|
||||||
Contribution(s) alone or by combination of their Contribution(s)
|
|
||||||
with the Work to which such Contribution(s) was submitted. If You
|
|
||||||
institute patent litigation against any entity (including a
|
|
||||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
||||||
or a Contribution incorporated within the Work constitutes direct
|
|
||||||
or contributory patent infringement, then any patent licenses
|
|
||||||
granted to You under this License for that Work shall terminate
|
|
||||||
as of the date such litigation is filed.
|
|
||||||
|
|
||||||
4. Redistribution. You may reproduce and distribute copies of the
|
|
||||||
Work or Derivative Works thereof in any medium, with or without
|
|
||||||
modifications, and in Source or Object form, provided that You
|
|
||||||
meet the following conditions:
|
|
||||||
|
|
||||||
(a) You must give any other recipients of the Work or
|
|
||||||
Derivative Works a copy of this License; and
|
|
||||||
|
|
||||||
(b) You must cause any modified files to carry prominent notices
|
|
||||||
stating that You changed the files; and
|
|
||||||
|
|
||||||
(c) You must retain, in the Source form of any Derivative Works
|
|
||||||
that You distribute, all copyright, patent, trademark, and
|
|
||||||
attribution notices from the Source form of the Work,
|
|
||||||
excluding those notices that do not pertain to any part of
|
|
||||||
the Derivative Works; and
|
|
||||||
|
|
||||||
(d) If the Work includes a "NOTICE" text file as part of its
|
|
||||||
distribution, then any Derivative Works that You distribute must
|
|
||||||
include a readable copy of the attribution notices contained
|
|
||||||
within such NOTICE file, excluding those notices that do not
|
|
||||||
pertain to any part of the Derivative Works, in at least one
|
|
||||||
of the following places: within a NOTICE text file distributed
|
|
||||||
as part of the Derivative Works; within the Source form or
|
|
||||||
documentation, if provided along with the Derivative Works; or,
|
|
||||||
within a display generated by the Derivative Works, if and
|
|
||||||
wherever such third-party notices normally appear. The contents
|
|
||||||
of the NOTICE file are for informational purposes only and
|
|
||||||
do not modify the License. You may add Your own attribution
|
|
||||||
notices within Derivative Works that You distribute, alongside
|
|
||||||
or as an addendum to the NOTICE text from the Work, provided
|
|
||||||
that such additional attribution notices cannot be construed
|
|
||||||
as modifying the License.
|
|
||||||
|
|
||||||
You may add Your own copyright statement to Your modifications and
|
|
||||||
may provide additional or different license terms and conditions
|
|
||||||
for use, reproduction, or distribution of Your modifications, or
|
|
||||||
for any such Derivative Works as a whole, provided Your use,
|
|
||||||
reproduction, and distribution of the Work otherwise complies with
|
|
||||||
the conditions stated in this License.
|
|
||||||
|
|
||||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
||||||
any Contribution intentionally submitted for inclusion in the Work
|
|
||||||
by You to the Licensor shall be under the terms and conditions of
|
|
||||||
this License, without any additional terms or conditions.
|
|
||||||
Notwithstanding the above, nothing herein shall supersede or modify
|
|
||||||
the terms of any separate license agreement you may have executed
|
|
||||||
with Licensor regarding such Contributions.
|
|
||||||
|
|
||||||
6. Trademarks. This License does not grant permission to use the trade
|
|
||||||
names, trademarks, service marks, or product names of the Licensor,
|
|
||||||
except as required for reasonable and customary use in describing the
|
|
||||||
origin of the Work and reproducing the content of the NOTICE file.
|
|
||||||
|
|
||||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
||||||
agreed to in writing, Licensor provides the Work (and each
|
|
||||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
||||||
implied, including, without limitation, any warranties or conditions
|
|
||||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
||||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
||||||
appropriateness of using or redistributing the Work and assume any
|
|
||||||
risks associated with Your exercise of permissions under this License.
|
|
||||||
|
|
||||||
8. Limitation of Liability. In no event and under no legal theory,
|
|
||||||
whether in tort (including negligence), contract, or otherwise,
|
|
||||||
unless required by applicable law (such as deliberate and grossly
|
|
||||||
negligent acts) or agreed to in writing, shall any Contributor be
|
|
||||||
liable to You for damages, including any direct, indirect, special,
|
|
||||||
incidental, or consequential damages of any character arising as a
|
|
||||||
result of this License or out of the use or inability to use the
|
|
||||||
Work (including but not limited to damages for loss of goodwill,
|
|
||||||
work stoppage, computer failure or malfunction, or any and all
|
|
||||||
other commercial damages or losses), even if such Contributor
|
|
||||||
has been advised of the possibility of such damages.
|
|
||||||
|
|
||||||
9. Accepting Warranty or Additional Liability. While redistributing
|
|
||||||
the Work or Derivative Works thereof, You may choose to offer,
|
|
||||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
||||||
or other liability obligations and/or rights consistent with this
|
|
||||||
License. However, in accepting such obligations, You may act only
|
|
||||||
on Your own behalf and on Your sole responsibility, not on behalf
|
|
||||||
of any other Contributor, and only if You agree to indemnify,
|
|
||||||
defend, and hold each Contributor harmless for any liability
|
|
||||||
incurred by, or claims asserted against, such Contributor by reason
|
|
||||||
of your accepting any such warranty or additional liability.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
APPENDIX: How to apply the Apache License to your work.
|
|
||||||
|
|
||||||
To apply the Apache License to your work, attach the following
|
|
||||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
||||||
replaced with your own identifying information. (Don't include
|
|
||||||
the brackets!) The text should be enclosed in the appropriate
|
|
||||||
comment syntax for the file format. We also recommend that a
|
|
||||||
file or class name and description of purpose be included on the
|
|
||||||
same "printed page" as the copyright notice for easier
|
|
||||||
identification within third-party archives.
|
|
||||||
|
|
||||||
Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
Package: tslib
|
|
||||||
License: "0BSD"
|
|
||||||
|
|
||||||
Copyright (c) Microsoft Corporation.
|
|
||||||
|
|
||||||
Permission to use, copy, modify, and/or distribute this software for any
|
|
||||||
purpose with or without fee is hereby granted.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
||||||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
||||||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
||||||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
||||||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
||||||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
||||||
PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
Package: @angular/common
|
|
||||||
License: "MIT"
|
|
||||||
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
Package: @angular/platform-browser
|
|
||||||
License: "MIT"
|
|
||||||
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
Package: @angular/router
|
|
||||||
License: "MIT"
|
|
||||||
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
Package: @angular/cdk
|
|
||||||
License: "MIT"
|
|
||||||
|
|
||||||
The MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2024 Google LLC.
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
THE SOFTWARE.
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
Package: @angular/material
|
|
||||||
License: "MIT"
|
|
||||||
|
|
||||||
The MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2024 Google LLC.
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
THE SOFTWARE.
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
Package: @angular/animations
|
|
||||||
License: "MIT"
|
|
||||||
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
Package: @angular/forms
|
|
||||||
License: "MIT"
|
|
||||||
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
Package: zone.js
|
|
||||||
License: "MIT"
|
|
||||||
|
|
||||||
The MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2010-2023 Google LLC. https://angular.io/license
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
THE SOFTWARE.
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
Binary file not shown.
Before Width: | Height: | Size: 15 KiB |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,61 +0,0 @@
|
|||||||
package front
|
|
||||||
|
|
||||||
import (
|
|
||||||
"embed"
|
|
||||||
"fmt"
|
|
||||||
"github.com/loveuer/nf"
|
|
||||||
"github.com/loveuer/nf/nft/log"
|
|
||||||
"net/http"
|
|
||||||
"strings"
|
|
||||||
)
|
|
||||||
|
|
||||||
//go:embed dist/front/browser
|
|
||||||
var DefaultFront embed.FS
|
|
||||||
|
|
||||||
func NewFront(ff *embed.FS, basePath string) nf.HandlerFunc {
|
|
||||||
var (
|
|
||||||
e error
|
|
||||||
indexBytes []byte
|
|
||||||
index string
|
|
||||||
)
|
|
||||||
|
|
||||||
index = fmt.Sprintf("%s/index.html", basePath)
|
|
||||||
|
|
||||||
if indexBytes, e = ff.ReadFile(index); e != nil {
|
|
||||||
log.Panic("read index file err: %v", e)
|
|
||||||
}
|
|
||||||
|
|
||||||
return func(c *nf.Ctx) error {
|
|
||||||
var (
|
|
||||||
err error
|
|
||||||
bs []byte
|
|
||||||
path = c.Path()
|
|
||||||
)
|
|
||||||
|
|
||||||
if bs, err = ff.ReadFile(basePath + path); err != nil {
|
|
||||||
log.Debug("embed read file [%s]%s err: %v", basePath, path, err)
|
|
||||||
c.Set("Content-Type", "text/html")
|
|
||||||
_, err = c.Write(indexBytes)
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
var dbs []byte
|
|
||||||
if len(bs) > 512 {
|
|
||||||
dbs = bs[:512]
|
|
||||||
} else {
|
|
||||||
dbs = bs
|
|
||||||
}
|
|
||||||
|
|
||||||
switch {
|
|
||||||
case strings.HasSuffix(path, ".js"):
|
|
||||||
c.Set("Content-Type", "application/javascript")
|
|
||||||
case strings.HasSuffix(path, ".css"):
|
|
||||||
c.Set("Content-Type", "text/css")
|
|
||||||
default:
|
|
||||||
c.Set("Content-Type", http.DetectContentType(dbs))
|
|
||||||
}
|
|
||||||
|
|
||||||
_, err = c.Write(bs)
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
@ -2,9 +2,11 @@ package model
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"io"
|
||||||
|
|
||||||
v1 "github.com/google/go-containerregistry/pkg/v1"
|
v1 "github.com/google/go-containerregistry/pkg/v1"
|
||||||
"github.com/samber/lo"
|
"github.com/samber/lo"
|
||||||
"io"
|
|
||||||
"nf-repo/internal/model/types"
|
"nf-repo/internal/model/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1,16 +1,27 @@
|
|||||||
package opt
|
package opt
|
||||||
|
|
||||||
import "errors"
|
import (
|
||||||
|
"errors"
|
||||||
|
"net/url"
|
||||||
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
DefaultMaxSize = 1024 * 1024 * 1024
|
DefaultMaxSize = 1024 * 1024 * 1024
|
||||||
ReferrersEnabled = true
|
ReferrersEnabled = true
|
||||||
|
|
||||||
BaseAddress = "repo.me"
|
|
||||||
RoleMustLess = true
|
RoleMustLess = true
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type config struct {
|
||||||
|
Debug bool
|
||||||
|
RepoName string
|
||||||
|
Address string
|
||||||
|
DataPath string
|
||||||
|
Proxy string
|
||||||
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
Debug = false
|
Cfg = &config{}
|
||||||
|
Proxy *url.URL
|
||||||
ErrNotFound = errors.New("not found")
|
ErrNotFound = errors.New("not found")
|
||||||
)
|
)
|
||||||
|
125
internal/tool/tools/table.go
Normal file
125
internal/tool/tools/table.go
Normal file
@ -0,0 +1,125 @@
|
|||||||
|
package tools
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
"fmt"
|
||||||
|
"io"
|
||||||
|
"os"
|
||||||
|
"reflect"
|
||||||
|
"strings"
|
||||||
|
|
||||||
|
"github.com/jedib0t/go-pretty/v6/table"
|
||||||
|
"github.com/loveuer/nf/nft/log"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TablePrinter(data any, writers ...io.Writer) {
|
||||||
|
var w io.Writer = os.Stdout
|
||||||
|
if len(writers) > 0 && writers[0] != nil {
|
||||||
|
w = writers[0]
|
||||||
|
}
|
||||||
|
|
||||||
|
t := table.NewWriter()
|
||||||
|
structPrinter(t, "", data)
|
||||||
|
_, _ = fmt.Fprintln(w, t.Render())
|
||||||
|
}
|
||||||
|
|
||||||
|
func structPrinter(w table.Writer, prefix string, item any) {
|
||||||
|
Start:
|
||||||
|
rv := reflect.ValueOf(item)
|
||||||
|
if rv.IsZero() {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
for rv.Type().Kind() == reflect.Pointer {
|
||||||
|
rv = rv.Elem()
|
||||||
|
}
|
||||||
|
|
||||||
|
switch rv.Type().Kind() {
|
||||||
|
case reflect.Invalid,
|
||||||
|
reflect.Uintptr,
|
||||||
|
reflect.Chan,
|
||||||
|
reflect.Func,
|
||||||
|
reflect.UnsafePointer:
|
||||||
|
case reflect.Bool,
|
||||||
|
reflect.Int,
|
||||||
|
reflect.Int8,
|
||||||
|
reflect.Int16,
|
||||||
|
reflect.Int32,
|
||||||
|
reflect.Int64,
|
||||||
|
reflect.Uint,
|
||||||
|
reflect.Uint8,
|
||||||
|
reflect.Uint16,
|
||||||
|
reflect.Uint32,
|
||||||
|
reflect.Uint64,
|
||||||
|
reflect.Float32,
|
||||||
|
reflect.Float64,
|
||||||
|
reflect.Complex64,
|
||||||
|
reflect.Complex128,
|
||||||
|
reflect.Interface:
|
||||||
|
w.AppendRow(table.Row{strings.TrimPrefix(prefix, "."), rv.Interface()})
|
||||||
|
case reflect.String:
|
||||||
|
val := rv.String()
|
||||||
|
if len(val) <= 160 {
|
||||||
|
w.AppendRow(table.Row{strings.TrimPrefix(prefix, "."), val})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
w.AppendRow(table.Row{strings.TrimPrefix(prefix, "."), val[0:64] + "..." + val[len(val)-64:]})
|
||||||
|
case reflect.Array, reflect.Slice:
|
||||||
|
for i := 0; i < rv.Len(); i++ {
|
||||||
|
p := strings.Join([]string{prefix, fmt.Sprintf("[%d]", i)}, ".")
|
||||||
|
structPrinter(w, p, rv.Index(i).Interface())
|
||||||
|
}
|
||||||
|
case reflect.Map:
|
||||||
|
for _, k := range rv.MapKeys() {
|
||||||
|
structPrinter(w, fmt.Sprintf("%s.{%v}", prefix, k), rv.MapIndex(k).Interface())
|
||||||
|
}
|
||||||
|
case reflect.Pointer:
|
||||||
|
goto Start
|
||||||
|
case reflect.Struct:
|
||||||
|
for i := 0; i < rv.NumField(); i++ {
|
||||||
|
p := fmt.Sprintf("%s.%s", prefix, rv.Type().Field(i).Name)
|
||||||
|
field := rv.Field(i)
|
||||||
|
|
||||||
|
// log.Debug("TablePrinter: prefix: %s, field: %v", p, rv.Field(i))
|
||||||
|
|
||||||
|
if !field.CanInterface() {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
structPrinter(w, p, field.Interface())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TableMapPrinter(data []byte) {
|
||||||
|
m := make(map[string]any)
|
||||||
|
if err := json.Unmarshal(data, &m); err != nil {
|
||||||
|
log.Warn(err.Error())
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
t := table.NewWriter()
|
||||||
|
addRow(t, "", m)
|
||||||
|
fmt.Println(t.Render())
|
||||||
|
}
|
||||||
|
|
||||||
|
func addRow(w table.Writer, prefix string, m any) {
|
||||||
|
rv := reflect.ValueOf(m)
|
||||||
|
switch rv.Type().Kind() {
|
||||||
|
case reflect.Map:
|
||||||
|
for _, k := range rv.MapKeys() {
|
||||||
|
key := k.String()
|
||||||
|
if prefix != "" {
|
||||||
|
key = strings.Join([]string{prefix, k.String()}, ".")
|
||||||
|
}
|
||||||
|
addRow(w, key, rv.MapIndex(k).Interface())
|
||||||
|
}
|
||||||
|
case reflect.Slice, reflect.Array:
|
||||||
|
for i := 0; i < rv.Len(); i++ {
|
||||||
|
addRow(w, fmt.Sprintf("%s[%d]", prefix, i), rv.Index(i).Interface())
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
w.AppendRow(table.Row{prefix, m})
|
||||||
|
}
|
||||||
|
}
|
75
main.go
75
main.go
@ -4,9 +4,14 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"crypto/tls"
|
|
||||||
"flag"
|
"flag"
|
||||||
"github.com/sirupsen/logrus"
|
"net/url"
|
||||||
|
"os/signal"
|
||||||
|
"path"
|
||||||
|
"syscall"
|
||||||
|
|
||||||
|
"github.com/loveuer/nf/nft/log"
|
||||||
|
|
||||||
"nf-repo/internal/api"
|
"nf-repo/internal/api"
|
||||||
"nf-repo/internal/interfaces"
|
"nf-repo/internal/interfaces"
|
||||||
"nf-repo/internal/interfaces/blobs"
|
"nf-repo/internal/interfaces/blobs"
|
||||||
@ -14,39 +19,33 @@ import (
|
|||||||
"nf-repo/internal/interfaces/manifests"
|
"nf-repo/internal/interfaces/manifests"
|
||||||
"nf-repo/internal/interfaces/uploads"
|
"nf-repo/internal/interfaces/uploads"
|
||||||
"nf-repo/internal/opt"
|
"nf-repo/internal/opt"
|
||||||
"path"
|
"nf-repo/internal/tool/tools"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
tlsCfg *tls.Config
|
bh interfaces.BlobHandler
|
||||||
bh interfaces.BlobHandler
|
uh interfaces.UploadHandler
|
||||||
uh interfaces.UploadHandler
|
mh interfaces.ManifestHandler
|
||||||
mh interfaces.ManifestHandler
|
|
||||||
crtPath, keyPath, dataPath string
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
flag.BoolVar(&opt.Debug, "debug", false, "debug mode")
|
flag.BoolVar(&opt.Cfg.Debug, "debug", false, "debug mode")
|
||||||
flag.StringVar(&crtPath, "crt", "etc/repo.me.crt", "certificate file")
|
flag.StringVar(&opt.Cfg.RepoName, "repo", "repo.me", "repo name")
|
||||||
flag.StringVar(&keyPath, "key", "etc/repo.me.key", "certificate key file")
|
flag.StringVar(&opt.Cfg.Address, "address", "127.0.0.1:8383", "listen address")
|
||||||
flag.StringVar(&dataPath, "data", "images", "images, sqlite ... data path")
|
flag.StringVar(&opt.Cfg.DataPath, "data", "/data", "images, sqlite ... data path")
|
||||||
|
flag.StringVar(&opt.Cfg.Proxy, "proxy", "", "proxy url")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
if opt.Debug {
|
tools.TablePrinter(opt.Cfg)
|
||||||
logrus.SetFormatter(&logrus.JSONFormatter{TimestampFormat: "06/01/02 15:04:05"})
|
|
||||||
logrus.SetLevel(logrus.DebugLevel)
|
var err error
|
||||||
logrus.SetReportCaller(true)
|
|
||||||
|
if opt.Cfg.Debug {
|
||||||
|
log.SetLogLevel(log.LogLevelDebug)
|
||||||
}
|
}
|
||||||
|
|
||||||
crt, err := tls.LoadX509KeyPair(crtPath, keyPath)
|
mh = manifests.NewManifestDBHandler(dbs.Must(dbs.NewSqliteTX(path.Join(opt.Cfg.DataPath, "data.sqlite"))))
|
||||||
if err != nil {
|
bh = blobs.NewLocalBlobHandler(path.Join(opt.Cfg.DataPath, "layers"))
|
||||||
logrus.Panic(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
tlsCfg = &tls.Config{Certificates: []tls.Certificate{crt}}
|
|
||||||
|
|
||||||
mh = manifests.NewManifestDBHandler(dbs.Must(dbs.NewSqliteTX(path.Join(dataPath, "data.sqlite"))))
|
|
||||||
bh = blobs.NewLocalBlobHandler(path.Join(dataPath, "layers"))
|
|
||||||
//bh = blobs.NewS3BlobHandler(
|
//bh = blobs.NewS3BlobHandler(
|
||||||
// context.TODO(),
|
// context.TODO(),
|
||||||
// "http://10.230.200.74:9000",
|
// "http://10.230.200.74:9000",
|
||||||
@ -54,11 +53,31 @@ func init() {
|
|||||||
// "NavjSle5qQjE2rjz81hEwZW3S2fUVa66",
|
// "NavjSle5qQjE2rjz81hEwZW3S2fUVa66",
|
||||||
// "repo.me",
|
// "repo.me",
|
||||||
//)
|
//)
|
||||||
uh = uploads.NewLocalUploader(path.Join(dataPath, "uploads"))
|
uh = uploads.NewLocalUploader(path.Join(opt.Cfg.DataPath, "uploads"))
|
||||||
|
|
||||||
|
if opt.Cfg.Proxy != "" {
|
||||||
|
if opt.Proxy, err = url.Parse(opt.Cfg.Proxy); err != nil {
|
||||||
|
log.Fatal("invalid proxy address")
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
app := api.NewApi(context.TODO(), bh, uh, mh)
|
ctx, cancel := signal.NotifyContext(context.Background(), syscall.SIGHUP, syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT)
|
||||||
|
defer cancel()
|
||||||
|
|
||||||
logrus.Fatal(app.RunTLS(":443", tlsCfg))
|
app := api.NewApi(ctx, bh, uh, mh)
|
||||||
|
|
||||||
|
go func() {
|
||||||
|
app.Run(opt.Cfg.Address)
|
||||||
|
}()
|
||||||
|
|
||||||
|
go func() {
|
||||||
|
<-ctx.Done()
|
||||||
|
app.Shutdown(tools.Timeout(3))
|
||||||
|
}()
|
||||||
|
|
||||||
|
<-ctx.Done()
|
||||||
|
log.Warn("received quit signal...")
|
||||||
|
<-tools.Timeout(3).Done()
|
||||||
}
|
}
|
||||||
|
22
readme.md
Normal file
22
readme.md
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
# ❤️ repo.me
|
||||||
|
|
||||||
|
## 我的 image repository
|
||||||
|
|
||||||
|
### build
|
||||||
|
|
||||||
|
`docker build -t <image> -f Dockerfile .`
|
||||||
|
|
||||||
|
### deployment
|
||||||
|
```sh
|
||||||
|
docker run -d --name repo-me \
|
||||||
|
--restart unless-stopped \
|
||||||
|
-v /data/repo-me:/data \
|
||||||
|
-v <nginx_config>:/etc/nginx/nginx.conf \
|
||||||
|
-p 80:80 \
|
||||||
|
<image> \
|
||||||
|
-debug false \
|
||||||
|
-repo repo.me \
|
||||||
|
-address 127.0.0.1:80 \
|
||||||
|
-data /data \
|
||||||
|
-proxy <(http|socks5)://proxy_address>
|
||||||
|
```
|
127
x/t1/main.go
127
x/t1/main.go
@ -1,127 +0,0 @@
|
|||||||
// https://iximiuz.com/en/posts/working-with-container-images-in-go/
|
|
||||||
// package main
|
|
||||||
//
|
|
||||||
// import (
|
|
||||||
//
|
|
||||||
// "context"
|
|
||||||
// "nf-repo/internal/util/tools"
|
|
||||||
// "os"
|
|
||||||
//
|
|
||||||
// "github.com/containers/image/copy"
|
|
||||||
// "github.com/containers/image/signature"
|
|
||||||
// "github.com/containers/image/storage"
|
|
||||||
// "github.com/containers/image/transports/alltransports"
|
|
||||||
// "github.com/containers/image/types"
|
|
||||||
//
|
|
||||||
// )
|
|
||||||
//
|
|
||||||
// func main() {
|
|
||||||
// imageName := "docker://alpine:latest"
|
|
||||||
// srcRef, _ := alltransports.ParseImageName(imageName)
|
|
||||||
//
|
|
||||||
// // Carries various default locations.
|
|
||||||
// systemCtx := &types.SystemContext{}
|
|
||||||
// policy, _ := signature.DefaultPolicy(systemCtx)
|
|
||||||
// policyCtx, _ := signature.NewPolicyContext(policy)
|
|
||||||
//
|
|
||||||
// dstName := imageName
|
|
||||||
// if srcRef.DockerReference() != nil {
|
|
||||||
// dstName = srcRef.DockerReference().String()
|
|
||||||
// }
|
|
||||||
// store := createStore() // see previous section
|
|
||||||
// dstRef, _ := storage.Transport.ParseStoreReference(store, dstName)
|
|
||||||
//
|
|
||||||
// copyOptions := ©.Options{ReportWriter: os.Stdout}
|
|
||||||
// manifest, _ := copy.Image(
|
|
||||||
// context.Background(),
|
|
||||||
// policyCtx,
|
|
||||||
// dstRef,
|
|
||||||
// srcRef,
|
|
||||||
// copyOptions,
|
|
||||||
// )
|
|
||||||
// println(string(manifest))
|
|
||||||
// }
|
|
||||||
|
|
||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"encoding/json"
|
|
||||||
"github.com/containers/image/v5/pkg/blobinfocache"
|
|
||||||
"github.com/containers/image/v5/transports/alltransports"
|
|
||||||
"github.com/containers/image/v5/types"
|
|
||||||
digest "github.com/opencontainers/go-digest"
|
|
||||||
"log"
|
|
||||||
"nf-repo/internal/util/tools"
|
|
||||||
"runtime"
|
|
||||||
)
|
|
||||||
|
|
||||||
type M struct {
|
|
||||||
Manifests []struct {
|
|
||||||
Digest string `json:"digest"`
|
|
||||||
MediaType string `json:"mediaType"`
|
|
||||||
Platform struct {
|
|
||||||
Architecture string `json:"architecture"`
|
|
||||||
Os string `json:"os"`
|
|
||||||
Variant string `json:"variant,omitempty"`
|
|
||||||
} `json:"platform"`
|
|
||||||
Size int `json:"size"`
|
|
||||||
} `json:"manifests"`
|
|
||||||
MediaType string `json:"mediaType"`
|
|
||||||
SchemaVersion int `json:"schemaVersion"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
imageName := "docker://alpine:latest"
|
|
||||||
srcRef, _ := alltransports.ParseImageName(imageName)
|
|
||||||
|
|
||||||
// Carries various default locations.
|
|
||||||
systemCtx := &types.SystemContext{
|
|
||||||
DockerInsecureSkipTLSVerify: types.OptionalBoolTrue,
|
|
||||||
DockerDisableV1Ping: true,
|
|
||||||
}
|
|
||||||
|
|
||||||
log.Printf("[NewImageSource] start!!!")
|
|
||||||
imgSrc, err := srcRef.NewImageSource(tools.Timeout(60), systemCtx)
|
|
||||||
if err != nil {
|
|
||||||
log.Panic(1, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
log.Printf("[GetManifest] start!!!")
|
|
||||||
bs, str, err := imgSrc.GetManifest(tools.Timeout(5), nil)
|
|
||||||
if err != nil {
|
|
||||||
log.Panic(2, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
log.Printf("[manifest] bs=%s str=%s", string(bs), str)
|
|
||||||
|
|
||||||
var (
|
|
||||||
m = new(M)
|
|
||||||
d string
|
|
||||||
)
|
|
||||||
if err = json.Unmarshal(bs, m); err != nil {
|
|
||||||
log.Panic(3, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, item := range m.Manifests {
|
|
||||||
if item.Platform.Os == "linux" && item.Platform.Architecture == runtime.GOARCH {
|
|
||||||
d = item.Digest
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if d == "" {
|
|
||||||
log.Panicf("[4] empty digest: %s - %s", runtime.GOOS, runtime.GOARCH)
|
|
||||||
}
|
|
||||||
|
|
||||||
rc, size, err := imgSrc.GetBlob(tools.Timeout(60),
|
|
||||||
types.BlobInfo{
|
|
||||||
Digest: digest.Digest(d),
|
|
||||||
}, blobinfocache.DefaultCache(systemCtx))
|
|
||||||
if err != nil {
|
|
||||||
log.Panic(5, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
log.Printf("[GetBlob] size=%d", size)
|
|
||||||
|
|
||||||
rc.Close()
|
|
||||||
}
|
|
61
x/t2/main.go
61
x/t2/main.go
@ -1,61 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"github.com/google/go-containerregistry/pkg/name"
|
|
||||||
"github.com/google/go-containerregistry/pkg/v1/remote"
|
|
||||||
"io"
|
|
||||||
"log"
|
|
||||||
"os/signal"
|
|
||||||
"syscall"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
ctx, cancel := signal.NotifyContext(context.Background(), syscall.SIGHUP, syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT)
|
|
||||||
defer cancel()
|
|
||||||
|
|
||||||
puller, err := remote.NewPuller()
|
|
||||||
if err != nil {
|
|
||||||
log.Panic(1, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
//imageName := "loveuer/hello:v2.0.1"
|
|
||||||
imageName := "alpine:latest"
|
|
||||||
tn, err := name.NewTag(imageName)
|
|
||||||
if err != nil {
|
|
||||||
log.Panic(2, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
des, err := puller.Get(ctx, tn)
|
|
||||||
if err != nil {
|
|
||||||
log.Panic(3, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
img, err := des.Image()
|
|
||||||
if err != nil {
|
|
||||||
log.Panic(4, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
lys, err := img.Layers()
|
|
||||||
if err != nil {
|
|
||||||
log.Panic(5, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
rs := make([]io.Reader, 0)
|
|
||||||
for _, item := range lys {
|
|
||||||
r, err := item.Uncompressed()
|
|
||||||
if err != nil {
|
|
||||||
log.Panic(6, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
rs = append(rs, r)
|
|
||||||
}
|
|
||||||
|
|
||||||
allr := io.MultiReader(rs...)
|
|
||||||
bs, err := io.ReadAll(allr)
|
|
||||||
if err != nil {
|
|
||||||
log.Panic(7, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
log.Printf("size: %.2f MB", float64(len(bs))/1024/1024)
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user