secret

package
v1.16.12-beta004 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package secret is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMetadataName

func GetMetadataName(name string) string

GetMetadataName returns secret metadata name

func NewApplySpec added in v0.8.1

func NewApplySpec(id, namespace string, labels, stringData map[string]string) *corev1.SecretApplyConfiguration

NewApplySpec is a method to return secret apply spec

func NewSpec

func NewSpec(id, namespace string, labels, stringData map[string]string) *v1.Secret

NewSpec is a method to return secret spec

Types

type Client

type Client struct {
	ClientSet *kubernetes.Clientset
	Log       *zap.SugaredLogger
	Namespace string
}

Client provide methods to manage secrets

func NewClient

func NewClient(namespace string) (*Client, error)

NewClient is a method to create new secret client

func (*Client) Apply added in v0.8.1

func (c *Client) Apply(id string, labels, stringData map[string]string) error

Apply is a method to create or update a secret

func (*Client) Create

func (c *Client) Create(id string, labels, stringData map[string]string) error

Create is a method to create new secret

func (*Client) Delete

func (c *Client) Delete(id string) error

Delete is a method to delete an existing secret

func (*Client) DeleteAll

func (c *Client) DeleteAll(selector string) error

DeleteAll is a method to delete all existing secrets

func (*Client) Get

func (c *Client) Get(id string) (map[string]string, error)

Get is a method to retrieve an existing secret

func (*Client) GetObject added in v1.14.0

func (c *Client) GetObject(id string) (*v1.Secret, error)

GetObject is a method to retrieve an existing secret object

func (*Client) List

func (c *Client) List(all bool) (map[string]map[string]string, error)

List is a method to retrieve all existing secrets

func (*Client) Update

func (c *Client) Update(id string, labels, stringData map[string]string) error

Update is a method to update an existing secret

type Interface added in v1.5.33

type Interface interface {
	Get(id string) (map[string]string, error)
	GetObject(id string) (*v1.Secret, error)
	List(all bool) (map[string]map[string]string, error)
	Create(id string, labels, stringData map[string]string) error
	Apply(id string, labels, stringData map[string]string) error
	Update(id string, labels, stringData map[string]string) error
	Delete(id string) error
	DeleteAll(selector string) error
}

type MockInterface added in v1.5.33

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

MockInterface is a mock of Interface interface.

func NewMockInterface added in v1.5.33

func NewMockInterface(ctrl *gomock.Controller) *MockInterface

NewMockInterface creates a new mock instance.

func (*MockInterface) Apply added in v1.5.33

func (m *MockInterface) Apply(arg0 string, arg1, arg2 map[string]string) error

Apply mocks base method.

func (*MockInterface) Create added in v1.5.33

func (m *MockInterface) Create(arg0 string, arg1, arg2 map[string]string) error

Create mocks base method.

func (*MockInterface) Delete added in v1.5.33

func (m *MockInterface) Delete(arg0 string) error

Delete mocks base method.

func (*MockInterface) DeleteAll added in v1.5.33

func (m *MockInterface) DeleteAll(arg0 string) error

DeleteAll mocks base method.

func (*MockInterface) EXPECT added in v1.5.33

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

func (*MockInterface) Get added in v1.5.33

func (m *MockInterface) Get(arg0 string) (map[string]string, error)

Get mocks base method.

func (*MockInterface) GetObject added in v1.14.0

func (m *MockInterface) GetObject(arg0 string) (*v1.Secret, error)

GetObject mocks base method.

func (*MockInterface) List added in v1.5.33

func (m *MockInterface) List(arg0 bool) (map[string]map[string]string, error)

List mocks base method.

func (*MockInterface) Update added in v1.5.33

func (m *MockInterface) Update(arg0 string, arg1, arg2 map[string]string) error

Update mocks base method.

type MockInterfaceMockRecorder added in v1.5.33

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

MockInterfaceMockRecorder is the mock recorder for MockInterface.

func (*MockInterfaceMockRecorder) Apply added in v1.5.33

func (mr *MockInterfaceMockRecorder) Apply(arg0, arg1, arg2 interface{}) *gomock.Call

Apply indicates an expected call of Apply.

func (*MockInterfaceMockRecorder) Create added in v1.5.33

func (mr *MockInterfaceMockRecorder) Create(arg0, arg1, arg2 interface{}) *gomock.Call

Create indicates an expected call of Create.

func (*MockInterfaceMockRecorder) Delete added in v1.5.33

func (mr *MockInterfaceMockRecorder) Delete(arg0 interface{}) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockInterfaceMockRecorder) DeleteAll added in v1.5.33

func (mr *MockInterfaceMockRecorder) DeleteAll(arg0 interface{}) *gomock.Call

DeleteAll indicates an expected call of DeleteAll.

func (*MockInterfaceMockRecorder) Get added in v1.5.33

func (mr *MockInterfaceMockRecorder) Get(arg0 interface{}) *gomock.Call

Get indicates an expected call of Get.

func (*MockInterfaceMockRecorder) GetObject added in v1.14.0

func (mr *MockInterfaceMockRecorder) GetObject(arg0 interface{}) *gomock.Call

GetObject indicates an expected call of GetObject.

func (*MockInterfaceMockRecorder) List added in v1.5.33

func (mr *MockInterfaceMockRecorder) List(arg0 interface{}) *gomock.Call

List indicates an expected call of List.

func (*MockInterfaceMockRecorder) Update added in v1.5.33

func (mr *MockInterfaceMockRecorder) Update(arg0, arg1, arg2 interface{}) *gomock.Call

Update indicates an expected call of Update.

Jump to

Keyboard shortcuts

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