Documentation ¶
Overview ¶
Package mocks the service user.Service for testing purpose
Package mocks the service base user.ServiceBase for testing purpose
Index ¶
- type Service
- type ServiceBase
- func (s *ServiceBase) Create(ctx context.IDataMap, ety *user.UserEntity) (*user.UserEntity, error)
- func (s *ServiceBase) Delete(ctx context.IDataMap, id string) error
- func (s *ServiceBase) Query(q *tql.Query) (*tql.Result, error)
- func (s *ServiceBase) Read(ctx context.IDataMap, id string) (*user.UserEntity, error)
- func (s *ServiceBase) Update(ctx context.IDataMap, ety *user.UserEntity) (*user.UserEntity, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
*ServiceBase // DO NOT REMOVE this line. ServiceBase implements IServiceBase interface
}
type ServiceBase ¶
type ServiceBase struct { Create_ func(ctx context.IDataMap, ety *user.UserEntity) (*user.UserEntity, error) Read_ func(ctx context.IDataMap, id string) (*user.UserEntity, error) Update_ func(ctx context.IDataMap, ety *user.UserEntity) (*user.UserEntity, error) Delete_ func(ctx context.IDataMap, id string) error Query_ func(q *tql.Query) (*tql.Result, error) }
func (*ServiceBase) Create ¶
func (s *ServiceBase) Create(ctx context.IDataMap, ety *user.UserEntity) (*user.UserEntity, error)
Create given a new entity this one is populated with ID and creation timestamp and finally saved into the repository
func (*ServiceBase) Delete ¶
func (s *ServiceBase) Delete(ctx context.IDataMap, id string) error
Delete removes the entity given its id
func (*ServiceBase) Read ¶
func (s *ServiceBase) Read(ctx context.IDataMap, id string) (*user.UserEntity, error)
Read returns a pointer to UserEntity given its id
func (*ServiceBase) Update ¶
func (s *ServiceBase) Update(ctx context.IDataMap, ety *user.UserEntity) (*user.UserEntity, error)
Update returns a pointer to UserEntity after update it
Click to show internal directories.
Click to hide internal directories.