gitlab

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractTag added in v0.7.0

func ExtractTag(tags map[string]string) (string, error)

Types

type Gitlab

type Gitlab struct {
	// contains filtered or unexported fields
}

Gitlab Provider struct with reference to GitLab clients, a projectID and groupIDs.

func NewGitlabProvider

func NewGitlabProvider() *Gitlab

Function newGitlabProvider returns a reference to a new instance of a 'Gitlab' struct.

func (*Gitlab) Capabilities added in v0.7.0

func (g *Gitlab) Capabilities() esv1beta1.SecretStoreCapabilities

Capabilities return the provider supported capabilities (ReadOnly, WriteOnly, ReadWrite).

func (*Gitlab) Close

func (g *Gitlab) Close(ctx context.Context) error

func (*Gitlab) DeleteSecret added in v0.7.0

func (g *Gitlab) DeleteSecret(ctx context.Context, remoteRef esv1beta1.PushRemoteRef) error

func (*Gitlab) GetAllSecrets added in v0.5.0

func (g *Gitlab) GetAllSecrets(ctx context.Context, ref esv1beta1.ExternalSecretFind) (map[string][]byte, error)

GetAllSecrets syncs all gitlab project and group variables into a single Kubernetes Secret.

func (*Gitlab) GetSecret

func (*Gitlab) GetSecretMap

func (g *Gitlab) GetSecretMap(ctx context.Context, ref esv1beta1.ExternalSecretDataRemoteRef) (map[string][]byte, error)

func (*Gitlab) NewClient

func (g *Gitlab) NewClient(ctx context.Context, store esv1beta1.GenericStore, kube kclient.Client, namespace string) (esv1beta1.SecretsClient, error)

Method on Gitlab Provider to set up projectVariablesClient with credentials, populate projectID and environment.

func (*Gitlab) PushSecret added in v0.7.0

func (g *Gitlab) PushSecret(ctx context.Context, value []byte, remoteRef esv1beta1.PushRemoteRef) error

Not Implemented PushSecret.

func (*Gitlab) ResolveGroupIds added in v0.7.0

func (g *Gitlab) ResolveGroupIds() error

func (*Gitlab) Validate added in v0.4.2

func (g *Gitlab) Validate() (esv1beta1.ValidationResult, error)

Validate will use the gitlab projectVariablesClient/groupVariablesClient to validate the gitlab provider using the ListVariable call to ensure get permissions without needing a specific key.

func (*Gitlab) ValidateStore added in v0.5.0

func (g *Gitlab) ValidateStore(store esv1beta1.GenericStore) error

type GroupVariablesClient added in v0.7.0

type GroupVariablesClient interface {
	GetVariable(gid interface{}, key string, options ...gitlab.RequestOptionFunc) (*gitlab.GroupVariable, *gitlab.Response, error)
	ListVariables(gid interface{}, opt *gitlab.ListGroupVariablesOptions, options ...gitlab.RequestOptionFunc) ([]*gitlab.GroupVariable, *gitlab.Response, error)
}

type ProjectGroupPathSorter added in v0.7.0

type ProjectGroupPathSorter []*gitlab.ProjectGroup

func (ProjectGroupPathSorter) Len added in v0.7.0

func (a ProjectGroupPathSorter) Len() int

func (ProjectGroupPathSorter) Less added in v0.7.0

func (a ProjectGroupPathSorter) Less(i, j int) bool

func (ProjectGroupPathSorter) Swap added in v0.7.0

func (a ProjectGroupPathSorter) Swap(i, j int)

type ProjectVariablesClient added in v0.7.0

type ProjectVariablesClient interface {
	GetVariable(pid interface{}, key string, opt *gitlab.GetProjectVariableOptions, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectVariable, *gitlab.Response, error)
	ListVariables(pid interface{}, opt *gitlab.ListProjectVariablesOptions, options ...gitlab.RequestOptionFunc) ([]*gitlab.ProjectVariable, *gitlab.Response, error)
}

type ProjectsClient added in v0.7.0

type ProjectsClient interface {
	ListProjectsGroups(pid interface{}, opt *gitlab.ListProjectGroupOptions, options ...gitlab.RequestOptionFunc) ([]*gitlab.ProjectGroup, *gitlab.Response, error)
}

Directories

Path Synopsis
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.

Jump to

Keyboard shortcuts

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