Files
novel_server/internal/service/author.go
2025-07-16 15:16:40 +08:00

43 lines
1.4 KiB
Go

// ================================================================================
// 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
}