gormcrud

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2019 License: MIT Imports: 9 Imported by: 1

README

gormcrud

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func All

func All(db *gorm.DB, elem interface{}) func(w http.ResponseWriter, r *http.Request)

All is

func Delete

func Delete(db *gorm.DB, new interface{}) func(w http.ResponseWriter, r *http.Request)

Delete is

func First

func First(db *gorm.DB, elem interface{}) func(w http.ResponseWriter, r *http.Request)

First is

func Link(db *gorm.DB, root interface{}, op string) func(w http.ResponseWriter, r *http.Request)

Link is

func Page

func Page(db *gorm.DB, elem interface{}) func(w http.ResponseWriter, r *http.Request)

Page is

func Save

func Save(db *gorm.DB, new interface{}) func(w http.ResponseWriter, r *http.Request)

Save is

Types

type ErrorCrud

type ErrorCrud struct {
	Message string `json:"message"`
	Code    int    `json:"code"`
	// contains filtered or unexported fields
}

type LinkStatusCrud

type LinkStatusCrud struct {
	Message     string `json:"message"`
	Status      string `json:"status"`
	Operation   string `json:"operation"`
	CountAfter  int    `json:"count_after"`
	CountBefore int    `json:"count_before"`
}

type ValidateDelete

type ValidateDelete interface {
	CrudValidateDelete(db *gorm.DB) error
}

ValidateDelete is

type ValidateSave

type ValidateSave interface {
	CrudValidateSave(db *gorm.DB) error
}

ValidateSave is

Jump to

Keyboard shortcuts

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