Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
gqcn committed Mar 4, 2022
1 parent 2d40e13 commit 0804446
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 35 deletions.
3 changes: 1 addition & 2 deletions internal/service/captcha.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,13 @@ import (
type sCaptcha struct{}

var (
insCaptcha = sCaptcha{}
captchaStore = base64Captcha.DefaultMemStore
captchaDriver = newDriver()
)

// Captcha 验证码管理服务
func Captcha() *sCaptcha {
return &insCaptcha
return &sCaptcha{}
}

func newDriver() *base64Captcha.DriverString {
Expand Down
4 changes: 1 addition & 3 deletions internal/service/category.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@ import (

type sCategory struct{}

var insCategory = sCategory{}

// Category 栏目管理服务
func Category() *sCategory {
return &insCategory
return &sCategory{}
}

const (
Expand Down
4 changes: 1 addition & 3 deletions internal/service/content.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,9 @@ import (

type sContent struct{}

var insContent = sContent{}

// Content 内容管理服务
func Content() *sContent {
return &insContent
return &sContent{}
}

// GetList 查询内容列表
Expand Down
4 changes: 1 addition & 3 deletions internal/service/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@ import (

type sContext struct{}

var insContext = sContext{}

// Context 上下文管理服务
func Context() *sContext {
return &insContext
return &sContext{}
}

// Init 初始化上下文对象指针到上下文对象中,以便后续的请求流程中可以修改。
Expand Down
4 changes: 1 addition & 3 deletions internal/service/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,9 @@ import (

type sFile struct{}

var insFile = sFile{}

// File 文件管理服务
func File() *sFile {
return &insFile
return &sFile{}
}

// 同一上传文件
Expand Down
4 changes: 1 addition & 3 deletions internal/service/interact.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@ type sInteract struct{}

const contextMapKeyForMyInteractList = "ContextMapKeyForMyInteractList"

var insInteract = sInteract{}

// 交互管理服务
func Interact() *sInteract {
return &insInteract
return &sInteract{}
}

// 赞
Expand Down
4 changes: 1 addition & 3 deletions internal/service/menu.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@ type sMenu struct{}

const settingTopMenusKey = "TopMenus"

var insMenu = sMenu{}

// 菜单管理服务
func Menu() *sMenu {
return &insMenu
return &sMenu{}
}

// 获取顶部菜单
Expand Down
4 changes: 1 addition & 3 deletions internal/service/reply.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@ import (

type sReply struct{}

var insReply = sReply{}

// Reply 评论/回复管理服务
func Reply() *sReply {
return &insReply
return &sReply{}
}

// Create 创建回复
Expand Down
4 changes: 1 addition & 3 deletions internal/service/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@ const (
sessionKeyNotice = "SessionKeyNotice" // 存放在Session中的提示信息,往往使用后则删除
)

var insSession = sSession{}

// Session管理服务
func Session() *sSession {
return &insSession
return &sSession{}
}

// 设置用户Session.
Expand Down
4 changes: 1 addition & 3 deletions internal/service/setting.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@ import (

type sSetting struct{}

var insSetting = sSetting{}

// 持久化Key-Value管理服务
func Setting() *sSetting {
return &insSetting
return &sSetting{}
}

// 设置KV。
Expand Down
4 changes: 1 addition & 3 deletions internal/service/tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ package service

type sTag struct{}

var insTag = sTag{}

// 标签管理服务
func Tag() *sTag {
return &insTag
return &sTag{}
}
4 changes: 1 addition & 3 deletions internal/service/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@ import (

type sView struct{}

var insView = sView{}

// 视图管理服务
func View() *sView {
return &insView
return &sView{}
}

// 前台系统-获取面包屑列表
Expand Down

0 comments on commit 0804446

Please sign in to comment.