internal

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: May 18, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrRegistryNotFound = errors.New("registry not found")
View Source
var ErrReplicationNotFound = errors.New("replication not found")
View Source
var ErrUserNotFound = errors.New("user not found")

Functions

func BuildClient

func BuildClient(ctx context.Context, client client.Client, harbor *registriesv1alpha1.Instance) (*h.Client, error)

buildClient builds a harbor client to interact with the API using the default (admin) credentials of an existing harbor instance

func CheckAndGetReplicationTriggerType

func CheckAndGetReplicationTriggerType(providedType registriesv1alpha1.TriggerType) (h.TriggerType, error)

CheckAndGetReplicationTriggerType enumerates the specified trigger type and returns a trigger type used by Harbor

func CheckFilterType

func CheckFilterType(filterType h.FilterType) error

CheckFilterType enumerates the specified filter type

func FetchReadyHarborInstance added in v0.1.1

func FetchReadyHarborInstance(ctx context.Context, namespace, parentInstanceName string, r client.Client) (*registriesv1alpha1.Instance, error)

FetchReadyHarborInstance returns a harbor instance based on the provided instance name Also needs a controller client to fetch the actual instance

func GetRegistry

func GetRegistry(harborClient *h.Client, registry *registriesv1alpha1.Registry) (h.Registry, error)

GetRegistry gets and returns a registry object

func GetReplication

func GetReplication(harborClient *h.Client, replication *registriesv1alpha1.Replication) (h.ReplicationPolicy, error)

GetReplication gets and returns a replication object

func GetUser

func GetUser(user *registriesv1alpha1.User, harborClient *h.Client) (h.User, error)

Types

type ErrInstanceNotFound added in v0.1.1

type ErrInstanceNotFound string

func (ErrInstanceNotFound) Error added in v0.1.1

func (e ErrInstanceNotFound) Error() string

type ErrInstanceNotReady added in v0.1.1

type ErrInstanceNotReady string

func (ErrInstanceNotReady) Error added in v0.1.1

func (e ErrInstanceNotReady) Error() string

Jump to

Keyboard shortcuts

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