models

package
v0.0.0-...-f6c5a1c Latest Latest
Warning

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

Go to latest
Published: May 30, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Blog

type Blog struct {
	// contains filtered or unexported fields
}

func NewBlog

func NewBlog(db *mongo.Mongo) (*Blog, error)

func (*Blog) Create

func (b *Blog) Create(obj *BlogVO) error

func (*Blog) Delete

func (b *Blog) Delete(id string) error

func (*Blog) Find

func (b *Blog) Find(start int, number int) ([]BlogVO, error)

func (*Blog) Update

func (b *Blog) Update(id string, obj *BlogVO) error

type BlogVO

type BlogVO struct {
	Id      bson.ObjectId `json:"id" bson:"_id"`
	Subject string        `json:"subject" bson:"subject"`
	Blog    string        `json:"blog" bson:"blog"`
	Author  string        `json:"author" bson:"author"`
	// contains filtered or unexported fields
}

type Token

type Token struct {
	// contains filtered or unexported fields
}

func NewToken

func NewToken(db *mongo.Mongo) (*Token, error)

func (*Token) ClearExpireTokens

func (t *Token) ClearExpireTokens() error

*

  • 清除过期令牌
  • @param {[type]} t *Token [description]
  • @return {[type]} [description]

func (*Token) Create

func (t *Token) Create(obj *TokenVO) error

func (*Token) Delete

func (t *Token) Delete(id string) error

func (*Token) Find

func (t *Token) Find(token string) (*TokenVO, error)

type TokenVO

type TokenVO struct {
	Id         bson.ObjectId `json:"id" bson:"_id"`
	Token      string        `json:"token" bson:"token"`
	ExpireTime int64         `bson:"expireTime"`
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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