dazBlog

package
v0.0.0-...-49bf833 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2023 License: MIT Imports: 30 Imported by: 0

README

dazBlog 目录架构

  • dazBlog.go
    • Cobra 运行入口
    • 管理子命令
    • web 服务入口
  • helper.go
    • 使用 viper 读取配置文件

web 服务框架

中间件

  • 使用 gin 框架的中间件

跨域

  • 同源策略需同时满足以下三个条件
    • 协议相同
      • HTTP
      • HTTPS
    • 域名相同
    • 端口相同
  • 使用 Cors 中间件解决跨域问题

优雅关停

  • 将监听函数放在一个 goroutine 中,使用 channel 通知 goroutine 关停
  • 收到信号后 10s 内关闭服务(10s 内将未处理完的请求处理完毕)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDazBlogCommand

func NewDazBlogCommand() *cobra.Command

NewDazBlogCommand create the *cobra.Command object so can use the Execute method to start

Types

This section is empty.

Directories

Path Synopsis
biz
Package biz defines the business logic of the application business logic layer
Package biz defines the business logic of the application business logic layer
ai
Package ai is a generated GoMock package.
Package ai is a generated GoMock package.
post
Package post is a generated GoMock package.
Package post is a generated GoMock package.
user
Package user is a generated GoMock package.
Package user is a generated GoMock package.
controller
Package store defines the store layer of dazBlog
Package store defines the store layer of dazBlog

Jump to

Keyboard shortcuts

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