Go-blog-server

command module
v0.0.0-...-3fa807c Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2019 License: MIT Imports: 2 Imported by: 0

README

go-blog-server Logo

Go-blog-server

Introduction

RESTful API service for astella.me blog, powered by Golang, required Mysql & Redis.

适用于 astella.me 的 RESTful API 服务;基于 nestjs | nodejs; 需安装 mongoDBRedis 方可完整运行;

项目-+-++++++++++++++++++++++++++++++++ astella.me 的 RESTful API 服务;基于 golang; 需安装 MysqlRedis 方可完整运行;

**项目结构参考golang-standards/project-layout; **

使用方法

数据库迁移

bee generate migration tags -driver=mysql -fields="name:string,description:string,icon:string,article_num:int"
bee generate migration category -driver=mysql -fields="name:string,description:string,article_num:int"
bee generate migration mapping-articles-tags -driver=mysql -fields="article_id:int,tag_id:int"
bee generate migration notifications -driver=mysql -fields="type:int,user_id:int,target_id:int,is_viewed:int,content:string,created_at:string"
bee generate migration comments -driver=mysql -fields="state:int,user_id:int,article_id:int,reply_comment_id:int,is_spam:int,content:string,created_at:string,likes_num:int"
bee generate migration articles -driver=mysql -fields="title:string,description:string,keywords:string,category_id:int,content:string,rendered_content:string,created_at:string,published_at:string,updated_at:string,type:int,reproduce_url:string,thumb:string,pvs_num:int,likes_num:int,comments_num:int"
bee generate migration users -driver=mysql -fields="name:string,email:string,password:string,avatar:string,url:string,role:enum,from:enum,created_at:date,update_at:date,mute:int"
bee migrate -driver=mysql -conn="root:@tcp(127.0.0.1:3306)/go-blog-server"

数据迁移失败报错
FATAL ▶ 0005 Column migration.timestamp type mismatch: TYPE: timestamp, DEFAULT: DEFAULT CURRENT_TIMESTAMP()
https://blog.csdn.net/weixin_43671322/article/details/89537182

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
database
@APIVersion 1.0.0 @Title beego Test API @Description beego has a very cool tools to autogenerate documents for your API @Contact astaxie@gmail.com @TermsOfServiceUrl http://beego.me/ @License Apache 2.0 @LicenseUrl http://www.apache.org/licenses/LICENSE-2.0.html
@APIVersion 1.0.0 @Title beego Test API @Description beego has a very cool tools to autogenerate documents for your API @Contact astaxie@gmail.com @TermsOfServiceUrl http://beego.me/ @License Apache 2.0 @LicenseUrl http://www.apache.org/licenses/LICENSE-2.0.html

Jump to

Keyboard shortcuts

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