app

package
v0.0.0-...-27704b5 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEmptySecretName = errors.New("secret name can not be empty")

Functions

This section is empty.

Types

type CreateHandler

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

func NewCreateHandler

func NewCreateHandler(cr CreateRepository) CreateHandler

func (CreateHandler) Handle

func (h CreateHandler) Handle(ctx context.Context, name, description, value string) error

type CreateRepository

type CreateRepository interface {
	Create(ctx context.Context, name, description, value string) error
}

type EmptyCreateArgErr

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

func NewEmptyCreateArgErr

func NewEmptyCreateArgErr(argName string) EmptyCreateArgErr

func (EmptyCreateArgErr) Error

func (e EmptyCreateArgErr) Error() string

type ListHandler

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

func NewListHandler

func NewListHandler(lr ListRepository) ListHandler

func (ListHandler) Handle

func (h ListHandler) Handle(ctx context.Context) ([]Secret, error)

type ListRepository

type ListRepository interface {
	List(ctx context.Context) ([]domain.Secret, error)
}

type ReadHandler

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

func NewReadHandler

func NewReadHandler(rr ReadRepository) ReadHandler

func (ReadHandler) Handle

func (h ReadHandler) Handle(ctx context.Context, name string) (Secret, error)

type ReadRepository

type ReadRepository interface {
	Read(ctx context.Context, name string) (domain.Secret, error)
}

type Secret

type Secret struct {
	Name      string    `json:"name"`
	Value     *string   `json:"value,omitempty"`
	CreatedAt time.Time `json:"created_at"`
}

Jump to

Keyboard shortcuts

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