(entityType dbCommon.DatabaseEntityType, op dbCommon.OperationType, payload interface{})
| 779 | } |
| 780 | |
| 781 | func (s *sqlDatabase) sendNotify(entityType dbCommon.DatabaseEntityType, op dbCommon.OperationType, payload interface{}) error { |
| 782 | if s.producer == nil { |
| 783 | // no producer was registered. Not sending notifications. |
| 784 | return nil |
| 785 | } |
| 786 | if payload == nil { |
| 787 | return errors.New("missing payload") |
| 788 | } |
| 789 | message := dbCommon.ChangePayload{ |
| 790 | Operation: op, |
| 791 | Payload: payload, |
| 792 | EntityType: entityType, |
| 793 | } |
| 794 | return s.producer.Notify(message) |
| 795 | } |
| 796 | |
| 797 | func (s *sqlDatabase) GetForgeEntity(_ context.Context, entityType params.ForgeEntityType, entityID string) (params.ForgeEntity, error) { |
| 798 | var ghEntity params.EntityGetter |
no test coverage detected