api

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: AGPL-3.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ArgQuery = 1
	ArgBody  = 2
)

Variables

This section is empty.

Functions

func AuthMiddleware

func AuthMiddleware(secret string) fiber.Handler

func ErrHandler

func ErrHandler(c *fiber.Ctx, err error) error

func StartApi

func StartApi() *errs.Error

func VerifyArg

func VerifyArg(c *fiber.Ctx, out interface{}, from int) error

Types

type AuthClaims

type AuthClaims struct {
	User string `json:"user"`
	jwt.RegisteredClaims
}

type BadField

type BadField struct {
	Field string
	Tag   string
	Value interface{}
}

type BadFields

type BadFields struct {
	Items []*BadField
}

func Validate

func Validate(data interface{}) *BadFields

func (*BadFields) Error

func (f *BadFields) Error() string

type FnAccCB

type FnAccCB = func(acc string) error

type FnAccDbCB

type FnAccDbCB = func(acc string, sess *orm.Queries) error

type GroupItem

type GroupItem struct {
	Key       string  `json:"key"`
	HoldHours float64 `json:"hold_hours"`
	TotalCost float64 `json:"total_cost"`
	ProfitSum float64 `json:"profit_sum"`
	ProfitPct float64 `json:"profit_pct"`
	CloseNum  int     `json:"close_num"`
}

Jump to

Keyboard shortcuts

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