29 lines
753 B
Go
29 lines
753 B
Go
package service
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/tiger1103/gfast/v3/internal/app/businesses/model"
|
|
)
|
|
|
|
type IGeography interface {
|
|
List(ctx context.Context, req *model.GeographySearchReq) (res *model.GeographySearchRes, err error)
|
|
GetById(ctx context.Context, Id int) (res *model.GeographyInfoRes, err error)
|
|
Add(ctx context.Context, req *model.GeographyAddReq) (err error)
|
|
Edit(ctx context.Context, req *model.GeographyEditReq) (err error)
|
|
Delete(ctx context.Context, Id []int) (err error)
|
|
}
|
|
|
|
var localGeography IGeography
|
|
|
|
func Geography() IGeography {
|
|
if localGeography == nil {
|
|
panic("implement not found for interface IGeography, forgot register?")
|
|
}
|
|
return localGeography
|
|
}
|
|
|
|
func RegisterGeography(i IGeography) {
|
|
localGeography = i
|
|
}
|