command

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorMessages

func ErrorMessages(prefix string, err error) map[string][]string

func Process

func Process(cmd Command) error

func ToSnakeCase

func ToSnakeCase(str string) string

func Validate

func Validate(v Validatable, prefix string) error

Types

type Command

type Command interface {
	Validatable
}

type CreateToken

type CreateToken struct {
	UserID string
	Name   string
}

func (*CreateToken) Validate

func (c *CreateToken) Validate() error

type DeleteToken

type DeleteToken struct {
	UserID  string
	TokenID string
}

func (*DeleteToken) Validate

func (c *DeleteToken) Validate() error

type ResetToken

type ResetToken struct {
	UserID  string
	TokenID string
}

func (*ResetToken) Validate

func (c *ResetToken) Validate() error

type Validatable

type Validatable interface {
	Validate() error
}

Jump to

Keyboard shortcuts

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