controller

package
v0.0.0-...-46f0560 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewResponse

func NewResponse(w http.ResponseWriter, status int, msg any)

Types

type Handler

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

func NewHandler

func NewHandler(services *service.Services) *Handler

func (*Handler) CheckRequest

func (h *Handler) CheckRequest(w http.ResponseWriter, r *http.Request, data any) bool

func (*Handler) CreateBuy

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

func (*Handler) CreateSale

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

func (*Handler) CreateUser

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

func (*Handler) GetAccountInfo

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

func (*Handler) GetCompanies

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

type PriceSellInput

type PriceSellInput struct {
	CompanyId int `json:"company_id" validate:"required,gte=0"`
	Price     int `json:"price" validate:"required,gte=0"`
}

type Router

type Router struct {
	Router *mux.Router
}

func NewRouter

func NewRouter(h *Handler) *Router

type UserCreateInputData

type UserCreateInputData struct {
	Login  string `json:"login" validate:"required,min=1,max=255"`
	Wealth int    `json:"wealth" validate:"required,gte=0"`
}

Jump to

Keyboard shortcuts

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