Documentation
¶
Index ¶
- func NewDinosaurGRPCHandler(svc DinosaurService, generic services.GenericService, ...) pb.DinosaurServiceServer
- func NewDinosaurHandler(dinosaur DinosaurService, generic services.GenericService) *dinosaurHandler
- func NewMockDinosaurDao() *dinosaurDaoMock
- func PresentDinosaur(dinosaur *Dinosaur) openapi.Dinosaur
- type Dinosaur
- type DinosaurDao
- type DinosaurIndex
- type DinosaurList
- type DinosaurPatchRequest
- type DinosaurService
- type ServiceLocator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDinosaurGRPCHandler ¶ added in v0.0.2
func NewDinosaurGRPCHandler(svc DinosaurService, generic services.GenericService, brokerFunc func() *pkgserver.EventBroker) pb.DinosaurServiceServer
func NewDinosaurHandler ¶
func NewDinosaurHandler(dinosaur DinosaurService, generic services.GenericService) *dinosaurHandler
func NewMockDinosaurDao ¶
func NewMockDinosaurDao() *dinosaurDaoMock
func PresentDinosaur ¶
Types ¶
type Dinosaur ¶
func ConvertDinosaur ¶
type DinosaurDao ¶
type DinosaurDao interface {
Get(ctx context.Context, id string) (*Dinosaur, error)
Create(ctx context.Context, dinosaur *Dinosaur) (*Dinosaur, error)
Replace(ctx context.Context, dinosaur *Dinosaur) (*Dinosaur, error)
Delete(ctx context.Context, id string) error
FindByIDs(ctx context.Context, ids []string) (DinosaurList, error)
All(ctx context.Context) (DinosaurList, error)
}
func NewDinosaurDao ¶
func NewDinosaurDao(sessionFactory *db.SessionFactory) DinosaurDao
type DinosaurIndex ¶
type DinosaurList ¶
type DinosaurList []*Dinosaur
func (DinosaurList) Index ¶
func (l DinosaurList) Index() DinosaurIndex
type DinosaurPatchRequest ¶
type DinosaurPatchRequest struct {
Species *string `json:"species,omitempty"`
}
type DinosaurService ¶
type DinosaurService interface {
Get(ctx context.Context, id string) (*Dinosaur, *errors.ServiceError)
Create(ctx context.Context, dinosaur *Dinosaur) (*Dinosaur, *errors.ServiceError)
Replace(ctx context.Context, dinosaur *Dinosaur) (*Dinosaur, *errors.ServiceError)
Delete(ctx context.Context, id string) *errors.ServiceError
All(ctx context.Context) (DinosaurList, *errors.ServiceError)
FindByIDs(ctx context.Context, ids []string) (DinosaurList, *errors.ServiceError)
OnUpsert(ctx context.Context, id string) error
OnDelete(ctx context.Context, id string) error
}
func NewDinosaurService ¶
func NewDinosaurService(lockFactory db.LockFactory, dinosaurDao DinosaurDao, events services.EventService) DinosaurService
func Service ¶
func Service(s *environments.Services) DinosaurService
type ServiceLocator ¶
type ServiceLocator func() DinosaurService
func NewServiceLocator ¶
func NewServiceLocator(env *environments.Env) ServiceLocator
Click to show internal directories.
Click to hide internal directories.