apiv2

package
v4.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2021 License: MIT Imports: 19 Imported by: 2

Documentation

Index

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(legacyClient *client.Harbor, v2Client *v2client.Harbor, authInfo runtime.ClientAuthInfoWriter) *RESTClient

NewRESTClient constructs a new REST client containing each sub client.

func NewRESTClientForHost

func NewRESTClientForHost(u, username, password string) (*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) AddProjectMember

func (c *RESTClient) AddProjectMember(ctx context.Context, p *modelv2.Project, u *legacymodel.User, roleID int) error

AddProjectMember wraps the AddProjectMember method of the project sub-package.

func (*RESTClient) AddProjectMetadata

func (c *RESTClient) AddProjectMetadata(ctx context.Context, p *modelv2.Project, key project.MetadataKey, value string) error

AddProjectMetadata wraps the AddProjectMetadata method of the project sub-package.

func (*RESTClient) AddProjectRobot

AddProjectRobot wraps the AddProjectRobot method of the project sub-package.

func (*RESTClient) AddProjectWebhookPolicy

func (c *RESTClient) AddProjectWebhookPolicy(ctx context.Context, p *modelv2.Project, policy *legacymodel.WebhookPolicy) error

AddProjectWebhookPolicy wraps the AddProjectWebhookPolicy method of the project sub-package.

func (*RESTClient) DeleteProject

func (c *RESTClient) DeleteProject(ctx context.Context, p *modelv2.Project) error

DeleteProject wraps the DeleteProject method of the project sub-package.

func (*RESTClient) DeleteProjectMember

func (c *RESTClient) DeleteProjectMember(ctx context.Context, p *modelv2.Project, u *legacymodel.User) error

DeleteProjectMember wraps the DeleteProjectMember method of the project sub-package.

func (*RESTClient) DeleteProjectMetadataValue

func (c *RESTClient) DeleteProjectMetadataValue(ctx context.Context, p *modelv2.Project, key project.MetadataKey) error

DeleteProjectMetadataValue wraps the DeleteProjectMetadataValue method of the project sub-package.

func (*RESTClient) DeleteProjectRobot

func (c *RESTClient) DeleteProjectRobot(ctx context.Context, p *modelv2.Project, robotID int64) error

DeleteProjectRobot wraps the DeleteProjectRobot method of the project sub-package.

func (*RESTClient) DeleteProjectWebhookPolicy

func (c *RESTClient) DeleteProjectWebhookPolicy(ctx context.Context, p *modelv2.Project, policyID int64) error

DeleteProjectWebhookPolicy wraps the DeleteProjectWebhookPolicy method of the project sub-package.

func (*RESTClient) DeleteRegistry

func (c *RESTClient) DeleteRegistry(ctx context.Context, r *legacymodel.Registry) error

DeleteRegistry wraps the DeleteRegistry method of the registry sub-package.

func (*RESTClient) DeleteReplicationPolicy

func (c *RESTClient) DeleteReplicationPolicy(ctx context.Context, r *legacymodel.ReplicationPolicy) error

DeleteReplicationPolicy wraps the DeleteReplicationPolicy method of the replication sub-package.

func (*RESTClient) DeleteRobotAccountByID

func (c *RESTClient) DeleteRobotAccountByID(ctx context.Context, id int64) error

DeleteRobotAccountByID wraps the DeleteRobotAccountByID method of the robot sub-package.

func (*RESTClient) DeleteRobotAccountByName

func (c *RESTClient) DeleteRobotAccountByName(ctx context.Context, name string) error

DeleteRobotAccountByName wraps the DeleteRobotAccountByName method of the robot sub-package.

func (*RESTClient) DeleteUser

func (c *RESTClient) DeleteUser(ctx context.Context, u *legacymodel.User) error

DeleteUser wraps the DeleteUser method of the user sub-package.

func (*RESTClient) DisableRetentionPolicy

func (c *RESTClient) DisableRetentionPolicy(ctx context.Context, ret *modelv2.RetentionPolicy) error

