v2

package
v1.5.4 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client for talking to Harbor V2 API Wrap based on sdk v2.

func New

func New() *Client

New V2 client.

func NewWithServer

func NewWithServer(s *model.HarborServer) (*Client, error)

NewWithServer new V2 client with provided server.

func (*Client) CheckHealth

func (c *Client) CheckHealth() (*models.OverallHealthStatus, error)

func (*Client) CreateProject added in v1.5.3

func (c *Client) CreateProject(hp *goharborv1beta1.HarborProject) (int32, error)

func (*Client) CreateProjectMember added in v1.5.3

func (c *Client) CreateProjectMember(projectName string, newMember *models.ProjectMember) error

func (*Client) CreateRobotAccount

func (c *Client) CreateRobotAccount(projectID string) (*models.Robot, error)

func (*Client) DeleteProject

func (c *Client) DeleteProject(name string) error

DeleteProject deletes project.

func (*Client) DeleteProjectMember added in v1.5.3

func (c *Client) DeleteProjectMember(projectName string, memberID int64) error

func (*Client) DeleteRobotAccount

func (c *Client) DeleteRobotAccount(projectID, robotID int64) error

func (*Client) EnsureProject

func (c *Client) EnsureProject(name string) (int64, error)

EnsureProject ensures the specified project is on the harbor server If project with name is existing, then error will be nil.

func (*Client) GetProjectByID added in v1.5.3

func (c *Client) GetProjectByID(id int32) (*models.Project, error)

func (*Client) GetProjectByName added in v1.5.3

func (c *Client) GetProjectByName(name string) (*models.Project, error)

GetProjectByName gets the project data.

func (*Client) GetProjectMembers added in v1.5.3

func (c *Client) GetProjectMembers(hp *goharborv1beta1.HarborProject) ([]*models.ProjectMemberEntity, error)

func (*Client) GetProjectRequest added in v1.5.3

func (c *Client) GetProjectRequest(hp *goharborv1beta1.HarborProject) (*models.ProjectReq, error)

func (*Client) GetQuotaByID added in v1.5.3

func (c *Client) GetQuotaByID(quotaID int64) (*models.Quota, error)

func (*Client) GetQuotaByProjectID added in v1.5.3

func (c *Client) GetQuotaByProjectID(projectID int32) (*models.Quota, error)

func (*Client) GetRobotAccount

func (c *Client) GetRobotAccount(projectID, robotID int64) (*models.Robot, error)

func (*Client) ProjectExists added in v1.5.3

func (c *Client) ProjectExists(name string) (bool, error)

func (*Client) UpdateProject added in v1.5.3

func (c *Client) UpdateProject(projectName string, hp *goharborv1beta1.HarborProject) error

func (*Client) UpdateProjectMember added in v1.5.3

func (c *Client) UpdateProjectMember(projectName string, memberID int64, role *models.RoleRequest) error

func (*Client) UpdateProjectQuota added in v1.5.3

func (c *Client) UpdateProjectQuota(quotaID int64, storageLimit int64) error

func (*Client) WithContext

func (c *Client) WithContext(ctx context.Context) *Client

func (*Client) WithTimeout

func (c *Client) WithTimeout(timeout time.Duration) *Client

Jump to

Keyboard shortcuts

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