gitlab

package
v0.11.7 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2022 License: Apache-2.0, MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetChartCatalog

func GetChartCatalog() charts.Catalog

func SetChartCatalog

func SetChartCatalog(catalog charts.Catalog)

Types

type Adapter

Adapter is a purpose-built wrapper for GitLab resources. It provides a convenient interface to interact with GitLab resources.

Use internal `NewAdapter` functions to create a new wrapper for a specific GitLab resource version, for example `internal.NewV1Beta1Adapter`.

type Component

type Component string

Component is an alias type for representing an individual GitLab component.

func (Component) Name

func (c Component) Name() string

Name returns the name of the component.

type Components

type Components []Component

Components is a type for grouping and addressing a collection of GitLab components.

func (Components) Contains

func (c Components) Contains(component Component) bool

Contains checks wheather the collection contains the specified component.

func (Components) Names

func (c Components) Names() []string

Names returns the name of the components in the collection in the same order.

type ConditionType

type ConditionType string

ConditionType is an alias type for representing the type of a GitLab status condition.

func (ConditionType) Name

func (c ConditionType) Name() string

Name returns the name of the condition.

type FeatureCheck

type FeatureCheck func(values support.Values) bool

FeatureCheck is a callback for assessing the availability of a GitLab feature based on the values of specification of a GitLab resource.

type Features

type Features interface {
	// WantsFeature queries this GitLab resource for the specified feature.
	// Returns true if the instance has the feature in its specification.
	//
	// Note that this function only checks the specification of the GitLab
	// resource and does not verify the state of the GitLab instance.
	WantsFeature(check FeatureCheck) bool

	// WantsComponent is a shorthand for checking if a specific GitLab component
	// is enabled in the specification of this GitLab resource.
	//
	// Note that this function only checks the specification of the GitLab
	// resource and does not verify the state of the GitLab instance.
	WantsComponent(component Component) bool
}

Features represents the features that are specified in the underlying GitLab resource. Note that these features are the desired status of an instance and does not necessarily mean that the instance exists or is in the desired state.

type Operation

type Operation interface {
	// IsInstall indicates if this GitLab resource needs to be installed. This
	// occurs when the GitLab instance with the specified name and version does
	// not exist.
	//
	// This function relies on both the specification and status of the GitLab
	// resource to make the decision.
	IsInstall() bool

	// IsUpgrade indicates if this GitLab resource needs upgrade. This occurs
	// when the GitLab instance already exists but its version is lower than
	// the specified version in GitLab resource specification.
	//
	// This function relies on both the specification and status of the GitLab
	// resource to make the decision.
	IsUpgrade() bool

	// IsDowngrade indicates if this GitLab resource needs downgrade. This
	// occurs when the GitLab instance already exists but its version is higher
	// than the specified version in GitLab resource specification.
	//
	// This function relies on both the specification and status of the GitLab
	// resource to make the decision.
	IsDowngrade() bool

	// CurrentVersion returns the current version of the GitLab instance or
	// an empty string when this is a new instance.
	//
	// This function uses the status of the GitLab resource.
	CurrentVersion() string

	// DesiredVersion returns the expected version of GitLab instance that is
	// specified.
	DesiredVersion() string
}

Operation represents the operations that are required to reconcile the underlying GitLab resource, for example install a new instance or upgrading/downgrading an existing instance.

type Status

type Status interface {
	// SetCondition updates the provided condition with the details of
	// the underlying GitLab resource, including the observed generation,
	// and adds it to the resource conditions.
	SetCondition(condition metav1.Condition)

	// RecordVersion sets the status version to the specified (desired) version.
	RecordVersion()
}

Status represents the status of the underlying GitLab resource and provides a convenient mechanism to update the status.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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