➕ add swagger
This commit is contained in:
12
service/auth_service/auth_service.go
Normal file
12
service/auth_service/auth_service.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package auth_service
|
||||
|
||||
import (
|
||||
"schisandra-cloud-album/global"
|
||||
"schisandra-cloud-album/model"
|
||||
)
|
||||
|
||||
func (AuthService) GetUserList() []*model.ScaAuthUser {
|
||||
data := make([]*model.ScaAuthUser, 0)
|
||||
global.DB.Find(&data)
|
||||
return data
|
||||
}
|
3
service/auth_service/enter.go
Normal file
3
service/auth_service/enter.go
Normal file
@@ -0,0 +1,3 @@
|
||||
package auth_service
|
||||
|
||||
type AuthService struct{}
|
13
service/service.go
Normal file
13
service/service.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"schisandra-cloud-album/service/auth_service"
|
||||
)
|
||||
|
||||
// Services 统一导出的service
|
||||
type Services struct {
|
||||
AuthService auth_service.AuthService
|
||||
}
|
||||
|
||||
// Service new函数实例化,实例化完成后会返回结构体地指针类型
|
||||
var Service = new(Services)
|
Reference in New Issue
Block a user