helpers

package
v0.0.0-...-da93b2a Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrMissingField

func ErrMissingField(field string) *logical.Response

ErrMissingField returns a logical response error that prints a consistent error message for when a required field is missing.

func New

func New(text string) error

New returns an error that formats as the given text.

func NewUUID

func NewUUID() string

NewUUID returns a globally unique random generated guid

func UUIDExists

func UUIDExists(ctx context.Context, req *logical.Request, uuid string) bool

UUIDExists checks if uuid exists or not

func ValidateData

func ValidateData(ctx context.Context, req *logical.Request, uuid string, derivationPath string) error

ValidateData - validates data provided provided to create signature

func ValidateFields

func ValidateFields(req *logical.Request, data *framework.FieldData) error

ValidateFields verifies that no bad arguments were given to the request.

func ValidationErr

func ValidationErr(msg string) error

ValidationErr returns an error that corresponds to a validation error.

Types

type User

type User struct {
	Username   string `json:"username"`
	UUID       string `json:"uuid"`
	Mnemonic   string `json:"mnemonic"`
	Passphrase string `json:"passphrase"`
}

User -- stores data related to user

Jump to

Keyboard shortcuts

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