Documentation ¶
Index ¶
- type Adapter
- type Client
- func (c *Client) BasePath() string
- func (c *Client) CreateProject(name string, metadata map[string]interface{}) error
- func (c *Client) GetAPIVersion() (string, error)
- func (c *Client) GetProject(name string) (*Project, error)
- func (c *Client) GetURL() string
- func (c *Client) ListLabels() ([]string, error)
- func (c *Client) ListProjects(name string) ([]*Project, error)
- func (c *Client) ListProjectsWithQuery(q string, withDetail bool) ([]*Project, error)
- type Project
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter struct { *native.Adapter Registry *model.Registry Client *Client // contains filtered or unexported fields }
Adapter is the base adapter for Harbor
func (*Adapter) GetAPIVersion ¶
GetAPIVersion returns the supported API version of the Harbor instance that the adapter is created for
func (*Adapter) Info ¶
func (a *Adapter) Info() (*model.RegistryInfo, error)
Info provides the information of the Harbor registry instance
func (*Adapter) ListProjects ¶
ListProjects lists projects
type Client ¶
type Client struct { URL string APIVersion string C *common_http.Client }
Client is the base client that provides common methods for all versions of Harbor clients
func NewClient ¶
func NewClient(url string, c *common_http.Client) (*Client, error)
NewClient returns an instance of the base client
func (*Client) CreateProject ¶
CreateProject creates project
func (*Client) GetAPIVersion ¶
GetAPIVersion returns the supported API version
func (*Client) GetProject ¶
GetProject gets the specific project
func (*Client) ListLabels ¶
ListLabels lists system level labels
func (*Client) ListProjects ¶
ListProjects lists projects
Click to show internal directories.
Click to hide internal directories.