v2

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2023 License: Apache-2.0 Imports: 13 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) 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) 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) GetProject

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

GetProject gets the project data.

func (*Client) GetRobotAccount

func (c *Client) GetRobotAccount(projectID, robotID int64) (*models.Robot, 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