Documentation
¶
Index ¶
- func IsNotFoundErr(err error) bool
- type Client
- func (client *Client) CreateProject(public *models.ProjectPublic) (*models.ProjectPublic, error)
- func (client *Client) CreateRepository(public *models.RepositoryPublic) (*models.RepositoryPublic, error)
- func (client *Client) CreateRobot(public *models.RobotPublic) (*models.RobotPublic, error)
- func (client *Client) CreateWebhook(public *models.WebhookPublic) (*models.WebhookPublic, error)
- func (client *Client) DeleteProject(id int) error
- func (client *Client) DeleteRepository(name string) error
- func (client *Client) DeleteRobot(id int) error
- func (client *Client) DeleteWebhook(id int) error
- func (client *Client) ReadProject(id int) (*models.ProjectPublic, error)
- func (client *Client) ReadRepository(name string) (*models.RepositoryPublic, error)
- func (client *Client) ReadRobot(id int) (*models.RobotPublic, error)
- func (client *Client) ReadWebhook(id int) (*models.WebhookPublic, error)
- func (client *Client) UpdateProject(public *models.ProjectPublic) (*models.ProjectPublic, error)
- func (client *Client) UpdateRepository(public *models.RepositoryPublic) (*models.RepositoryPublic, error)
- func (client *Client) UpdateRobot(public *models.RobotPublic) (*models.RobotPublic, error)
- func (client *Client) UpdateWebhook(public *models.WebhookPublic) (*models.WebhookPublic, error)
- type ClientConf
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsNotFoundErr ¶
IsNotFoundErr checks if the error is a not found error.
Types ¶
type Client ¶
type Client struct {
Project string
HarborClient *harbor.ClientSet
// contains filtered or unexported fields
}
Client is a wrapper around the Harbor API client.
func (*Client) CreateProject ¶
func (client *Client) CreateProject(public *models.ProjectPublic) (*models.ProjectPublic, error)
CreateProject creates a project in Harbor.
func (*Client) CreateRepository ¶
func (client *Client) CreateRepository(public *models.RepositoryPublic) (*models.RepositoryPublic, error)
CreateRepository creates a repository in Harbor.
func (*Client) CreateRobot ¶
func (client *Client) CreateRobot(public *models.RobotPublic) (*models.RobotPublic, error)
CreateRobot creates a robot in Harbor.
func (*Client) CreateWebhook ¶
func (client *Client) CreateWebhook(public *models.WebhookPublic) (*models.WebhookPublic, error)
CreateWebhook creates a webhook in Harbor.
func (*Client) DeleteProject ¶
DeleteProject deletes a project from Harbor.
func (*Client) DeleteRepository ¶
DeleteRepository deletes a repository from Harbor.
func (*Client) DeleteRobot ¶
DeleteRobot deletes a robot in Harbor.
func (*Client) DeleteWebhook ¶
DeleteWebhook deletes a webhook from Harbor.
func (*Client) ReadProject ¶
func (client *Client) ReadProject(id int) (*models.ProjectPublic, error)
ReadProject reads a project from Harbor.
func (*Client) ReadRepository ¶
func (client *Client) ReadRepository(name string) (*models.RepositoryPublic, error)
ReadRepository reads a repository from Harbor.
func (*Client) ReadRobot ¶
func (client *Client) ReadRobot(id int) (*models.RobotPublic, error)
ReadRobot reads a robot from Harbor.
func (*Client) ReadWebhook ¶
func (client *Client) ReadWebhook(id int) (*models.WebhookPublic, error)
ReadWebhook reads a webhook from Harbor.
func (*Client) UpdateProject ¶
func (client *Client) UpdateProject(public *models.ProjectPublic) (*models.ProjectPublic, error)
UpdateProject updates a project in Harbor.
func (*Client) UpdateRepository ¶
func (client *Client) UpdateRepository(public *models.RepositoryPublic) (*models.RepositoryPublic, error)
UpdateRepository updates a repository in Harbor.
func (*Client) UpdateRobot ¶
func (client *Client) UpdateRobot(public *models.RobotPublic) (*models.RobotPublic, error)
UpdateRobot updates a robot in Harbor.
func (*Client) UpdateWebhook ¶
func (client *Client) UpdateWebhook(public *models.WebhookPublic) (*models.WebhookPublic, error)
UpdateWebhook updates a webhook in Harbor.