Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrRoadmapNotFound = repository.ErrRoadmapNotFound
Functions ¶
This section is empty.
Types ¶
type AdminService ¶
type AdminService interface { Detail(ctx context.Context, id int64) (domain.Roadmap, error) Save(ctx context.Context, r domain.Roadmap) (int64, error) List(ctx context.Context, offset int, limit int) ([]domain.Roadmap, error) AddEdge(ctx context.Context, rid int64, edge domain.Edge) error DeleteEdge(ctx context.Context, id int64) error }
func NewAdminService ¶
func NewAdminService(repo repository.AdminRepository) AdminService
type BizService ¶
type BizService interface { // GetBizs bizs 和 ids 的长度必须一样 // 返回值是 biz-id-Biz 的结构 GetBizs(ctx context.Context, bizs []string, ids []int64) (map[string]map[int64]domain.Biz, error) }
BizService 作为一个聚合服务,下沉到这里以减轻 web 的逻辑负担
func NewConcurrentBizService ¶
func NewConcurrentBizService(queSvc baguwen.Service, queSetSvc baguwen.QuestionSetService) BizService
type ConcurrentBizService ¶
type ConcurrentBizService struct {
// contains filtered or unexported fields
}
ConcurrentBizService 强调并发
type Service ¶
type Service interface {
Detail(ctx context.Context, biz string, bizId int64) (domain.Roadmap, error)
}
func NewService ¶
func NewService(repo repository.Repository) Service
Click to show internal directories.
Click to hide internal directories.