Documentation
¶
Index ¶
- Variables
- func BuildClient(ctx context.Context, client client.Client, harbor *registriesv1alpha1.Instance) (*h.Client, error)
- func CheckAndGetReplicationTriggerType(providedType registriesv1alpha1.TriggerType) (h.TriggerType, error)
- func CheckFilterType(filterType h.FilterType) error
- func FetchReadyHarborInstance(ctx context.Context, namespace, parentInstanceName string, r client.Client) (*registriesv1alpha1.Instance, error)
- func GetRegistry(harborClient *h.Client, registry *registriesv1alpha1.Registry) (h.Registry, error)
- func GetReplication(harborClient *h.Client, replication *registriesv1alpha1.Replication) (h.ReplicationPolicy, error)
- func GetUser(user *registriesv1alpha1.User, harborClient *h.Client) (h.User, error)
- type ErrInstanceNotFound
- type ErrInstanceNotReady
- type ErrRegistryNotReady
- type HelmClientFactory
Constants ¶
This section is empty.
Variables ¶
var ErrRegistryNotFound = errors.New("registry not found")
ErrRegistryNotFound is a custom error type describing the absence of a registry
var ErrReplicationNotFound = errors.New("replication not found")
ErrReplicationNotFound is a custom error type describing the absence of a replication
var ErrUserNotFound = errors.New("user not found")
ErrUserNotFound is a custom error type describing the absence of a user
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 ¶
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
Types ¶
type ErrInstanceNotFound ¶ added in v0.1.1
type ErrInstanceNotFound string
ErrInstanceNotFound is called when the corresponding Harbor instance could not be found
func (ErrInstanceNotFound) Error ¶ added in v0.1.1
func (e ErrInstanceNotFound) Error() string
type ErrInstanceNotReady ¶ added in v0.1.1
type ErrInstanceNotReady string
ErrInstanceNotFound is called when the corresponding Harbor instance is not ready
func (ErrInstanceNotReady) Error ¶ added in v0.1.1
func (e ErrInstanceNotReady) Error() string
type ErrRegistryNotReady ¶ added in v0.4.2
type ErrRegistryNotReady string
ErrRegistryNotReady is called when the corresponding RegistryCR (registriesv1alpha1.Registry) is not ready
func (ErrRegistryNotReady) Error ¶ added in v0.4.2
func (e ErrRegistryNotReady) Error() string
type HelmClientFactory ¶ added in v0.3.3
type HelmClientFactory func(repoCache, repoConfig, namespace string) (helmclient.Client, error)
HelmClientFactory represent functions to dynamically generate helm clients.