DisableRetentionPolicy wraps the DisableRetentionPolicy method of the retention sub-package.

func (*RESTClient) GetGarbageCollectionSchedule

func (c *RESTClient) GetGarbageCollectionSchedule(ctx context.Context) (*modelv2.GCHistory, error)

GetGarbageCollectionSchedule wraps the GetSystemGarbageCollection method of the system sub-package.

func (*RESTClient) GetProject

func (c *RESTClient) GetProject(ctx context.Context, nameOrID string) (*modelv2.Project, error)

GetProject wraps the GetProject method of the project sub-package.

func (*RESTClient) GetProjectMetadataValue

func (c *RESTClient) GetProjectMetadataValue(ctx context.Context, projectNameOrID string, key project.MetadataKey) (string, error)

GetProjectMetadataValue wraps the GetProjectMetadataValue method of the project sub-package.

func (*RESTClient) GetQuotaByProjectID

func (c *RESTClient) GetQuotaByProjectID(ctx context.Context, projectID int64) (*legacymodel.Quota, error)

GetQuotaByProjectID wraps the GetQuotaByProjectID method of the quota sub-package.

func (*RESTClient) GetRegistry

func (c *RESTClient) GetRegistry(ctx context.Context, name string) (*legacymodel.Registry, error)

GetRegistry wraps the GetRegistry method of the registry sub-package.

func (*RESTClient) GetReplicationExecutionByID

func (c *RESTClient) GetReplicationExecutionByID(ctx context.Context, id int64) (*modelv2.ReplicationExecution, error)

GetReplicationExecutionByID GetReplicationExecutionsByID wraps the GetReplicationExecutionsByID method of the replication sub-package.

func (*RESTClient) GetReplicationExecutions

func (c *RESTClient) GetReplicationExecutions(ctx context.Context, r *modelv2.ReplicationExecution) ([]*modelv2.ReplicationExecution, error)

GetReplicationExecutions wraps the GetReplicationExecutions method of the replication sub-package.

func (*RESTClient) GetReplicationPolicy

func (c *RESTClient) GetReplicationPolicy(ctx context.Context, name string) (*legacymodel.ReplicationPolicy, error)

GetReplicationPolicy wraps the GetReplicationPolicy method of the replication sub-package.

func (*RESTClient) GetReplicationPolicyByID

func (c *RESTClient) GetReplicationPolicyByID(ctx context.Context, id int64) (*legacymodel.ReplicationPolicy, error)

GetReplicationPolicyByID wraps the GetReplicationPolicyByID method of the replication sub-package.

func (*RESTClient) GetRetentionPolicyByID

func (c *RESTClient) GetRetentionPolicyByID(ctx context.Context, id int64) (*modelv2.RetentionPolicy, error)

GetRetentionPolicyByID wraps the GetRetentionPolicyByID method of the retention sub-package.

func (*RESTClient) GetRetentionPolicyByProject

func (c *RESTClient) GetRetentionPolicyByProject(ctx context.Context, project *modelv2.Project) (*modelv2.RetentionPolicy, error)

GetRetentionPolicyByProject GetRetentionPolicyByProjectID wraps the GetRetentionPolicyByProject method of the retention sub-package.

func (*RESTClient) GetRobotAccountByID

func (c *RESTClient) GetRobotAccountByID(ctx context.Context, id int64) (*modelv2.Robot, error)

GetRobotAccountByID wraps the GetRobotAccountByID method of the robot sub-package.

func (*RESTClient) GetRobotAccountByName

func (c *RESTClient) GetRobotAccountByName(ctx context.Context, name string) (*modelv2.Robot, error)

GetRobotAccountByName wraps the GetRobotAccountByName method of the robot sub-package.

func (*RESTClient) GetUser

func (c *RESTClient) GetUser(ctx context.Context, username string) (*legacymodel.User, error)

GetUser wraps the GetUser method of the user sub-package.

func (*RESTClient) GetUserByID

func (c *RESTClient) GetUserByID(ctx context.Context, id int64) (*legacymodel.User, error)

