初始化项目框架,完成部分接口开发
This commit is contained in:
37
internal/service/read_record.go
Normal file
37
internal/service/read_record.go
Normal file
@ -0,0 +1,37 @@
|
||||
// ================================================================================
|
||||
// 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 (
|
||||
IReadRecord interface {
|
||||
// List retrieves a paginated list of read records
|
||||
List(ctx context.Context, in *model.ReadRecordListIn) (out *model.ReadRecordListOut, err error)
|
||||
// Create adds a new read record
|
||||
Create(ctx context.Context, in *model.ReadRecordAddIn) (out *model.ReadRecordCRUDOut, err error)
|
||||
// Delete removes a read record by id
|
||||
Delete(ctx context.Context, in *model.ReadRecordDelIn) (out *model.ReadRecordCRUDOut, err error)
|
||||
}
|
||||
)
|
||||
|
||||
var (
|
||||
localReadRecord IReadRecord
|
||||
)
|
||||
|
||||
func ReadRecord() IReadRecord {
|
||||
if localReadRecord == nil {
|
||||
panic("implement not found for interface IReadRecord, forgot register?")
|
||||
}
|
||||
return localReadRecord
|
||||
}
|
||||
|
||||
func RegisterReadRecord(i IReadRecord) {
|
||||
localReadRecord = i
|
||||
}
|
||||
Reference in New Issue
Block a user