controllers

package
v0.0.0-...-875ef9a Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2019 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SESSION_KEY          = "UserID"       // session key
	CONTEXT_USER_KEY     = "User"         // context user key
	SESSION_GITHUB_STATE = "GITHUB_STATE" // github state session key
	SESSION_CAPTCHA      = "GIN_CAPTCHA"  // captcha session key
)

Variables

This section is empty.

Functions

func ActiveSubscriber

func ActiveSubscriber(c *gin.Context)

func AdminIndex

func AdminIndex(c *gin.Context)

func ArchiveGet

func ArchiveGet(c *gin.Context)

func AuthGet

func AuthGet(c *gin.Context)

func Backup

func Backup() (err error)

func BackupPost

func BackupPost(c *gin.Context)

func BindEmail

func BindEmail(c *gin.Context)

func CaptchaGet

func CaptchaGet(context *gin.Context)

func CommentDelete

func CommentDelete(c *gin.Context)

func CommentPost

func CommentPost(c *gin.Context)

func CommentRead

func CommentRead(c *gin.Context)

func CommentReadAll

func CommentReadAll(c *gin.Context)

func CreateXMLSitemap

func CreateXMLSitemap()

func GetUnSubcribeUrl

func GetUnSubcribeUrl(subscriber *models.Subscriber) (string, error)

func Handle404

func Handle404(c *gin.Context)

func HandleMessage

func HandleMessage(c *gin.Context, message string)

func IndexGet

func IndexGet(c *gin.Context)

func LinkCreate

func LinkCreate(c *gin.Context)

func LinkDelete

func LinkDelete(c *gin.Context)

func LinkGet

func LinkGet(c *gin.Context)

func LinkIndex

func LinkIndex(c *gin.Context)

func LinkUpdate

func LinkUpdate(c *gin.Context)

func LogoutGet

func LogoutGet(c *gin.Context)

func NotifyEmail

func NotifyEmail(subject, body string) error

func Oauth2Callback

func Oauth2Callback(c *gin.Context)

func PageCreate

func PageCreate(c *gin.Context)

func PageDelete

func PageDelete(c *gin.Context)

func PageEdit

func PageEdit(c *gin.Context)

func PageGet

func PageGet(c *gin.Context)

func PageIndex

func PageIndex(c *gin.Context)

func PageNew

func PageNew(c *gin.Context)

func PagePublish

func PagePublish(c *gin.Context)

func PageUpdate

func PageUpdate(c *gin.Context)

func PostCreate

func PostCreate(c *gin.Context)

func PostDelete

func PostDelete(c *gin.Context)

func PostEdit

func PostEdit(c *gin.Context)

func PostGet

func PostGet(c *gin.Context)

func PostIndex

func PostIndex(c *gin.Context)

func PostNew

func PostNew(c *gin.Context)

func PostPublish

func PostPublish(c *gin.Context)

func PostUpdate

func PostUpdate(c *gin.Context)

func ProfileGet

func ProfileGet(c *gin.Context)

func ProfileUpdate

func ProfileUpdate(c *gin.Context)

func RestorePost

func RestorePost(c *gin.Context)

func RssGet

func RssGet(c *gin.Context)

func SendBatchMail

func SendBatchMail(c *gin.Context)

func SendMail

func SendMail(c *gin.Context)

func SigninGet

func SigninGet(c *gin.Context)

func SigninPost

func SigninPost(c *gin.Context)

func SignupGet

func SignupGet(c *gin.Context)

func SignupPost

func SignupPost(c *gin.Context)

func Subscribe

func Subscribe(c *gin.Context)

func SubscribeGet

func SubscribeGet(c *gin.Context)

func SubscriberIndex

func SubscriberIndex(c *gin.Context)

func SubscriberPost

func SubscriberPost(c *gin.Context)

邮箱为空时,发送给所有订阅者

func TagCreate

func TagCreate(c *gin.Context)

func TagGet

func TagGet(c *gin.Context)

func UnSubscribe

func UnSubscribe(c *gin.Context)

func UnbindEmail

func UnbindEmail(c *gin.Context)

func UnbindGithub

func UnbindGithub(c *gin.Context)

func Upload

func Upload(c *gin.Context)

func UserIndex

func UserIndex(c *gin.Context)

func UserLock

func UserLock(c *gin.Context)

Types

type GithubUserInfo

type GithubUserInfo struct {
	AvatarURL         string      `json:"avatar_url"`
	Bio               interface{} `json:"bio"`
	Blog              string      `json:"blog"`
	Company           interface{} `json:"company"`
	CreatedAt         string      `json:"created_at"`
	Email             interface{} `json:"email"`
	EventsURL         string      `json:"events_url"`
	Followers         int         `json:"followers"`
	FollowersURL      string      `json:"followers_url"`
	Following         int         `json:"following"`
	FollowingURL      string      `json:"following_url"`
	GistsURL          string      `json:"gists_url"`
	GravatarID        string      `json:"gravatar_id"`
	Hireable          interface{} `json:"hireable"`
	HTMLURL           string      `json:"html_url"`
	ID                int         `json:"id"`
	Location          interface{} `json:"location"`
	Login             string      `json:"login"`
	Name              interface{} `json:"name"`
	OrganizationsURL  string      `json:"organizations_url"`
	PublicGists       int         `json:"public_gists"`
	PublicRepos       int         `json:"public_repos"`
	ReceivedEventsURL string      `json:"received_events_url"`
	ReposURL          string      `json:"repos_url"`
	SiteAdmin         bool        `json:"site_admin"`
	StarredURL        string      `json:"starred_url"`
	SubscriptionsURL  string      `json:"subscriptions_url"`
	Type              string      `json:"type"`
	UpdatedAt         string      `json:"updated_at"`
	URL               string      `json:"url"`
}

type PutRet

type PutRet struct {
	Hash string `json:"hash"`
	Key  string `json:"key"`
}

构造返回值字段

type QiniuUploader

type QiniuUploader struct {
}

type Size

type Size interface {
	Size() int64
}

获取文件大小的接口

type SmmsRet

type SmmsRet struct {
	Code string `json:"code"`
	Data struct {
		FileName  string `json:"filename"`
		StoreName string `json:"storename"`
		Size      int    `json:"size"`
		Width     int    `json:"width"`
		Height    int    `json:"height"`
		Hash      string `json:"hash"`
		Delete    string `json:"delete"`
		Url       string `json:"url"`
		Path      string `json:"path"`
		Msg       string `json:"msg"`
	} `json:"data"`
}

type SmmsUploader

type SmmsUploader struct {
}

type Stat

type Stat interface {
	Stat() (os.FileInfo, error)
}

获取文件信息的接口

type Uploader

type Uploader interface {
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

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