Files
APIPark/stores/api/api.go
T
2024-08-30 09:55:56 +08:00

38 lines
720 B
Go

package api
import (
"reflect"
"github.com/eolinker/go-common/autowire"
"github.com/eolinker/go-common/store"
)
type IApiBaseStore interface {
store.ISearchStore[Api]
}
type IAPIInfoStore store.IBaseStore[Info]
type imlApiBaseStore struct {
store.SearchStoreSoftDelete[Api]
}
type imlAPIDocStore struct {
store.Store[Doc]
}
type IAPIDocStore interface {
store.IBaseStore[Doc]
}
func init() {
autowire.Auto[IApiBaseStore](func() reflect.Value {
return reflect.ValueOf(new(imlApiBaseStore))
})
autowire.Auto[IAPIInfoStore](func() reflect.Value {
return reflect.ValueOf(new(store.Store[Info]))
})
autowire.Auto[IAPIDocStore](func() reflect.Value {
return reflect.ValueOf(new(imlAPIDocStore))
})
}