Documentation ¶
Index ¶
- type Client
- type RESTClient
- func (c *RESTClient) AddProjectRobotV1(ctx context.Context, projectNameOrID string, r *modelv2.RobotCreateV1) error
- func (c *RESTClient) DeleteProjectRobotV1(ctx context.Context, projectNameOrID string, robotID int64) error
- func (c *RESTClient) ListProjectRobotsV1(ctx context.Context, projectNameOrID string) ([]*modelv2.Robot, error)
- func (c *RESTClient) UpdateProjectRobotV1(ctx context.Context, projectNameOrID string, robotID int64, r *modelv2.Robot) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { ListProjectRobotsV1(ctx context.Context, projectNameOrID string) ([]*modelv2.Robot, error) AddProjectRobotV1(ctx context.Context, projectNameOrID string, r *modelv2.RobotCreateV1) error UpdateProjectRobotV1(ctx context.Context, projectNameOrID string, robotID int64, r *modelv2.Robot) error DeleteProjectRobotV1(ctx context.Context, projectNameOrID string, robotID int64) error }
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 project related actions.
func NewClient ¶
func NewClient(v2Client *v2client.Harbor, opts *config.Options, authInfo runtime.ClientAuthInfoWriter) *RESTClient
func (*RESTClient) AddProjectRobotV1 ¶
func (c *RESTClient) AddProjectRobotV1(ctx context.Context, projectNameOrID string, r *modelv2.RobotCreateV1) error
AddProjectRobotV1 creates the robot account 'r' and adds it to the project 'p'. and returns a 'RobotCreated' response.
func (*RESTClient) DeleteProjectRobotV1 ¶
func (c *RESTClient) DeleteProjectRobotV1(ctx context.Context, projectNameOrID string, robotID int64) error
DeleteProjectRobotV1 deletes a robot account from project p.
func (*RESTClient) ListProjectRobotsV1 ¶
func (c *RESTClient) ListProjectRobotsV1(ctx context.Context, projectNameOrID string) ([]*modelv2.Robot, error)
ListProjectRobotsV1 returns a list of all robot accounts in project p.
func (*RESTClient) UpdateProjectRobotV1 ¶
func (c *RESTClient) UpdateProjectRobotV1(ctx context.Context, projectNameOrID string, robotID int64, r *modelv2.Robot) error
UpdateProjectRobotV1 updates a robot account 'r' in project 'p' using the 'robotID'.
Click to show internal directories.
Click to hide internal directories.