mirror of
https://github.com/APIParkLab/APIPark.git
synced 2026-06-14 20:41:15 +08:00
32 lines
925 B
Go
32 lines
925 B
Go
package dynamic_module
|
|
|
|
import (
|
|
"context"
|
|
"reflect"
|
|
|
|
"github.com/APIParkLab/APIPark/service/universally"
|
|
"github.com/eolinker/go-common/autowire"
|
|
)
|
|
|
|
type IDynamicModuleService interface {
|
|
universally.IServiceGet[DynamicModule]
|
|
universally.IServiceDelete
|
|
universally.IServiceCreate[CreateDynamicModule]
|
|
universally.IServiceEdit[EditDynamicModule]
|
|
ListByPartition(ctx context.Context, partitionId string) ([]*DynamicModule, error)
|
|
}
|
|
|
|
type IDynamicModulePublishService interface {
|
|
universally.IServiceCreate[CreateDynamicModulePublish]
|
|
Latest(ctx context.Context, dmID string, partitionIds []string) (map[string]*DynamicModulePublish, error)
|
|
}
|
|
|
|
func init() {
|
|
autowire.Auto[IDynamicModuleService](func() reflect.Value {
|
|
return reflect.ValueOf(new(imlDynamicModuleService))
|
|
})
|
|
autowire.Auto[IDynamicModulePublishService](func() reflect.Value {
|
|
return reflect.ValueOf(new(imlDynamicModulePublishService))
|
|
})
|
|
}
|