Documentation ¶
Index ¶
- Variables
- func GinContext(c *gin.Context) *types.ServiceContext
- func Init() error
- func Register[S types.Service[M], M types.Model](s ...S)
- type Base
- func (Base[M]) CreateAfter(*types.ServiceContext, ...M) error
- func (Base[M]) CreateBefore(*types.ServiceContext, ...M) error
- func (Base[M]) DeleteAfter(*types.ServiceContext, ...M) error
- func (Base[M]) DeleteBefore(*types.ServiceContext, ...M) error
- func (Base[M]) Export(*types.ServiceContext, ...M) ([]byte, error)
- func (Base[M]) Filter(_ *types.ServiceContext, m M) M
- func (Base[M]) FilterRaw(_ *types.ServiceContext) string
- func (Base[M]) GetAfter(*types.ServiceContext, ...M) error
- func (Base[M]) GetBefore(*types.ServiceContext, ...M) error
- func (Base[M]) Import(*types.ServiceContext, io.Reader) ([]M, error)
- func (Base[M]) ListAfter(*types.ServiceContext, *[]M) error
- func (Base[M]) ListBefore(*types.ServiceContext, *[]M) error
- func (Base[M]) UpdateAfter(*types.ServiceContext, ...M) error
- func (Base[M]) UpdateBefore(*types.ServiceContext, ...M) error
- func (Base[M]) UpdatePartialAfter(*types.ServiceContext, ...M) error
- func (Base[M]) UpdatePartialBefore(*types.ServiceContext, ...M) error
- type Factory
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFoundService = errors.New("no service instant matches the give Model interface, skip processing service layer") ErrNotFoundServiceId = errors.New("not found service id in assetIdMap") )
Functions ¶
func GinContext ¶
func GinContext(c *gin.Context) *types.ServiceContext
GinContext build *types.ServiceContext from *gin.Context.
Types ¶
type Base ¶
func (Base[M]) CreateAfter ¶
func (Base[M]) CreateAfter(*types.ServiceContext, ...M) error
func (Base[M]) CreateBefore ¶
func (Base[M]) CreateBefore(*types.ServiceContext, ...M) error
func (Base[M]) DeleteAfter ¶
func (Base[M]) DeleteAfter(*types.ServiceContext, ...M) error
func (Base[M]) DeleteBefore ¶
func (Base[M]) DeleteBefore(*types.ServiceContext, ...M) error
func (Base[M]) Filter ¶
func (Base[M]) Filter(_ *types.ServiceContext, m M) M
func (Base[M]) ListBefore ¶
func (Base[M]) ListBefore(*types.ServiceContext, *[]M) error
func (Base[M]) UpdateAfter ¶
func (Base[M]) UpdateAfter(*types.ServiceContext, ...M) error
func (Base[M]) UpdateBefore ¶
func (Base[M]) UpdateBefore(*types.ServiceContext, ...M) error
func (Base[M]) UpdatePartialAfter ¶
func (Base[M]) UpdatePartialAfter(*types.ServiceContext, ...M) error
func (Base[M]) UpdatePartialBefore ¶
func (Base[M]) UpdatePartialBefore(*types.ServiceContext, ...M) error
Click to show internal directories.
Click to hide internal directories.