rest

package
v0.0.0-...-2536de1 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CRUD

func CRUD(group *gin.RouterGroup, path string, resource interface{})

It defines

POST: /path
GET:  /path
PUT:  /path/:id
POST: /path/:id

Types

type CreateSupported

type CreateSupported interface {
	CreateHandler(*gin.Context)
}

All of the methods are the same type as HandlerFunc if you don't want to support any methods of CRUD, then don't implement it

type DeleteSupported

type DeleteSupported interface {
	DeleteHandler(*gin.Context)
}

type ListSupported

type ListSupported interface {
	ListHandler(*gin.Context)
}

type TakeSupported

type TakeSupported interface {
	TakeHandler(*gin.Context)
}

type UpdateSupported

type UpdateSupported interface {
	UpdateHandler(*gin.Context)
}

Jump to

Keyboard shortcuts

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