完善功能
This commit is contained in:
42
internal/service/author.go
Normal file
42
internal/service/author.go
Normal file
@ -0,0 +1,42 @@
|
||||
// ================================================================================
|
||||
// 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 (
|
||||
IAuthor interface {
|
||||
// List retrieves a paginated list of authors
|
||||
List(ctx context.Context, in *model.AuthorListIn) (out *model.AuthorListOut, err error)
|
||||
// Create adds a new author
|
||||
Create(ctx context.Context, in *model.AuthorAddIn) (out *model.AuthorCRUDOut, err error)
|
||||
// Update edits an author
|
||||
Update(ctx context.Context, in *model.AuthorEditIn) (out *model.AuthorCRUDOut, err error)
|
||||
// Delete removes an author by id
|
||||
Delete(ctx context.Context, in *model.AuthorDelIn) (out *model.AuthorCRUDOut, err error)
|
||||
// Apply 允许用户申请成为作者
|
||||
Apply(ctx context.Context, in *model.AuthorApplyIn) (out *model.AuthorApplyOut, err error)
|
||||
Detail(ctx context.Context, in *model.AuthorDetailIn) (out *model.AuthorDetailOut, err error)
|
||||
}
|
||||
)
|
||||
|
||||
var (
|
||||
localAuthor IAuthor
|
||||
)
|
||||
|
||||
func Author() IAuthor {
|
||||
if localAuthor == nil {
|
||||
panic("implement not found for interface IAuthor, forgot register?")
|
||||
}
|
||||
return localAuthor
|
||||
}
|
||||
|
||||
func RegisterAuthor(i IAuthor) {
|
||||
localAuthor = i
|
||||
}
|
||||
Reference in New Issue
Block a user