初始化项目框架,完成部分接口开发
This commit is contained in:
36
internal/service/category.go
Normal file
36
internal/service/category.go
Normal file
@ -0,0 +1,36 @@
|
||||
// ================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// You can delete these comments if you wish manually maintain this interface file.
|
||||
// ================================================================================
|
||||
|
||||
package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
"server/internal/model"
|
||||
)
|
||||
|
||||
type (
|
||||
ICategory interface {
|
||||
// List retrieves a paginated list of categories
|
||||
List(ctx context.Context, in *model.CategoryListIn) (out *model.CategoryListOut, err error)
|
||||
Create(ctx context.Context, in *model.CategoryAddIn) (out *model.CategoryCRUDOut, err error)
|
||||
Update(ctx context.Context, in *model.CategoryEditIn) (out *model.CategoryCRUDOut, err error)
|
||||
Delete(ctx context.Context, in *model.CategoryDelIn) (out *model.CategoryCRUDOut, err error)
|
||||
}
|
||||
)
|
||||
|
||||
var (
|
||||
localCategory ICategory
|
||||
)
|
||||
|
||||
func Category() ICategory {
|
||||
if localCategory == nil {
|
||||
panic("implement not found for interface ICategory, forgot register?")
|
||||
}
|
||||
return localCategory
|
||||
}
|
||||
|
||||
func RegisterCategory(i ICategory) {
|
||||
localCategory = i
|
||||
}
|
||||
Reference in New Issue
Block a user