harbor

package
v0.0.0-...-b3e6077 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateRobotAccount

func CreateRobotAccount(ctx context.Context, opts *models.RobotCreate) (*robot.CreateRobotCreated, error)

func CreateSatelliteProject

func CreateSatelliteProject(ctx context.Context) (bool, error)

func DeleteRobotAccount

func DeleteRobotAccount(ctx context.Context, robotID int64) (*robot.DeleteRobotOK, error)

func GenRobotPerms

func GenRobotPerms(projects []string) []*models.RobotPermission

func GetClient

func GetClient() *v2client.HarborAPI

Returns Harbor v2 client

func GetClientByConfig

func GetClientByConfig(clientConfig *harbor.ClientSetConfig) *v2client.HarborAPI

func GetProject

func GetProject(ctx context.Context, name string) (bool, error)

func GetRobotAccount

func GetRobotAccount(ctx context.Context, id int64) (*models.Robot, error)

func GetRobotDetails

func GetRobotDetails(r *robot.CreateRobotCreated) (int64, string, string)

func IsRobotPresent

func IsRobotPresent(ctx context.Context, name string) (bool, error)

func ListReplication

func ListReplication(ctx context.Context, opts ListParams) ([]*models.ReplicationPolicy, error)

func ListRobots

func ListRobots(ctx context.Context, opts ListParams) (*robot.ListRobotOK, error)

func RefreshRobotAccount

func RefreshRobotAccount(ctx context.Context, secret string, robotID int64) (*robot.RefreshSecOK, error)

func RobotAccountTemplate

func RobotAccountTemplate(name string, projects []string) *models.RobotCreate

func UpdateRobotAccount

func UpdateRobotAccount(ctx context.Context, opts *models.Robot) (*robot.UpdateRobotOK, error)

Types

type ListParams

type ListParams struct {
	Page     int64
	PageSize int64
	Q        string
	Sort     string
}

Jump to

Keyboard shortcuts

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