encrypt

package
v2.0.0-...-af3797a Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EncryptString

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

func NewEncryptString

func NewEncryptString(options ...OptionsFunc) *EncryptString

func (*EncryptString) Encrypt

func (c *EncryptString) Encrypt(plainText string) (string, error)

func (*EncryptString) Options

func (c *EncryptString) Options(opts ...OptionsFunc)

Options configure the ReadSecretFromEnvVar

type MockEncryptString

type MockEncryptString struct {
	mock.Mock
}

func NewMockEncryptString

func NewMockEncryptString() *MockEncryptString

func (*MockEncryptString) Encrypt

func (e *MockEncryptString) Encrypt(plainText string) (string, error)

type OptionsFunc

type OptionsFunc func(*EncryptString)

OptionsFunc is a function used to configure EncryptString

func WithReader

func WithReader(reader PasswordReader) OptionsFunc

type PasswordReader

type PasswordReader interface {
	Read() (string, error)
}

Jump to

Keyboard shortcuts

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