resources

package
v0.0.0-...-d49e886 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateSignedInvoiceRequestBody

type CreateSignedInvoiceRequestBody struct {
	AuthCode string      `json:"auth_code"`
	Key      string      `json:"key"`
	Nit      int         `json:"nit"`
	Number   int         `json:"number"`
	Date     time.Time   `json:"date"`
	Amount   json.Number `json:"amount"`
	Code     string      `json:"code"`
}

CreateSignedInvoiceRequestBody represents the body for the POST /signed_resoures request.

func (CreateSignedInvoiceRequestBody) Validate

Validate checks the request body for errors.

type SignedInvoicesResource

type SignedInvoicesResource struct{}

SignedInvoicesResource handles the request for the signed_invoices resource.

func (*SignedInvoicesResource) Create

func (h *SignedInvoicesResource) Create(c echo.Context) error

Create is the handler function for the POST signed_invoices route.

type ValidationError

type ValidationError struct {
	Field string `json:"field"`
	Msg   string `json:"message"`
}

ValidationError represents a validation error

type ValidationErrors

type ValidationErrors struct {
	Errors []ValidationError `json:"errors"`
}

ValidationErrors represents a collection of ValidationError

func (*ValidationErrors) Add

func (e *ValidationErrors) Add(field string, msg string)

Add adds an error with the given field and msg to the collection

func (*ValidationErrors) Any

func (e *ValidationErrors) Any() bool

Any checks if the collection contains any errors

Jump to

Keyboard shortcuts

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