Documentation ¶
Overview ¶
Package harbor_api
Index ¶
- Constants
- func NewProjectReq(reqCfg ProjectReqConfig) *models.ProjectReq
- func UnwrapErr[T any](v T, err error) (T, error)
- type ArtifactURI
- type CallBack
- type CallBackAttr
- type CallBackAttribute
- type CallBackAttrs
- type CallBackOpt
- type CallBackType
- type Client
- func (c *Client) AdminCreateUser(userCreationReq *models.UserCreationReq) (*user.CreateUserCreated, error)
- func (c *Client) AdminDeleteUser(userID int64) (*user.DeleteUserOK, error)
- func (c *Client) CopyArtifact(toArtifactURI, fromArtifactURI ArtifactURI) (*artifact.CopyArtifactCreated, error)
- func (c *Client) CreateAdmin(userCreationReq *models.UserCreationReq) (*user.CreateUserCreated, error)
- func (c *Client) CreateArtifactTag(toArtifactURI, fromArtifactURI ArtifactURI) (*artifact.CreateTagCreated, error)
- func (c *Client) CreateProject(projectReqConfig ProjectReqConfig) (*project.CreateProjectCreated, error)
- func (c *Client) DeleteAdmin(userID int64) (*user.DeleteUserOK, error)
- func (c *Client) DeleteArtifact(artifactURI ArtifactURI) (*artifact.DeleteArtifactOK, error)
- func (c *Client) DeleteArtifactTag(artifactURI ArtifactURI) (*artifact.DeleteTagOK, error)
- func (c *Client) DeleteProject(projectNameOrID string) (*project.DeleteProjectOK, error)
- func (c *Client) DeleteRepository(projectName, repositoryName string) (*repository.DeleteRepositoryOK, error)
- func (c *Client) ErrorDetail(err error) string
- func (c *Client) ExportArtifact() (string, error)
- func (c *Client) GC(gcFn ...util.Func)
- func (c *Client) GenerateArtifact() error
- func (c *Client) GetArtifact(artifactURI ArtifactURI) (*artifact.GetArtifactOK, error)
- func (c *Client) GetAuth() (string, error)
- func (c *Client) GetProject(projectNameOrID string) (*project.GetProjectOK, error)
- func (c *Client) GetRepository(projectName, repositoryName string) (*repository.GetRepositoryOK, error)
- func (c *Client) ImportOfflineArtifact() error
- func (c *Client) ListArtifactTags(artifactURI ArtifactURI, queryStr string) (*artifact.ListTagsOK, error)
- func (c *Client) ListArtifacts(artifactURI ArtifactURI) (*artifact.ListArtifactsOK, error)
- func (c *Client) ListProjects(public bool) (*project.ListProjectsOK, error)
- func (c *Client) ListRepositories(projectName string) (*repository.ListRepositoriesOK, error)
- func (c *Client) UpdateProjectStorageLimit(reqCfg *ProjectReqConfig) (*project.UpdateProjectOK, error)
- func (c *Client) WithCallBack(callback *CallBack) *Client
- func (c *Client) WithContext(ctx context.Context) *Client
- func (c *Client) WithHttpClient(httpCli *http.Client) *Client
- func (c *Client) WithPageConfig(pCfg *util.Page) *Client
- func (c *Client) WithTimeout(httpTimeout time.Duration) *Client
- type ProjectReqConfig
Constants ¶
View Source
const (
ProjectNoStorageLimit int64 = -1
)
Variables ¶
This section is empty.
Functions ¶
func NewProjectReq ¶
func NewProjectReq(reqCfg ProjectReqConfig) *models.ProjectReq
Types ¶
type ArtifactURI ¶
type CallBackAttribute ¶
type CallBackAttribute struct {
// contains filtered or unexported fields
}
Deprecated
type CallBackType ¶
type CallBackType string
Deprecated
const ( ProjectCallBack CallBackType = "Project" RepoCallBack CallBackType = "Repository" )
Deprecated
type Client ¶
type Client struct { // Deprecated // callback variant CallBack *CallBack // contains filtered or unexported fields }
func (*Client) AdminCreateUser ¶ added in v1.2.18
func (c *Client) AdminCreateUser(userCreationReq *models.UserCreationReq) (*user.CreateUserCreated, error)
func (*Client) AdminDeleteUser ¶ added in v1.2.18
func (c *Client) AdminDeleteUser(userID int64) (*user.DeleteUserOK, error)
func (*Client) CopyArtifact ¶
func (c *Client) CopyArtifact(toArtifactURI, fromArtifactURI ArtifactURI) (*artifact.CopyArtifactCreated, error)
func (*Client) CreateAdmin ¶
func (c *Client) CreateAdmin(userCreationReq *models.UserCreationReq) (*user.CreateUserCreated, error)
func (*Client) CreateArtifactTag ¶
func (c *Client) CreateArtifactTag(toArtifactURI, fromArtifactURI ArtifactURI) (*artifact.CreateTagCreated, error)
func (*Client) CreateProject ¶
func (c *Client) CreateProject(projectReqConfig ProjectReqConfig) (*project.CreateProjectCreated, error)
CreateProject preserve a project named: public create new project for each user by a specified name restrict the quota of each user
func (*Client) DeleteAdmin ¶
func (c *Client) DeleteAdmin(userID int64) (*user.DeleteUserOK, error)
func (*Client) DeleteArtifact ¶
func (c *Client) DeleteArtifact(artifactURI ArtifactURI) (*artifact.DeleteArtifactOK, error)
func (*Client) DeleteArtifactTag ¶ added in v1.2.18
func (c *Client) DeleteArtifactTag(artifactURI ArtifactURI) (*artifact.DeleteTagOK, error)
func (*Client) DeleteProject ¶
func (c *Client) DeleteProject(projectNameOrID string) (*project.DeleteProjectOK, error)
func (*Client) DeleteRepository ¶ added in v1.2.18
func (c *Client) DeleteRepository(projectName, repositoryName string) (*repository.DeleteRepositoryOK, error)
func (*Client) ErrorDetail ¶ added in v1.2.18
func (*Client) ExportArtifact ¶
ExportArtifact Download the image.tar.gz file to local
func (*Client) GenerateArtifact ¶
GenerateArtifact generate image from Dockerfile and push it to project
func (*Client) GetArtifact ¶
func (c *Client) GetArtifact(artifactURI ArtifactURI) (*artifact.GetArtifactOK, error)
func (*Client) GetProject ¶ added in v1.2.18
func (c *Client) GetProject(projectNameOrID string) (*project.GetProjectOK, error)
func (*Client) GetRepository ¶ added in v1.2.18
func (c *Client) GetRepository(projectName, repositoryName string) (*repository.GetRepositoryOK, error)
func (*Client) ImportOfflineArtifact ¶
ImportOfflineArtifact Upload the image.tar.gz file to project
func (*Client) ListArtifactTags ¶ added in v1.2.18
func (c *Client) ListArtifactTags(artifactURI ArtifactURI, queryStr string) (*artifact.ListTagsOK, error)
func (*Client) ListArtifacts ¶
func (c *Client) ListArtifacts(artifactURI ArtifactURI) (*artifact.ListArtifactsOK, error)
func (*Client) ListProjects ¶
func (c *Client) ListProjects(public bool) (*project.ListProjectsOK, error)
func (*Client) ListRepositories ¶
func (c *Client) ListRepositories(projectName string) (*repository.ListRepositoriesOK, error)
func (*Client) UpdateProjectStorageLimit ¶ added in v1.2.18
func (c *Client) UpdateProjectStorageLimit(reqCfg *ProjectReqConfig) (*project.UpdateProjectOK, error)
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package harbor_inst\client.go was generated by codegen, please fix its package dependency, but do not modify its functionality
|
Package harbor_inst\client.go was generated by codegen, please fix its package dependency, but do not modify its functionality |
Click to show internal directories.
Click to hide internal directories.