account

package
v0.0.0-...-308d6b8 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2021 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BalanceResponse

type BalanceResponse struct {
	Balance int `json:"balance"`
}

type CreateBodyRequest

type CreateBodyRequest struct {
	Name   string `json:"name" validate:"required"`
	CPF    string `json:"cpf" validate:"required"`
	Secret string `json:"secret" validate:"required"`
}

type Handler

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

func NewHandler

func NewHandler(r *mux.Router, usecase account.UseCase) *Handler

func (Handler) Create

func (h Handler) Create(w http.ResponseWriter, r *http.Request)

func (Handler) GetBalance

func (h Handler) GetBalance(w http.ResponseWriter, r *http.Request)

func (Handler) List

func (h Handler) List(w http.ResponseWriter, r *http.Request)

type ResponseBody

type ResponseBody struct {
	ID        string    `json:"id"`
	Name      string    `json:"name"`
	CPF       string    `json:"cpf"`
	Balance   int       `json:"balance"`
	CreatedAt time.Time `json:"created_at"`
}

type ValidationErrorResponse

type ValidationErrorResponse struct {
	Name   string `json:"name,omitempty"`
	CPF    string `json:"cpf,omitempty"`
	Secret string `json:"secret,omitempty"`
}

Jump to

Keyboard shortcuts

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