model

package
v0.0.0-...-7e0de9a Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2020 License: Apache-2.0 Imports: 1 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 {
	BlogID primitive.ObjectID `json:"BlogID" bson:"BlogID"`

	AuthorID string `json:"AuthorID" bson:"AuthorID"`

	AuthorName string `json:"AuthorName" bson:"AuthorName"`

	CreateTime int64 `json:"CreateTime" bson:"CreateTime"`

	Title string `json:"Title" bson:"Title"`

	Abstract string `json:"Abstract" bson:"Abstract"`

	Content string `json:"Content" bson:"Content"`
}

Blog 博客

type BlogBody

type BlogBody struct {
	Title string `json:"Title"`

	Abstract string `json:"Abstract"`

	Content string `json:"Content"`
}

type Comment

type Comment struct {

	// The ID of the Blog
	BlogID primitive.ObjectID `json:"BlogID" bson:"BlogID"`

	// The ID of the owner
	OwnID string `json:"OwnID" bson:"OwnID"`

	// The name of the one who comments
	OwnName string `json:"ownName" bson:"ownName"`

	// The time of the comment
	CommentTime int64 `json:"commentTime" bson:"commentTime"`

	// The content of the comment
	Content string `json:"content" bson:"content"`
}

Comment 评论类型

type CommentBody

type CommentBody struct {

	// The ID of the Blog
	BlogID string `json:"BlogID"`

	// The content of the comment
	Content string `json:"content"`
}

type LoginBody

type LoginBody struct {
	ID string `json:"ID"`

	Password string `json:"Password"`
}

type RegistBody

type RegistBody struct {
	ID string `json:"ID"`

	Name string `json:"Name"`

	Password string `json:"Password"`
}

type Response

type Response struct {

	// true for success and false for failure
	State bool `json:"state"`

	// the return message of the interfaces
	Response interface{} `json:"response"`
}

type Tag

type Tag struct {

	// The ID of the Blog
	BlogID primitive.ObjectID `json:"BlogID" bson:"BlogID"`

	// all of the tags
	Content string `json:"content" bson:"content"`
}

type TagBody

type TagBody struct {
	ID string `json:"ID"`

	Content string `json:"Content"`
}

type UserInfo

type UserInfo struct {
	ID string `json:"ID" bson:"ID"`

	Name string `json:"Name" bson:"Name"`

	Password string `json:"Password" bson:"Password"`

	Bio string `json:"Bio" bson:"Bio"`

	Level float32 `json:"Level" bson:"Level"`
}

Jump to

Keyboard shortcuts

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