controllers

package
v0.0.0-...-f0b400b Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResponseError

func ResponseError(c *gin.Context, s int, e string)

ResponseError ...

func ResponseJSON

func ResponseJSON(c *gin.Context, d interface{})

ResponseJSON ...

Types

type ArticleCTRL

type ArticleCTRL struct {
	Bucket *gocb.Bucket
}

ArticleCTRL : Articles Contoller

func (*ArticleCTRL) Create

func (ctrl *ArticleCTRL) Create(c *gin.Context)

Create : Create an Article

func (*ArticleCTRL) Delete

func (ctrl *ArticleCTRL) Delete(c *gin.Context)

Delete : Delete an Article

func (*ArticleCTRL) Read

func (ctrl *ArticleCTRL) Read(c *gin.Context)

Read : Get Articles

func (*ArticleCTRL) ReadOne

func (ctrl *ArticleCTRL) ReadOne(c *gin.Context)

ReadOne : Get Article by ID

func (*ArticleCTRL) Update

func (ctrl *ArticleCTRL) Update(c *gin.Context)

Update : Update an Article by ID

type Response

type Response struct {
	Success bool        `json:"success"`
	Error   string      `json:"error,omitempty"`
	Data    interface{} `json:"data,omitempty"`
}

Response : JSON Response Object

Jump to

Keyboard shortcuts

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