secret

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Copyright 2023 Nautes Authors

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.

Package secret is a generated GoMock package.

Index

Constants

View Source
const (
	SecretsEngine = "git"
	SecretsKey    = "deploykey"
	AuthRoleKey   = "Argo"
)

Variables

This section is empty.

Functions

func NewHttpClient

func NewHttpClient(ca string) (*http.Client, error)

func NewKubernetesAuth

func NewKubernetesAuth(mountPath string, roles map[string]string) (*auth.KubernetesAuth, error)

func NewKubernetesClient

func NewKubernetesClient() (client.Client, error)

Types

type MockSecretOperator

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

MockSecretOperator is a mock of SecretOperator interface.

func NewMockSecretOperator

func NewMockSecretOperator(ctrl *gomock.Controller) *MockSecretOperator

NewMockSecretOperator creates a new mock instance.

func (*MockSecretOperator) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockSecretOperator) GetSecret

func (m *MockSecretOperator) GetSecret(secretOptions SecretOptions) (*SecretData, error)

GetSecret mocks base method.

func (*MockSecretOperator) Init added in v0.3.4

func (m *MockSecretOperator) Init(secretConfig *SecretConfig) error

Init mocks base method.

type MockSecretOperatorMockRecorder

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

MockSecretOperatorMockRecorder is the mock recorder for MockSecretOperator.

func (*MockSecretOperatorMockRecorder) GetSecret

func (mr *MockSecretOperatorMockRecorder) GetSecret(secretOptions interface{}) *gomock.Call

GetSecret indicates an expected call of GetSecret.

func (*MockSecretOperatorMockRecorder) Init added in v0.3.4

func (mr *MockSecretOperatorMockRecorder) Init(secretConfig interface{}) *gomock.Call

Init indicates an expected call of Init.

type SecretConfig added in v0.3.4

type SecretConfig struct {
	SecretRepo *nautesconfigs.SecretRepo
	Namespace  string
}

type SecretData

type SecretData struct {
	ID   int
	Data string
}

type SecretOperator

type SecretOperator interface {
	Init(secretConfig *SecretConfig) error
	GetSecret(secretOptions SecretOptions) (*SecretData, error)
}

func NewVaultClient

func NewVaultClient() (SecretOperator, error)

type SecretOptions

type SecretOptions struct {
	SecretPath   string
	SecretEngine string
	SecretKey    string
}

type VaultClient

type VaultClient struct {
	VaultConfig *VaultConfig
	// contains filtered or unexported fields
}

func (*VaultClient) GetSecret

func (v *VaultClient) GetSecret(secretOptions SecretOptions) (*SecretData, error)

func (*VaultClient) Init added in v0.3.4

func (v *VaultClient) Init(config *SecretConfig) error

func (*VaultClient) Logout

func (s *VaultClient) Logout(client *vault.Client) error

type VaultConfig added in v0.3.0

type VaultConfig struct {
	Addr         string
	CABundle     string
	MountPath    string
	Namespace    string
	OperatorName map[string]string
}

Jump to

Keyboard shortcuts

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