betterrest

package module
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2021 License: MIT Imports: 5 Imported by: 0

README

BetterREST

This experimental project aims to allow user to define only database schema to have the basic CRUD functionality provided by a REST interface.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegBatchDeleteHooks

func RegBatchDeleteHooks(typeString string,
	before func(bhpData models.BatchHookPointData) error,
	after func(bhpData models.BatchHookPointData) error)

RegBatchDeleteHooks adds hookpoints which are called before and after batch delete. Either one can be left as nil

func RegBatchInsertHooks

func RegBatchInsertHooks(typeString string,
	before func(bhpData models.BatchHookPointData) error,
	after func(bhpData models.BatchHookPointData) error)

RegBatchInsertHooks adds hookpoints which are called before and after batch update. Either one can be left as nil

func RegBatchPatchHooks

func RegBatchPatchHooks(typeString string,
	before func(bhpData models.BatchHookPointData) error,
	after func(bhpData models.BatchHookPointData) error)

RegBatchPatchHooks adds hookpoints which are called before and after batch update. Either one can be left as nil

func RegBatchReadHooks

func RegBatchReadHooks(typeString string,
	after func(bhpData models.BatchHookPointData) error)

RegBatchReadHooks adds hookpoints which are called after and read, can be left as nil

func RegBatchUpdateHooks

func RegBatchUpdateHooks(typeString string,
	before func(bhpData models.BatchHookPointData) error,
	after func(bhpData models.BatchHookPointData) error)

RegBatchUpdateHooks adds hookpoints which are called before and after batch update. Either one can be left as nil

func RegCustomCreate

func RegCustomCreate(typeString string, modelObj models.IModel, f func(db *gorm.DB) (*gorm.DB, error))

RegCustomCreate register custom create table funtion

func RegModel

func RegModel(typeString string, modelObj models.IModel)

RegModel adds a New function for an models.IModel

func RegModelWithOption

func RegModelWithOption(typeString string, modelObj models.IModel, options models.RegOptions)

RegModelWithOption adds a New function for an models.IModel

func RegUserModel

func RegUserModel(typeString string, modelObj models.IModel)

RegUserModel register the user model

Types

This section is empty.

Jump to

Keyboard shortcuts

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