GetUserByID wraps the GetUserByID method of the user sub-package.

func (*RESTClient) Health

Health wraps the Health method of the system sub-package.

func (*RESTClient) ListProjectMembers

func (c *RESTClient) ListProjectMembers(ctx context.Context, p *modelv2.Project) ([]*legacymodel.ProjectMemberEntity, error)

ListProjectMembers wraps the ListProjectMembers method of the project sub-package.

func (*RESTClient) ListProjectMetadata

func (c *RESTClient) ListProjectMetadata(ctx context.Context, p *modelv2.Project) (*modelv2.ProjectMetadata, error)

ListProjectMetadata wraps the ListProjectMetadata method of the project sub-package.

func (*RESTClient) ListProjectRobots

func (c *RESTClient) ListProjectRobots(ctx context.Context, p *modelv2.Project) ([]*modelv2.Robot, error)

ListProjectRobots wraps the ListProjectRobots method of the project sub-package.

func (*RESTClient) ListProjectWebhookPolicies

func (c *RESTClient) ListProjectWebhookPolicies(ctx context.Context, p *modelv2.Project) ([]*legacymodel.WebhookPolicy, error)

ListProjectWebhookPolicies wraps the ListProjectWebhookPolicies method of the project sub-package.

func (*RESTClient) ListProjects

func (c *RESTClient) ListProjects(ctx context.Context, nameFilter string) ([]*modelv2.Project, error)

ListProjects wraps the ListProjects method of the project sub-package.

func (*RESTClient) ListRobotAccounts

func (c *RESTClient) ListRobotAccounts(ctx context.Context) ([]*modelv2.Robot, error)

ListRobotAccounts wraps the ListRobotAccounts method of the robot sub-package.

func (*RESTClient) NewGarbageCollection

func (c *RESTClient) NewGarbageCollection(ctx context.Context, gcSchedule *modelv2.Schedule) error

NewGarbageCollection wraps the NewSystemGarbageCollection method of the system sub-package.

func (*RESTClient) NewProject

func (c *RESTClient) NewProject(ctx context.Context, name string, storageLimit *int64) (*modelv2.Project, error)

NewProject wraps the NewProject method of the project sub-package.

func (*RESTClient) NewRegistry

func (c *RESTClient) NewRegistry(ctx context.Context, name, registryType, url string,
	credential *legacymodel.RegistryCredential, insecure bool) (*legacymodel.Registry, error)

NewRegistry wraps the NewRegistry method of the registry sub-package.

func (*RESTClient) NewReplicationPolicy

func (c *RESTClient) NewReplicationPolicy(ctx context.Context, destRegistry, srcRegistry *legacymodel.Registry,
	replicateDeletion, override, enablePolicy bool, filters []*legacymodel.ReplicationFilter,
	trigger *legacymodel.ReplicationTrigger, destNamespace, description, name string) (*legacymodel.ReplicationPolicy, error)

NewReplicationPolicy wraps the NewReplicationPolicy method of the replication sub-package.

func (*RESTClient) NewRetentionPolicy

func (c *RESTClient) NewRetentionPolicy(ctx context.Context, ret *modelv2.RetentionPolicy) error

NewRetentionPolicy wraps the NewRetentionPolicy method of the retention sub-package.

func (*RESTClient) NewRobotAccount

func (c *RESTClient) NewRobotAccount(ctx context.Context, r *modelv2.RobotCreate) (*modelv2.RobotCreated, error)

NewRobotAccount wraps the NewRobotAccount method of the robot sub-package.

func (*RESTClient) NewUser

func (c *RESTClient) NewUser(ctx context.Context, username, email, realname, password, comments string) (*legacymodel.User, error)

NewUser wraps the NewUser method of the user sub-package.

func (*RESTClient) ResetGarbageCollection

func (c *RESTClient) ResetGarbageCollection(ctx context.Context) error

ResetGarbageCollection wraps the ResetSystemGarbageCollection method of the system sub-package.

