Documentation ¶
Index ¶
- type Client
- type EntityType
- type RESTClient
- func (c *RESTClient) AddProjectMember(ctx context.Context, projectNameOrID string, m *model.ProjectMember) error
- func (c *RESTClient) DeleteProjectMember(ctx context.Context, projectNameOrID string, m *model.ProjectMember) error
- func (c *RESTClient) ListProjectMembers(ctx context.Context, projectNameOrID, memberQuery string) ([]*model.ProjectMemberEntity, error)
- func (c *RESTClient) UpdateProjectMember(ctx context.Context, projectNameOrID string, m *model.ProjectMember) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { AddProjectMember(ctx context.Context, projectNameOrID string, m *model.ProjectMember) error ListProjectMembers(ctx context.Context, projectNameOrID, memberQuery string) ([]*model.ProjectMemberEntity, error) UpdateProjectMember(ctx context.Context, projectNameOrID string, m *model.ProjectMember) error DeleteProjectMember(ctx context.Context, projectNameOrID string, m *model.ProjectMember) error }
type EntityType ¶
type EntityType string
const ( EntityTypeUser EntityType = "u" EntityTypeGroup EntityType = "g" )
func (EntityType) String ¶
func (t EntityType) String() string
type RESTClient ¶
type RESTClient struct { // Options contains optional configuration when making API calls. Options *config.Options // The new client of the harbor v2 API V2Client *v2client.Harbor // AuthInfo contains the auth information that is provided on API calls. AuthInfo runtime.ClientAuthInfoWriter }
RESTClient is a subclient for handling system related actions.
func NewClient ¶
func NewClient(v2Client *v2client.Harbor, opts *config.Options, authInfo runtime.ClientAuthInfoWriter) *RESTClient
func (*RESTClient) AddProjectMember ¶
func (c *RESTClient) AddProjectMember(ctx context.Context, projectNameOrID string, m *model.ProjectMember) error
AddProjectMember adds the project member 'm' to the corresponding project.
func (*RESTClient) DeleteProjectMember ¶
func (c *RESTClient) DeleteProjectMember(ctx context.Context, projectNameOrID string, m *model.ProjectMember) error
DeleteProjectMember deletes the membership between a user and a project.
func (*RESTClient) ListProjectMembers ¶
func (c *RESTClient) ListProjectMembers(ctx context.Context, projectNameOrID, memberQuery string) ([]*model.ProjectMemberEntity, error)
ListProjectMembers returns a list of project members.
func (*RESTClient) UpdateProjectMember ¶
func (c *RESTClient) UpdateProjectMember(ctx context.Context, projectNameOrID string, m *model.ProjectMember) error
UpdateProjectMember updates a project member.
Click to show internal directories.
Click to hide internal directories.