Documentation
¶
Index ¶
- type Client
- type RESTClient
- func (c *RESTClient) AddProjectMember(ctx context.Context, p *model.Project, u *model.User, roleID int) error
- func (c *RESTClient) AddProjectMetadata(ctx context.Context, p *model.Project, key project.MetadataKey, value string) error
- func (c *RESTClient) DeleteProject(ctx context.Context, p *model.Project) error
- func (c *RESTClient) DeleteProjectMember(ctx context.Context, p *model.Project, u *model.User) error
- func (c *RESTClient) DeleteProjectMetadataValue(ctx context.Context, p *model.Project, key project.MetadataKey) error
- func (c *RESTClient) DeleteRegistry(ctx context.Context, r *model.Registry) error
- func (c *RESTClient) DeleteReplicationPolicy(ctx context.Context, r *model.ReplicationPolicy) error
- func (c *RESTClient) DeleteUser(ctx context.Context, u *model.User) error
- func (c *RESTClient) GetProject(ctx context.Context, name string) (*model.Project, error)
- func (c *RESTClient) GetRegistry(ctx context.Context, name string) (*model.Registry, error)
- func (c *RESTClient) GetReplicationExecutions(ctx context.Context, r *model.ReplicationExecution) ([]*model.ReplicationExecution, error)
- func (c *RESTClient) GetReplicationExecutionsByID(ctx context.Context, id int64) (*model.ReplicationExecution, error)
- func (c *RESTClient) GetReplicationPolicy(ctx context.Context, name string) (*model.ReplicationPolicy, error)
- func (c *RESTClient) GetReplicationPolicyByID(ctx context.Context, id int64) (*model.ReplicationPolicy, error)
- func (c *RESTClient) GetSystemGarbageCollection(ctx context.Context) (*model.AdminJobSchedule, error)
- func (c *RESTClient) GetUser(ctx context.Context, username string) (*model.User, error)
- func (c *RESTClient) ListProjectMembers(ctx context.Context, p *model.Project) ([]*model.ProjectMemberEntity, error)
- func (c *RESTClient) ListProjectMetadata(ctx context.Context, p *model.Project) (*model.ProjectMetadata, error)
- func (c *RESTClient) ListProjects(ctx context.Context, nameFilter string) ([]*model.Project, error)
- func (c *RESTClient) NewProject(ctx context.Context, name string, countLimit int, storageLimit int) (*model.Project, error)
- func (c *RESTClient) NewRegistry(ctx context.Context, name, registryType, url string, ...) (*model.Registry, error)
- func (c *RESTClient) NewReplicationPolicy(ctx context.Context, destRegistry, srcRegistry *model.Registry, ...) (*model.ReplicationPolicy, error)
- func (c *RESTClient) NewSystemGarbageCollection(ctx context.Context, cron, scheduleType string) (*model.AdminJobSchedule, error)
- func (c *RESTClient) NewUser(ctx context.Context, username, email, realname, password, comments string) (*model.User, error)
- func (c *RESTClient) ResetSystemGarbageCollection(ctx context.Context) error
- func (c *RESTClient) TriggerReplicationExecution(ctx context.Context, r *model.ReplicationExecution) error
- func (c *RESTClient) UpdateProject(ctx context.Context, p *model.Project, countLimit int, storageLimit int) error
- func (c *RESTClient) UpdateProjectMemberRole(ctx context.Context, p *model.Project, u *model.User, roleID int) error
- func (c *RESTClient) UpdateProjectMetadata(ctx context.Context, p *model.Project, key project.MetadataKey, value string) error
- func (c *RESTClient) UpdateRegistry(ctx context.Context, r *model.Registry) error
- func (c *RESTClient) UpdateReplicationPolicy(ctx context.Context, r *model.ReplicationPolicy) error
- func (c *RESTClient) UpdateSystemGarbageCollection(ctx context.Context, newGcSchedule *model.AdminJobScheduleObj) error
- func (c *RESTClient) UpdateUser(ctx context.Context, u *model.User) error
- func (c *RESTClient) UpdateUserPassword(ctx context.Context, id int64, password *model.Password) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
user.Client
project.Client
registry.Client
replication.Client
system.Client
}
Client is an interface that groups all sub-package methods.
type RESTClient ¶ added in v1.0.0
type RESTClient struct {
// contains filtered or unexported fields
}
RESTClient implements the Client interface as a REST client
func NewRESTClient ¶ added in v1.0.0
func NewRESTClient(cl *client.Harbor, authInfo runtime.ClientAuthInfoWriter) *RESTClient
NewRESTClient constructs a new REST client containing each sub client.
func NewRESTClientForHost ¶ added in v1.0.0
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 ¶ added in v1.0.0
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 ¶ added in v1.0.0
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 ¶ added in v1.0.0
func (*RESTClient) DeleteProjectMember ¶ added in v1.0.0
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 ¶ added in v1.0.0
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 ¶ added in v1.0.0
DeleteRegistry wraps the DeleteRegistry method of the registry sub-package.
func (*RESTClient) DeleteReplicationPolicy ¶ added in v1.0.1
func (c *RESTClient) DeleteReplicationPolicy(ctx context.Context, r *model.ReplicationPolicy) error
DeleteReplicationPolicy wraps the DeleteReplicationPolicy method of the replication sub-package.
func (*RESTClient) DeleteUser ¶ added in v1.0.0
DeleteUser wraps the DeleteUser method of the user sub-package.
func (*RESTClient) GetProject ¶ added in v1.0.0
GetProject wraps the GetProject method of the project sub-package.
func (*RESTClient) GetRegistry ¶ added in v1.0.0
GetRegistry wraps the GetRegistry method of the registry sub-package.
func (*RESTClient) GetReplicationExecutions ¶ added in v1.0.1
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 ¶ added in v1.0.1
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 ¶ added in v1.0.1
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 ¶ added in v1.0.1
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 ¶ added in v1.0.0
func (c *RESTClient) GetSystemGarbageCollection(ctx context.Context) (*model.AdminJobSchedule, error)
GetSystemGarbageCollection wraps the GetSystemGarbageCollection method of the system sub-package.
func (*RESTClient) GetUser ¶ added in v1.0.0
GetUser wraps the GetUser method of the user sub-package.
func (*RESTClient) ListProjectMembers ¶ added in v1.0.0
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 ¶ added in v1.0.0
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 ¶ added in v1.0.0
ListProjects wraps the ListProjects method of the project sub-package.
func (*RESTClient) NewProject ¶ added in v1.0.0
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 ¶ added in v1.0.0
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 ¶ added in v1.0.1
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 ¶ added in v1.0.0
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 ¶ added in v1.0.0
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 ¶ added in v1.0.0
func (c *RESTClient) ResetSystemGarbageCollection(ctx context.Context) error
ResetSystemGarbageCollection wraps the ResetSystemGarbageCollection method of the system sub-package.
func (*RESTClient) TriggerReplicationExecution ¶ added in v1.0.1
func (c *RESTClient) TriggerReplicationExecution(ctx context.Context, r *model.ReplicationExecution) error
TriggerReplicationExecution wraps the TriggerReplicationExecution method of the replication sub-package.
func (*RESTClient) UpdateProject ¶ added in v1.0.0
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 ¶ added in v1.0.0
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 ¶ added in v1.0.0
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 ¶ added in v1.0.1
UpdateRegistry wraps the UpdateRegistry method of the registry sub-package.
func (*RESTClient) UpdateReplicationPolicy ¶ added in v1.0.1
func (c *RESTClient) UpdateReplicationPolicy(ctx context.Context, r *model.ReplicationPolicy) error
UpdateReplicationPolicy wraps the UpdateReplicationPolicy method of the replication sub-package.
func (*RESTClient) UpdateSystemGarbageCollection ¶ added in v1.0.0
func (c *RESTClient) UpdateSystemGarbageCollection(ctx context.Context, newGcSchedule *model.AdminJobScheduleObj) error
UpdateSystemGarbageCollection wraps the UpdateSystemGarbageCollection method of the system sub-package.
func (*RESTClient) UpdateUser ¶ added in v1.0.0
UpdateUser wraps the UpdateUser method of the user sub-package.
func (*RESTClient) UpdateUserPassword ¶ added in v1.0.1
func (c *RESTClient) UpdateUserPassword(ctx context.Context, id int64, password *model.Password) error
UpdateUserPassword wraps the UpdateUserPassword method of the user sub-package.