handler

package
v0.0.0-...-df6cefe Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ModelCreateHandler

func ModelCreateHandler(c echo.Context) error

ModelCreateHandler for request to create a model entity

func ModelDeleteHandler

func ModelDeleteHandler(c echo.Context) error

ModelDeleteHandler for request to delete a model entity

func ModelGetAllHandler

func ModelGetAllHandler(c echo.Context) error

ModelGetAllHandler for request to get all model entities

func ModelGetHandler

func ModelGetHandler(c echo.Context) error

ModelGetHandler for request to get an model entity by id

func ModelUpdateHandler

func ModelUpdateHandler(c echo.Context) error

ModelUpdateHandler for request to update a model entity

Types

type PayloadCfg

type PayloadCfg struct {
	ShowDetails  bool
	StrictFields bool
	Fields       []string
	ShowRefs     bool
	ShowBackRefs bool
	ShowChildren bool
}

PayloadCfg instructs how to build the payload

func (*PayloadCfg) BackRefFieldsToShow

func (cfg *PayloadCfg) BackRefFieldsToShow(modelInfo models.ModelInfo) (fields []string)

BackRefFieldsToShow returns all the backref fields to include in the payload

func (*PayloadCfg) ChildFieldsToShow

func (cfg *PayloadCfg) ChildFieldsToShow(modelInfo models.ModelInfo) (fields []string)

ChildFieldsToShow returns all the child fields to include in the payload

func (*PayloadCfg) RefFieldsToShow

func (cfg *PayloadCfg) RefFieldsToShow(modelInfo models.ModelInfo) (fields []string)

RefFieldsToShow returns all the ref fields to include in the payload

Jump to

Keyboard shortcuts

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