routers

package
v0.0.0-...-4ae7f04 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2019 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdminRequired

func AdminRequired() gin.HandlerFunc

AdminRequired funcion check user login or not

func Init

func Init() error

Init function initialize and return gin engine @title gocomic api @version 1.0 @description This is a comic server. termsOfService https://github.com/fancxxy/gocomic/backend @licenese.name MIT @licenese.url https://github.com/fancxxy/gocomic/blob/master/LICENSE @host 127.0.0.1:8080

Types

type Login

type Login struct {
	Email    string `json:"email" binding:"required"`
	Password string `json:"password" binding:"required"`
}

Login contains login information

type Register

type Register struct {
	Username string `json:"username" binding:"required"`
	Email    string `json:"email" binding:"required"`
	Password string `json:"password" binding:"required"`
}

Register contains register information

type Response

type Response struct {
	Code int         `json:"code"`
	Msg  string      `json:"msg"`
	Data interface{} `json:"data"`
}

Response struct

type Subscribe

type Subscribe struct {
	Website string `json:"website" binding:"required"`
	Comic   string `json:"comic" binding:"required"`
}

Subscribe contains login information

type Unsubscribe

type Unsubscribe struct {
	ID int `json:"id" binding:"required"`
}

Unsubscribe contains login information

Jump to

Keyboard shortcuts

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