func (*RESTClient) TriggerReplicationExecution

func (c *RESTClient) TriggerReplicationExecution(ctx context.Context, r *modelv2.StartReplicationExecution) error

TriggerReplicationExecution wraps the TriggerReplicationExecution method of the replication sub-package.

func (*RESTClient) UpdateGarbageCollection

func (c *RESTClient) UpdateGarbageCollection(ctx context.Context, newGCSchedule *modelv2.Schedule) error

UpdateGarbageCollection wraps the UpdateSystemGarbageCollection method of the system sub-package.

func (*RESTClient) UpdateProject

func (c *RESTClient) UpdateProject(ctx context.Context, p *modelv2.Project, storageLimit *int64) error

UpdateProject wraps the ListProjects method of the project sub-package.

func (*RESTClient) UpdateProjectMemberRole

func (c *RESTClient) UpdateProjectMemberRole(ctx context.Context, p *modelv2.Project, u *legacymodel.User, roleID int) error

UpdateProjectMemberRole wraps the UpdateProjectMemberRole method of the project sub-package.

func (*RESTClient) UpdateProjectMetadata

func (c *RESTClient) UpdateProjectMetadata(ctx context.Context, p *modelv2.Project, key project.MetadataKey, value string) error

UpdateProjectMetadata wraps the UpdateProjectMetadata method of the project sub-package.

func (*RESTClient) UpdateProjectRobot

func (c *RESTClient) UpdateProjectRobot(ctx context.Context, p *modelv2.Project, robotID int64, r *modelv2.Robot) error

UpdateProjectRobot wraps the UpdateProjectRobot method of the project sub-package.

func (*RESTClient) UpdateProjectWebhookPolicy

func (c *RESTClient) UpdateProjectWebhookPolicy(ctx context.Context, p *modelv2.Project, policyID int64, policy *legacymodel.WebhookPolicy) error

UpdateProjectWebhookPolicy wraps the UpdateProjectWebhookPolicy method of the project sub-package.

func (*RESTClient) UpdateRegistry

func (c *RESTClient) UpdateRegistry(ctx context.Context, r *legacymodel.Registry) error

UpdateRegistry wraps the UpdateRegistry method of the registry sub-package.

func (*RESTClient) UpdateReplicationPolicy

func (c *RESTClient) UpdateReplicationPolicy(ctx context.Context, r *legacymodel.ReplicationPolicy) error

UpdateReplicationPolicy wraps the UpdateReplicationPolicy method of the replication sub-package.

func (*RESTClient) UpdateRetentionPolicy

func (c *RESTClient) UpdateRetentionPolicy(ctx context.Context, ret *modelv2.RetentionPolicy) error

UpdateRetentionPolicy wraps the UpdateRetentionPolicy method of the retention sub-package.

func (*RESTClient) UpdateRobotAccount

func (c *RESTClient) UpdateRobotAccount(ctx context.Context, r *modelv2.Robot) error

UpdateRobotAccount wraps the UpdateRobotAccount method of the robot sub-package.

func (*RESTClient) UpdateStorageQuotaByProjectID

func (c *RESTClient) UpdateStorageQuotaByProjectID(ctx context.Context, projectID int64, storageLimit int64) error

UpdateStorageQuotaByProjectID wraps the UpdateStorageQuotaByProjectID method of the quota sub-package.

func (*RESTClient) UpdateUser

func (c *RESTClient) UpdateUser(ctx context.Context, u *legacymodel.User) error

UpdateUser wraps the UpdateUser method of the user sub-package.

func (*RESTClient) UpdateUserPassword

func (c *RESTClient) UpdateUserPassword(ctx context.Context, id int64, password *legacymodel.Password) error

UpdateUserPassword wraps the UpdateUserPassword method of the user sub-package.

func (*RESTClient) UserExists

func (c *RESTClient) UserExists(ctx context.Context, u *legacymodel.User) (bool, error)

UserExists wraps the UserExists method of the user sub-package.

Jump to

Keyboard shortcuts

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