controllers

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2019 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CodeDaoURLS = []string{"https://toidicodedao.com", "https://codeaholicguy.com/"}

CodeDaoURLS ...

View Source
var FPTURLs = []string{"https://daihoc.fpt.edu.vn"}

FPTURLs ...

View Source
var MediumURLs = []string{"https://codeburst.io",
	"https://medium.freecodecamp.org",
	"https://hackernoon.com",
	"https://medium.com/javascript-scene",
	"https://medium.com/dev-channel"}

MediumURLs ...

Functions

func ApproveConfessionHandler

func ApproveConfessionHandler(w http.ResponseWriter, r *http.Request)

ApproveConfessionHandler ...

func CreateConfessionHandler

func CreateConfessionHandler(w http.ResponseWriter, r *http.Request)

CreateConfessionHandler ...

func CreateUserHandler

func CreateUserHandler(w http.ResponseWriter, r *http.Request)

CreateUserHandler ...

func DeleteUserHandler

func DeleteUserHandler(w http.ResponseWriter, r *http.Request)

DeleteUserHandler ...

func GetAPIInfo

func GetAPIInfo(w http.ResponseWriter, r *http.Request)

GetAPIInfo ...

func GetAllConfessionsHandler

func GetAllConfessionsHandler(w http.ResponseWriter, r *http.Request)

GetAllConfessionsHandler ...

func GetAllUsersHandler

func GetAllUsersHandler(w http.ResponseWriter, r *http.Request)

GetAllUsersHandler ...

func GetApprovedConfessionsHandler

func GetApprovedConfessionsHandler(w http.ResponseWriter, r *http.Request)

GetApprovedConfessionsHandler ...

func GetConfessionsBySenderHandler

func GetConfessionsBySenderHandler(w http.ResponseWriter, r *http.Request)

GetConfessionsBySenderHandler ...

func GetConfessionsOverviewHandler

func GetConfessionsOverviewHandler(w http.ResponseWriter, r *http.Request)

GetConfessionsOverviewHandler ...

func GetHomeFeedHandler

func GetHomeFeedHandler(w http.ResponseWriter, r *http.Request)

GetHomeFeedHandler ...

func GetNextConfessionNextIDHandler

func GetNextConfessionNextIDHandler(w http.ResponseWriter, r *http.Request)

GetNextConfessionNextIDHandler ...

func GetPostFeedHandler

func GetPostFeedHandler(w http.ResponseWriter, r *http.Request)

GetPostFeedHandler ...

func GetUserByIDHandler

func GetUserByIDHandler(w http.ResponseWriter, r *http.Request)

GetUserByIDHandler ...

func LoginHandler

func LoginHandler(w http.ResponseWriter, r *http.Request)

LoginHandler ...

func LoginHandlerWithoutPassword

func LoginHandlerWithoutPassword(w http.ResponseWriter, r *http.Request)

LoginHandlerWithoutPassword ...

func RejectConfessionHandler

func RejectConfessionHandler(w http.ResponseWriter, r *http.Request)

RejectConfessionHandler ...

func RollbackApproveConfessionHandler

func RollbackApproveConfessionHandler(w http.ResponseWriter, r *http.Request)

RollbackApproveConfessionHandler ...

func SearchConfessionsHandler

func SearchConfessionsHandler(w http.ResponseWriter, r *http.Request)

SearchConfessionsHandler ...

func UpdateUserHandler

func UpdateUserHandler(w http.ResponseWriter, r *http.Request)

UpdateUserHandler ...

Types

type APIInfo

type APIInfo struct {
	Name    string `json:"name"`
	Version string `json:"version"`
}

APIInfo ...

type AuthParams

type AuthParams struct {
	Email    string `json:"email" gorm:"not null; type:varchar(250); unique_index"`
	Password string `json:"password" gorm:"not null; type:varchar(250)"`
}

AuthParams ...

type AuthResponse

type AuthResponse struct {
	JWT       string `json:"token"`
	ExpiresAt int64  `json:"expire_at"`
	ID        int    `json:"id"`
	Nickname  string `json:"nickname"`
}

AuthResponse ...

type Feed

type Feed struct {
	Title       string `json:"title"`
	Link        string `json:"link"`
	Author      string `json:"author"`
	Description string `json:"description"`
	Image       string `json:"image"`
}

Feed ...

type FeedReponse

type FeedReponse struct {
	Status string `json:"status"`
	Feed   Feed   `json:"feed"`
	Items  []Item `json:"items"`
}

FeedReponse ...

type Item

type Item struct {
	Title       string   `json:"title"`
	PubDate     string   `json:"pubDate"`
	Link        string   `json:"link"`
	GUID        string   `json:"guid"`
	Author      string   `json:"author"`
	Thumbnail   string   `json:"thumbnail"`
	Description string   `json:"description"`
	Content     string   `json:"content"`
	Categories  []string `json:"categories"`
}

Item ...

type MiniFeedReponse

type MiniFeedReponse struct {
	Items []MiniItem `json:"items"`
}

MiniFeedReponse ...

type MiniItem

type MiniItem struct {
	Title       string `json:"title"`
	PubDate     string `json:"pubDate"`
	GUID        string `json:"guid"`
	Thumbnail   string `json:"thumbnail"`
	Description string `json:"description"`
}

MiniItem ...

type NextConfession

type NextConfession struct {
	ID int `json:"id"`
}

NextConfession ...

type Overview

type Overview struct {
	TotalConfess    int `json:"total"`
	PendingConfess  int `json:"pending"`
	RejectedConfess int `json:"rejected"`
}

Overview ...

type RejectConfessionRequest

type RejectConfessionRequest struct {
	ID     int    `json: "id"`
	Reason string `json: "reason"`
}

RejectConfessionRequest ...

Jump to

Keyboard shortcuts

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