harbor

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package harbor 는 Harbor 레지스트리에서 이미지 저장소를 지운다.

플랫폼은 Harbor 프로젝트를 만들고 이미지를 밀어 넣으면서 정리할 수단은 갖고 있지 않았다. 파이프라인을 지워도 이미지가 남아 디스크는 아무도 안 보는 사이에 찬다.

github.Client 가 GHCR 패키지에 대해 하는 일과 같은 자리다 — port.ImageRepositoryDeleter 의 Harbor 구현체이고, 다른 레지스트리는 각자 같은 계약을 구현하면 된다.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client 는 Harbor API 클라이언트다.

func NewClient

func NewClient(baseURL, user, password string) *Client

NewClient 는 Harbor 클라이언트를 만든다.

baseURL 은 Harbor 의 외부 주소다 (예: https://harbor.nullus.io). user/password 는 관리자 자격증명이며, 스택 설치가 OpenBao 에 만들어 둔 것을 registrycreds 가 풀어 준다.

func (*Client) DeleteImageRepository

func (c *Client) DeleteImageRepository(ctx context.Context, target *port.ImageTarget) error

DeleteImageRepository 는 프로젝트 안의 저장소를 통째로 지운다.

이미 없으면 성공으로 본다 — 삭제의 목표는 "없는 상태" 이고, 404 를 오류로 올리면 재시도가 영영 끝나지 않는다.

func (*Client) WithHTTPClient

func (c *Client) WithHTTPClient(h *http.Client) *Client

WithHTTPClient 는 타임아웃·전송 계층을 교체한다.

Jump to

Keyboard shortcuts

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