apiv2

package
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2020 License: MIT Imports: 16 Imported by: 0

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 *model.User, roleID int) error

AddProjectMember wraps the AddProjectMember method of the registry 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 registry sub-package.

func (*RESTClient) DeleteProject

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

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

func (*RESTClient) DeleteProjectMember

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

DeleteProjectMember wraps the DeleteProjectMember method of the registry 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 registry sub-package.

func (*RESTClient) DeleteRegistry

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

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

func (*RESTClient) DeleteReplicationPolicy

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

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

func (*RESTClient) DeleteUser

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

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

func (*RESTClient) GetProjectByID

func (c *RESTClient) GetProjectByID(ctx context.Context, projectID int64) (*modelv2.Project, error)

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

func (*RESTClient) GetProjectByName

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

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

func (*RESTClient) GetProjectMetadataValue

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

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

func (*RESTClient) GetRegistry

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

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

func (*RESTClient) GetReplicationExecutions

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

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

func (*RESTClient) GetReplicationExecutionsByID

func (c *RESTClient) GetReplicationExecutionsByID(ctx context.Context, id int64) (*model.ReplicationExecution, error)

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

func (*RESTClient) GetReplicationPolicy

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

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

func (*RESTClient) GetReplicationPolicyByID

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

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

func (*RESTClient) GetRetentionPolicyByProject

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

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

func (*RESTClient) GetSystemGarbageCollection

func (c *RESTClient) GetSystemGarbageCollection(ctx context.Context) (*model.AdminJobSchedule, error)

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

func (*RESTClient) GetUser

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

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

func (*RESTClient) ListProjectMembers

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

ListProjectMembers wraps the ListProjectMembers method of the registry 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 registry sub-package.

func (*RESTClient) ListProjects

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

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

func (*RESTClient) NewProject

func (c *RESTClient) NewProject(ctx context.Context, name string, storageLimit int) (*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 *model.RegistryCredential, insecure bool) (*model.Registry, error)

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

func (*RESTClient) NewReplicationPolicy

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

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

func (*RESTClient) NewRetentionPolicy

func (c *RESTClient) NewRetentionPolicy(ctx context.Context, rep *model.RetentionPolicy) error

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

func (*RESTClient) NewSystemGarbageCollection

func (c *RESTClient) NewSystemGarbageCollection(ctx context.Context,
	cron, scheduleType string) (*model.AdminJobSchedule, error)

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

func (*RESTClient) NewUser

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

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

func (*RESTClient) ResetSystemGarbageCollection

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

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

func (*RESTClient) TriggerReplicationExecution

func (c *RESTClient) TriggerReplicationExecution(ctx context.Context, r *model.ReplicationExecution) error

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

func (*RESTClient) UpdateProject

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

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

func (*RESTClient) UpdateProjectMemberRole

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

UpdateProjectMemberRole wraps the UpdateProjectMemberRole method of the registry 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 registry sub-package.

func (*RESTClient) UpdateRegistry

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

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

func (*RESTClient) UpdateReplicationPolicy

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

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

func (*RESTClient) UpdateSystemGarbageCollection

func (c *RESTClient) UpdateSystemGarbageCollection(ctx context.Context,
	newGcSchedule *model.AdminJobScheduleObj) error

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

func (*RESTClient) UpdateUser

func (c *RESTClient) UpdateUser(ctx context.Context, u *model.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 *model.Password) error

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

Jump to

Keyboard shortcuts

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