Documentation ¶
Index ¶
- type Client
- type RESTClient
- func (c *RESTClient) AddArtifactLabel(ctx context.Context, projectName, repositoryName, reference string, ...) error
- func (c *RESTClient) AddProjectMember(ctx context.Context, projectNameOrID string, m *modelv2.ProjectMember) error
- func (c *RESTClient) AddProjectMetadata(ctx context.Context, projectNameOrID string, key common.MetadataKey, ...) error
- func (c *RESTClient) AddProjectRobotV1(ctx context.Context, projectNameOrID string, r *modelv2.RobotCreateV1) error
- func (c *RESTClient) AddProjectWebhookPolicy(ctx context.Context, projectID int, policy *modelv2.WebhookPolicy) error
- func (c *RESTClient) CopyArtifact(ctx context.Context, from *artifact.CopyReference, ...) error
- func (c *RESTClient) CreateLabel(ctx context.Context, l *modelv2.Label) error
- func (c *RESTClient) CreateTag(ctx context.Context, projectName, repositoryName, reference string, ...) error
- func (c *RESTClient) DeleteLabel(ctx context.Context, id int64) error
- func (c *RESTClient) DeleteProject(ctx context.Context, nameOrID string) error
- func (c *RESTClient) DeleteProjectMember(ctx context.Context, projectNameOrID string, m *modelv2.ProjectMember) error
- func (c *RESTClient) DeleteProjectMetadataValue(ctx context.Context, projectNameOrID string, key common.MetadataKey) error
- func (c *RESTClient) DeleteProjectRobotV1(ctx context.Context, projectNameOrID string, robotID int64) error
- func (c *RESTClient) DeleteProjectWebhookPolicy(ctx context.Context, projectID int, policyID int64) error
- func (c *RESTClient) DeleteRegistryByID(ctx context.Context, id int64) error
- func (c *RESTClient) DeleteReplicationPolicyByID(ctx context.Context, id int64) error
- func (c *RESTClient) DeleteRepository(ctx context.Context, projectName, repositoryName string) error
- func (c *RESTClient) DeleteRetentionPolicyByID(ctx context.Context, id int64) error
- func (c *RESTClient) DeleteRobotAccountByID(ctx context.Context, id int64) error
- func (c *RESTClient) DeleteRobotAccountByName(ctx context.Context, name string) error
- func (c *RESTClient) DeleteTag(ctx context.Context, projectName, repositoryName, reference, tagName string) error
- func (c *RESTClient) DeleteUser(ctx context.Context, id int64) error
- func (c *RESTClient) GetArtifact(ctx context.Context, projectName, repositoryName, reference string) (*modelv2.Artifact, error)
- func (c *RESTClient) GetCurrentUserInfo(ctx context.Context) (*modelv2.UserResp, error)
- func (c *RESTClient) GetCurrentUserPermisisons(ctx context.Context, relative bool, scope string) ([]*modelv2.Permission, error)
- func (c *RESTClient) GetGarbageCollectionExecution(ctx context.Context, id int64) (*modelv2.GCHistory, error)
- func (c *RESTClient) GetGarbageCollectionSchedule(ctx context.Context) (*modelv2.GCHistory, error)
- func (c *RESTClient) GetHealth(ctx context.Context) (*modelv2.OverallHealthStatus, error)
- func (c *RESTClient) GetLabelByID(ctx context.Context, id int64) (*modelv2.Label, error)
- func (c *RESTClient) GetProject(ctx context.Context, nameOrID string) (*modelv2.Project, error)
- func (c *RESTClient) GetProjectMetadataValue(ctx context.Context, projectNameOrID string, key common.MetadataKey) (string, error)
- func (c *RESTClient) GetQuotaByProjectID(ctx context.Context, projectID int64) (*modelv2.Quota, error)
- func (c *RESTClient) GetRegistryByID(ctx context.Context, id int64) (*modelv2.Registry, error)
- func (c *RESTClient) GetRegistryByName(ctx context.Context, name string) (*modelv2.Registry, error)
- func (c *RESTClient) GetReplicationExecutionByID(ctx context.Context, id int64) (*modelv2.ReplicationExecution, error)
- func (c *RESTClient) GetReplicationPolicyByID(ctx context.Context, id int64) (*modelv2.ReplicationPolicy, error)
- func (c *RESTClient) GetReplicationPolicyByName(ctx context.Context, name string) (*modelv2.ReplicationPolicy, error)
- func (c *RESTClient) GetRepository(ctx context.Context, projectName, repositoryName string) (*modelv2.Repository, error)
- func (c *RESTClient) GetRetentionPolicyByID(ctx context.Context, id int64) (*modelv2.RetentionPolicy, error)
- func (c *RESTClient) GetRetentionPolicyByProject(ctx context.Context, projectNameOrID string) (*modelv2.RetentionPolicy, error)
- func (c *RESTClient) GetRobotAccountByID(ctx context.Context, id int64) (*modelv2.Robot, error)
- func (c *RESTClient) GetRobotAccountByName(ctx context.Context, name string) (*modelv2.Robot, error)
- func (c *RESTClient) GetSystemInfo(ctx context.Context) (*modelv2.GeneralInfo, error)
- func (c *RESTClient) GetUserByID(ctx context.Context, id int64) (*modelv2.UserResp, error)
- func (c *RESTClient) GetUserByName(ctx context.Context, username string) (*modelv2.UserResp, error)
- func (c *RESTClient) ListAllRepositories(ctx context.Context) ([]*modelv2.Repository, error)
- func (c *RESTClient) ListArtifacts(ctx context.Context, projectName, repositoryName string) ([]*modelv2.Artifact, error)
- func (c *RESTClient) ListAuditLogs(ctx context.Context) ([]*modelv2.AuditLog, error)
- func (c *RESTClient) ListLabels(ctx context.Context, name string, projectID *int64, scope label.Scope) ([]*modelv2.Label, error)
- func (c *RESTClient) ListProjectMembers(ctx context.Context, projectNameOrID, memberQuery string) ([]*modelv2.ProjectMemberEntity, error)
- func (c *RESTClient) ListProjectMetadata(ctx context.Context, projectNameOrID string) (map[string]string, error)
- func (c *RESTClient) ListProjectRobotsV1(ctx context.Context, projectNameOrID string) ([]*modelv2.Robot, error)
- func (c *RESTClient) ListProjectWebhookPolicies(ctx context.Context, projectID int) ([]*modelv2.WebhookPolicy, error)
- func (c *RESTClient) ListProjects(ctx context.Context, nameFilter string) ([]*modelv2.Project, error)
- func (c *RESTClient) ListQuotas(ctx context.Context, referenceType, referenceID *string) ([]*modelv2.Quota, error)
- func (c *RESTClient) ListRegistries(ctx context.Context) ([]*modelv2.Registry, error)
- func (c *RESTClient) ListReplicationExecutions(ctx context.Context, policyID *int64, status, trigger *string) ([]*modelv2.ReplicationExecution, error)
- func (c *RESTClient) ListReplicationPolicies(ctx context.Context) ([]*modelv2.ReplicationPolicy, error)
- func (c *RESTClient) ListRepositories(ctx context.Context, projectName string) ([]*modelv2.Repository, error)
- func (c *RESTClient) ListRobotAccounts(ctx context.Context) ([]*modelv2.Robot, error)
- func (c *RESTClient) ListTags(ctx context.Context, projectName, repositoryName, reference string) ([]*modelv2.Tag, error)
- func (c *RESTClient) ListUsers(ctx context.Context) ([]*modelv2.UserResp, error)
- func (c *RESTClient) NewGarbageCollection(ctx context.Context, gcSchedule *modelv2.Schedule) error
- func (c *RESTClient) NewProject(ctx context.Context, projectRequest *modelv2.ProjectReq) error
- func (c *RESTClient) NewRegistry(ctx context.Context, reg *modelv2.Registry) error
- func (c *RESTClient) NewReplicationPolicy(ctx context.Context, destRegistry, srcRegistry *modelv2.Registry, ...) error
- func (c *RESTClient) NewRetentionPolicy(ctx context.Context, ret *modelv2.RetentionPolicy) error
- func (c *RESTClient) NewRobotAccount(ctx context.Context, r *modelv2.RobotCreate) (*modelv2.RobotCreated, error)
- func (c *RESTClient) NewUser(ctx context.Context, username, email, realname, password, comments string) error
- func (c *RESTClient) ProjectExists(ctx context.Context, nameOrID string) (bool, error)
- func (c *RESTClient) RefreshRobotAccountSecretByID(ctx context.Context, id int64, sec string) (*modelv2.RobotSec, error)
- func (c *RESTClient) RefreshRobotAccountSecretByName(ctx context.Context, name string, sec string) (*modelv2.RobotSec, error)
- func (c *RESTClient) RemoveLabel(ctx context.Context, projectName, repositoryName, reference string, id int64) error
- func (c *RESTClient) ResetGarbageCollection(ctx context.Context) error
- func (c *RESTClient) SearchUsers(ctx context.Context, name string) ([]*modelv2.UserSearchRespItem, error)
- func (c *RESTClient) SetUserSysAdmin(ctx context.Context, id int64, admin bool) error
- func (c *RESTClient) TriggerReplicationExecution(ctx context.Context, r *modelv2.StartReplicationExecution) error
- func (c *RESTClient) UpdateGarbageCollection(ctx context.Context, newGCSchedule *modelv2.Schedule) error
- func (c *RESTClient) UpdateLabel(ctx context.Context, id int64, l *modelv2.Label) error
- func (c *RESTClient) UpdateProject(ctx context.Context, p *modelv2.Project, storageLimit *int64) error
- func (c *RESTClient) UpdateProjectMember(ctx context.Context, projectNameOrID string, m *modelv2.ProjectMember) error
- func (c *RESTClient) UpdateProjectMetadata(ctx context.Context, projectNameOrID string, key common.MetadataKey, ...) error
- func (c *RESTClient) UpdateProjectRobotV1(ctx context.Context, projectNameOrID string, robotID int64, r *modelv2.Robot) error
- func (c *RESTClient) UpdateProjectWebhookPolicy(ctx context.Context, projectID int, policy *modelv2.WebhookPolicy) error
- func (c *RESTClient) UpdateRegistry(ctx context.Context, u *modelv2.RegistryUpdate, id int64) error
- func (c *RESTClient) UpdateReplicationPolicy(ctx context.Context, r *modelv2.ReplicationPolicy, id int64) error
- func (c *RESTClient) UpdateRepository(ctx context.Context, projectName, repositoryName string, ...) error
- func (c *RESTClient) UpdateRetentionPolicy(ctx context.Context, ret *modelv2.RetentionPolicy) error
- func (c *RESTClient) UpdateRobotAccount(ctx context.Context, r *modelv2.Robot) error
- func (c *RESTClient) UpdateStorageQuotaByProjectID(ctx context.Context, projectID int64, storageLimit int64) error
- func (c *RESTClient) UpdateUserPassword(ctx context.Context, userID int64, passwordRequest *modelv2.PasswordReq) error
- func (c *RESTClient) UpdateUserProfile(ctx context.Context, id int64, profile *modelv2.UserProfile) error
- func (c *RESTClient) UserExists(ctx context.Context, idOrName intstr.IntOrString) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RESTClient ¶
type RESTClient struct {
// contains filtered or unexported fields
}
RESTClient implements the Client interface as a REST client
func NewRESTClient ¶
func NewRESTClient(v2Client *v2client.Harbor, opts *config.Options, authInfo runtime.ClientAuthInfoWriter) *RESTClient
NewRESTClient constructs a new REST client containing each sub client.
func NewRESTClientForHost ¶
func NewRESTClientForHost(u, username, password string, opts *config.Options) (*RESTClient, error)
NewRESTClientForHost constructs a new REST client containing a swagger API client using the defined host string and basePath, the additional Harbor v2 API suffix as well as basic auth info.
func (*RESTClient) AddArtifactLabel ¶
func (*RESTClient) AddProjectMember ¶
func (c *RESTClient) AddProjectMember(ctx context.Context, projectNameOrID string, m *modelv2.ProjectMember) error
func (*RESTClient) AddProjectMetadata ¶
func (c *RESTClient) AddProjectMetadata(ctx context.Context, projectNameOrID string, key common.MetadataKey, value string) error
func (*RESTClient) AddProjectRobotV1 ¶
func (c *RESTClient) AddProjectRobotV1(ctx context.Context, projectNameOrID string, r *modelv2.RobotCreateV1) error
func (*RESTClient) AddProjectWebhookPolicy ¶
func (c *RESTClient) AddProjectWebhookPolicy(ctx context.Context, projectID int, policy *modelv2.WebhookPolicy) error
func (*RESTClient) CopyArtifact ¶
func (c *RESTClient) CopyArtifact(ctx context.Context, from *artifact.CopyReference, projectName, repositoryName string) error
func (*RESTClient) CreateLabel ¶
func (*RESTClient) DeleteLabel ¶
func (c *RESTClient) DeleteLabel(ctx context.Context, id int64) error
func (*RESTClient) DeleteProject ¶
func (c *RESTClient) DeleteProject(ctx context.Context, nameOrID string) error
func (*RESTClient) DeleteProjectMember ¶
func (c *RESTClient) DeleteProjectMember(ctx context.Context, projectNameOrID string, m *modelv2.ProjectMember) error
func (*RESTClient) DeleteProjectMetadataValue ¶
func (c *RESTClient) DeleteProjectMetadataValue(ctx context.Context, projectNameOrID string, key common.MetadataKey) error
func (*RESTClient) DeleteProjectRobotV1 ¶
func (*RESTClient) DeleteProjectWebhookPolicy ¶
func (*RESTClient) DeleteRegistryByID ¶
func (c *RESTClient) DeleteRegistryByID(ctx context.Context, id int64) error
func (*RESTClient) DeleteReplicationPolicyByID ¶
func (c *RESTClient) DeleteReplicationPolicyByID(ctx context.Context, id int64) error
func (*RESTClient) DeleteRepository ¶
func (c *RESTClient) DeleteRepository(ctx context.Context, projectName, repositoryName string) error
func (*RESTClient) DeleteRetentionPolicyByID ¶
func (c *RESTClient) DeleteRetentionPolicyByID(ctx context.Context, id int64) error
func (*RESTClient) DeleteRobotAccountByID ¶
func (c *RESTClient) DeleteRobotAccountByID(ctx context.Context, id int64) error
func (*RESTClient) DeleteRobotAccountByName ¶
func (c *RESTClient) DeleteRobotAccountByName(ctx context.Context, name string) error
func (*RESTClient) DeleteTag ¶
func (c *RESTClient) DeleteTag(ctx context.Context, projectName, repositoryName, reference, tagName string) error
func (*RESTClient) DeleteUser ¶
func (c *RESTClient) DeleteUser(ctx context.Context, id int64) error
func (*RESTClient) GetArtifact ¶
func (*RESTClient) GetCurrentUserInfo ¶
func (*RESTClient) GetCurrentUserPermisisons ¶
func (c *RESTClient) GetCurrentUserPermisisons(ctx context.Context, relative bool, scope string) ([]*modelv2.Permission, error)
func (*RESTClient) GetGarbageCollectionExecution ¶
func (*RESTClient) GetGarbageCollectionSchedule ¶
func (*RESTClient) GetHealth ¶
func (c *RESTClient) GetHealth(ctx context.Context) (*modelv2.OverallHealthStatus, error)
func (*RESTClient) GetLabelByID ¶
func (*RESTClient) GetProject ¶
func (*RESTClient) GetProjectMetadataValue ¶
func (c *RESTClient) GetProjectMetadataValue(ctx context.Context, projectNameOrID string, key common.MetadataKey) (string, error)
func (*RESTClient) GetQuotaByProjectID ¶
func (*RESTClient) GetRegistryByID ¶
func (*RESTClient) GetRegistryByName ¶
func (*RESTClient) GetReplicationExecutionByID ¶
func (c *RESTClient) GetReplicationExecutionByID(ctx context.Context, id int64) (*modelv2.ReplicationExecution, error)
func (*RESTClient) GetReplicationPolicyByID ¶
func (c *RESTClient) GetReplicationPolicyByID(ctx context.Context, id int64) (*modelv2.ReplicationPolicy, error)
func (*RESTClient) GetReplicationPolicyByName ¶
func (c *RESTClient) GetReplicationPolicyByName(ctx context.Context, name string) (*modelv2.ReplicationPolicy, error)
func (*RESTClient) GetRepository ¶
func (c *RESTClient) GetRepository(ctx context.Context, projectName, repositoryName string) (*modelv2.Repository, error)
func (*RESTClient) GetRetentionPolicyByID ¶
func (c *RESTClient) GetRetentionPolicyByID(ctx context.Context, id int64) (*modelv2.RetentionPolicy, error)
func (*RESTClient) GetRetentionPolicyByProject ¶
func (c *RESTClient) GetRetentionPolicyByProject(ctx context.Context, projectNameOrID string) (*modelv2.RetentionPolicy, error)
func (*RESTClient) GetRobotAccountByID ¶
func (*RESTClient) GetRobotAccountByName ¶
func (*RESTClient) GetSystemInfo ¶
func (c *RESTClient) GetSystemInfo(ctx context.Context) (*modelv2.GeneralInfo, error)
func (*RESTClient) GetUserByID ¶
func (*RESTClient) GetUserByName ¶
func (*RESTClient) ListAllRepositories ¶
func (c *RESTClient) ListAllRepositories(ctx context.Context) ([]*modelv2.Repository, error)
func (*RESTClient) ListArtifacts ¶
func (*RESTClient) ListAuditLogs ¶
func (*RESTClient) ListLabels ¶
func (*RESTClient) ListProjectMembers ¶
func (c *RESTClient) ListProjectMembers(ctx context.Context, projectNameOrID, memberQuery string) ([]*modelv2.ProjectMemberEntity, error)
func (*RESTClient) ListProjectMetadata ¶
func (*RESTClient) ListProjectRobotsV1 ¶
func (*RESTClient) ListProjectWebhookPolicies ¶
func (c *RESTClient) ListProjectWebhookPolicies(ctx context.Context, projectID int) ([]*modelv2.WebhookPolicy, error)
func (*RESTClient) ListProjects ¶
func (*RESTClient) ListQuotas ¶
func (*RESTClient) ListRegistries ¶
func (*RESTClient) ListReplicationExecutions ¶
func (c *RESTClient) ListReplicationExecutions(ctx context.Context, policyID *int64, status, trigger *string) ([]*modelv2.ReplicationExecution, error)
func (*RESTClient) ListReplicationPolicies ¶
func (c *RESTClient) ListReplicationPolicies(ctx context.Context) ([]*modelv2.ReplicationPolicy, error)
func (*RESTClient) ListRepositories ¶
func (c *RESTClient) ListRepositories(ctx context.Context, projectName string) ([]*modelv2.Repository, error)
func (*RESTClient) ListRobotAccounts ¶
func (*RESTClient) NewGarbageCollection ¶
func (*RESTClient) NewProject ¶
func (c *RESTClient) NewProject(ctx context.Context, projectRequest *modelv2.ProjectReq) error
func (*RESTClient) NewRegistry ¶
func (*RESTClient) NewReplicationPolicy ¶
func (c *RESTClient) NewReplicationPolicy(ctx context.Context, destRegistry, srcRegistry *modelv2.Registry, replicateDeletion, override, enablePolicy bool, filters []*modelv2.ReplicationFilter, trigger *modelv2.ReplicationTrigger, destNamespace, description, name string) error
func (*RESTClient) NewRetentionPolicy ¶
func (c *RESTClient) NewRetentionPolicy(ctx context.Context, ret *modelv2.RetentionPolicy) error
func (*RESTClient) NewRobotAccount ¶
func (c *RESTClient) NewRobotAccount(ctx context.Context, r *modelv2.RobotCreate) (*modelv2.RobotCreated, error)
func (*RESTClient) NewUser ¶
func (c *RESTClient) NewUser(ctx context.Context, username, email, realname, password, comments string) error
func (*RESTClient) ProjectExists ¶
func (*RESTClient) RefreshRobotAccountSecretByID ¶
func (*RESTClient) RefreshRobotAccountSecretByName ¶
func (*RESTClient) RemoveLabel ¶
func (*RESTClient) ResetGarbageCollection ¶
func (c *RESTClient) ResetGarbageCollection(ctx context.Context) error
func (*RESTClient) SearchUsers ¶
func (c *RESTClient) SearchUsers(ctx context.Context, name string) ([]*modelv2.UserSearchRespItem, error)
func (*RESTClient) SetUserSysAdmin ¶
func (*RESTClient) TriggerReplicationExecution ¶
func (c *RESTClient) TriggerReplicationExecution(ctx context.Context, r *modelv2.StartReplicationExecution) error
func (*RESTClient) UpdateGarbageCollection ¶
func (*RESTClient) UpdateLabel ¶
func (*RESTClient) UpdateProject ¶
func (*RESTClient) UpdateProjectMember ¶
func (c *RESTClient) UpdateProjectMember(ctx context.Context, projectNameOrID string, m *modelv2.ProjectMember) error
func (*RESTClient) UpdateProjectMetadata ¶
func (c *RESTClient) UpdateProjectMetadata(ctx context.Context, projectNameOrID string, key common.MetadataKey, value string) error
func (*RESTClient) UpdateProjectRobotV1 ¶
func (*RESTClient) UpdateProjectWebhookPolicy ¶
func (c *RESTClient) UpdateProjectWebhookPolicy(ctx context.Context, projectID int, policy *modelv2.WebhookPolicy) error
func (*RESTClient) UpdateRegistry ¶
func (c *RESTClient) UpdateRegistry(ctx context.Context, u *modelv2.RegistryUpdate, id int64) error
func (*RESTClient) UpdateReplicationPolicy ¶
func (c *RESTClient) UpdateReplicationPolicy(ctx context.Context, r *modelv2.ReplicationPolicy, id int64) error
func (*RESTClient) UpdateRepository ¶
func (c *RESTClient) UpdateRepository(ctx context.Context, projectName, repositoryName string, update *modelv2.Repository) error
func (*RESTClient) UpdateRetentionPolicy ¶
func (c *RESTClient) UpdateRetentionPolicy(ctx context.Context, ret *modelv2.RetentionPolicy) error
func (*RESTClient) UpdateRobotAccount ¶
func (*RESTClient) UpdateStorageQuotaByProjectID ¶
func (*RESTClient) UpdateUserPassword ¶
func (c *RESTClient) UpdateUserPassword(ctx context.Context, userID int64, passwordRequest *modelv2.PasswordReq) error
func (*RESTClient) UpdateUserProfile ¶
func (c *RESTClient) UpdateUserProfile(ctx context.Context, id int64, profile *modelv2.UserProfile) error
func (*RESTClient) UserExists ¶
func (c *RESTClient) UserExists(ctx context.Context, idOrName intstr.IntOrString) (bool, error)
Click to show internal directories.
Click to hide internal directories.