apiv1

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: May 12, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

Client is an interface that groups all sub-package methods.

type RESTClient

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

RESTClient implements the Client interface as a REST client

func NewRESTClient

func NewRESTClient(cl *client.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 + basePath as well as basic auth info.

func (*RESTClient) AddProjectMember

func (c *RESTClient) AddProjectMember(ctx context.Context, p *model.Project, u *model.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 *model.Project, key project.MetadataKey, value string) error

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

func (*RESTClient) DeleteProject

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

func (*RESTClient) DeleteProjectMember

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

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

func (*RESTClient) DeleteProjectMetadataValue

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

DeleteProjectMetadataValue wraps the DeleteProjectMetadataValue method of the project 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) GetProject

func (c *RESTClient) GetProject(ctx context.Context, name string) (*model.Project, error)

GetProject wraps the GetProject method of the project 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) GetReplicationExecutionByID

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

GetReplicationExecutionsByID wraps the GetReplicationExecutionsByID method of the replication 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) 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) 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 *model.Project) ([]*model.ProjectMemberEntity, error)

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

func (*RESTClient) ListProjectMetadata

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

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

func (*RESTClient) ListProjects

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

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

func (*RESTClient) NewProject

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

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

func (*RESTClient) UpdateProjectMemberRole

func (c *RESTClient) UpdateProjectMemberRole(ctx context.Context, p *model.Project, u *model.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 *model.Project, key project.MetadataKey, value string) error

UpdateProjectMetadata wraps the UpdateProjectMetadata method of the project 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.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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