secexport

package
v0.0.0-...-4bcc6e1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCommand

func CreateCommand() *createCommand

func CreateFile

func CreateFile() (*os.File, error)

func Decrypt

func Decrypt(ciphertext []byte, password string) ([]byte, error)

func DeleteCommand

func DeleteCommand() *deleteCommand

func DeleteFile

func DeleteFile() error

func Encrypt

func Encrypt(data []byte, password string) ([]byte, error)

func GetSHA1

func GetSHA1(s *string) string

func IsByteJSON

func IsByteJSON(s []byte) bool

func IsJSON

func IsJSON(s *string) bool

func IsJSONArray

func IsJSONArray(s *string) bool

func ReadFile

func ReadFile() ([]byte, error)

func RetrieveCommand

func RetrieveCommand() *retrieveCommand

RetrieveCommand

Check if record exists for $(pwd) and returns encrypted string if password is valid. If no record exists returns error.

Usage:

command [OPTIONS]

Options:

-p <password> Password that was used for creating record. required.

Examples:

refresh -p 123456

func WriteFile

func WriteFile(f *os.File, d []byte) error

Writes file to the given destination.

Types

type AWSSecrets

type AWSSecrets struct {
	Data map[string]secretNormalized
}

func RetreiveSecrets

func RetreiveSecrets(args []*string, pm bool, sc bool) (*AWSSecrets, error)

func (*AWSSecrets) Parse

func (s *AWSSecrets) Parse(d []byte) (*string, error)

func (*AWSSecrets) Values

func (s *AWSSecrets) Values() *string

type Command

type Command interface {
	Execute() (*string, error)
	Parse(args []string) error
	Help() string
}

type CommandType

type CommandType string

1. Input a set of strings that identify names 2. flag for secrets manager 3. flag for parameter store 4. create command - create and exports vars for the current dir aka project and saves them locally encrypted 5. delete command - deletets secrets from current dir and unset them 6. apply check if secrets are created for the current dir and apply them if yes 7. refresh compares and writes secrets for the current dir 8. bind to tmux to set the keys for current dir 9. get secrets from the lambda function 10. get secrets from the ecs task def

const (
	CreateType   CommandType = "create"
	DeleteType   CommandType = "delete"
	RetrieveType CommandType = "retrieve"
	RefreshType  CommandType = "refresh"
)

Jump to

Keyboard shortcuts

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