drilldown

package
v0.0.0-...-fd29b5c Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *gorm.DB

Functions

func GetItem

func GetItem[M any](c *gin.Context, config *ApiConfig, method string) (error, *M, uint64, *string)

func IsTestRun

func IsTestRun() bool

func RegisterModel

func RegisterModel[M any](r *gin.Engine, m M, resource string, config *ApiConfig)

func SetupRouter

func SetupRouter() *gin.Engine

Types

type ApiConfig

type ApiConfig struct {
	LookupField string
	ScopesFind  []func(db *gorm.DB) *gorm.DB
}

type Condition

type Condition struct {
	Fields []string
	Where  string
	Joins  []string
	Values []string
}

type OrderBy

type OrderBy struct {
	Field    string
	Modifier string
}

type Select

type Select struct {
	Fields []string
	Joins  []string
}

Jump to

Keyboard shortcuts

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