secrettype

package
v0.0.0-...-e7c744b Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotSupportedSecretType = errors.Sentinel("not supported secret type")

ErrNotSupportedSecretType describe an error if the secret type is not supported.

Functions

This section is empty.

Types

type MockService

type MockService struct {
	mock.Mock
}

MockService is an autogenerated mock for the Service type.

func (*MockService) GetSecretType

func (_m *MockService) GetSecretType(ctx context.Context, secretType string) (secretTypeDef TypeDefinition, err error)

GetSecretType provides a mock function.

func (*MockService) ListSecretTypes

func (_m *MockService) ListSecretTypes(ctx context.Context) (secretTypes map[string]TypeDefinition, err error)

ListSecretTypes provides a mock function.

type Service

type Service interface {
	// ListSecretTypes lists secret type definitions.
	ListSecretTypes(ctx context.Context) (secretTypes map[string]TypeDefinition, err error)

	// GetSecretType returns a single secret type definition.
	GetSecretType(ctx context.Context, secretType string) (secretTypeDef TypeDefinition, err error)
}

Service provides information about secret types.

func NewService

func NewService(typeList secret.TypeList) Service

NewService returns a new Service.

type TypeDefinition

type TypeDefinition struct {
	Fields []TypeField `json:"fields"`
}

TypeDefinition represents a secret type definition.

type TypeField

type TypeField struct {
	Name            string `json:"name"`
	Description     string `json:"description,omitempty"`
	Required        bool   `json:"required"`
	IsSafeToDisplay bool   `json:"isSafeToDisplay,omitempty"`
	Opaque          bool   `json:"opaque,omitempty"`
}

TypeField represents the fields in a secret.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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