fake

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2020 License: Apache-2.0 Imports: 1 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 {
	BaseURLFunc            func() string
	ListProjectsFunc       func() ([]harbor.Project, error)
	GetRobotAccountsFunc   func(project harbor.Project) ([]harbor.Robot, error)
	CreateRobotAccountFunc func(name string, pushAccess bool, project harbor.Project) (*harbor.CreateRobotResponse, error)
	DeleteRobotAccountFunc func(project harbor.Project, robotID int) error
}

Client implements harbor.API and offers a Func interface for each method

func (Client) BaseURL

func (f Client) BaseURL() string

BaseURL ...

func (Client) CreateRobotAccount

func (f Client) CreateRobotAccount(name string, pushAccess bool, project harbor.Project) (*harbor.CreateRobotResponse, error)

CreateRobotAccount ...

func (Client) DeleteRobotAccount

func (f Client) DeleteRobotAccount(project harbor.Project, robotID int) error

DeleteRobotAccount ...

func (Client) GetRobotAccounts

func (f Client) GetRobotAccounts(project harbor.Project) ([]harbor.Robot, error)

GetRobotAccounts ...

func (Client) ListProjects

func (f Client) ListProjects() ([]harbor.Project, error)

ListProjects ...

Jump to

Keyboard shortcuts

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