Documentation ¶
Overview ¶
package commandservice implements the Command Service/API as defined in command.proto.
Index ¶
- Variables
- func CommandReferenceToEventID(commandReference string) (uint64, error)
- func EventIDToCommandReference(eventID uint64) string
- func New(setupContext context.Context, env string, log *zap.Logger, ...) (*commandService, error)
- func NewBasicReply(eventID uint64) *command.BasicReply
- type CommandHandler
- func (h *CommandHandler) BSNToegekend(ctx context.Context, eventData *events.BSNToegekend) (*command.BasicReply, error)
- func (h *CommandHandler) GeslachtsaanduidingGeregistreerd(ctx context.Context, eventData *events.GeslachtsaanduidingGeregistreerd) (*command.BasicReply, error)
- func (h *CommandHandler) NamenGeregistreerd(ctx context.Context, eventData *events.NamenGeregistreerd) (*command.BasicReply, error)
- func (h *CommandHandler) NamenVastgesteld(ctx context.Context, eventData *events.NamenVastgesteld) (*command.BasicReply, error)
- func (h *CommandHandler) PersoonIngeschreven(ctx context.Context, c *command.PersoonIngeschrevenCommand) (*command.PersoonIngeschrevenCommandReply, error)
- func (h *CommandHandler) WoonadresNLGeregistreerd(ctx context.Context, eventData *events.WoonadresNLGeregistreerd) (*command.BasicReply, error)
- type NewPersonHandler
- type PersonNoteHandler
- type StatusHandler
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidCommandReference = errors.New("invalid command reference")
Functions ¶
func New ¶
func New(setupContext context.Context, env string, log *zap.Logger, eventDB, journalDB *sqlx.DB) (*commandService, error)
New prepares a new commandService.
func NewBasicReply ¶
func NewBasicReply(eventID uint64) *command.BasicReply
Types ¶
type CommandHandler ¶
type CommandHandler struct {
// contains filtered or unexported fields
}
CommandHandler provides a CommandHandler.
func NewCommandHandler ¶
func NewCommandHandler(setupContext context.Context, env string, log *zap.Logger, stmtInsertEvent *sqlx.Stmt, journalDB *sqlx.DB) (*CommandHandler, error)
NewCommandHandler prepares a CommandHandler.
func (*CommandHandler) BSNToegekend ¶
func (h *CommandHandler) BSNToegekend(ctx context.Context, eventData *events.BSNToegekend) (*command.BasicReply, error)
func (*CommandHandler) GeslachtsaanduidingGeregistreerd ¶
func (h *CommandHandler) GeslachtsaanduidingGeregistreerd(ctx context.Context, eventData *events.GeslachtsaanduidingGeregistreerd) (*command.BasicReply, error)
func (*CommandHandler) NamenGeregistreerd ¶
func (h *CommandHandler) NamenGeregistreerd(ctx context.Context, eventData *events.NamenGeregistreerd) (*command.BasicReply, error)
func (*CommandHandler) NamenVastgesteld ¶
func (h *CommandHandler) NamenVastgesteld(ctx context.Context, eventData *events.NamenVastgesteld) (*command.BasicReply, error)
func (*CommandHandler) PersoonIngeschreven ¶
func (h *CommandHandler) PersoonIngeschreven(ctx context.Context, c *command.PersoonIngeschrevenCommand) (*command.PersoonIngeschrevenCommandReply, error)
func (*CommandHandler) WoonadresNLGeregistreerd ¶
func (h *CommandHandler) WoonadresNLGeregistreerd(ctx context.Context, eventData *events.WoonadresNLGeregistreerd) (*command.BasicReply, error)
type NewPersonHandler ¶
type NewPersonHandler struct {
// contains filtered or unexported fields
}
NewPersonHandler provides a NewPerson handler.
func NewNewPersonHandler ¶
func NewNewPersonHandler(setupContext context.Context, env string, log *zap.Logger, stmtInsertEvent *sqlx.Stmt, journalDB *sqlx.DB) (*NewPersonHandler, error)
NewNewPersonHandler prepares a NewPerson handler.
func (*NewPersonHandler) NewPerson ¶
func (h *NewPersonHandler) NewPerson(ctx context.Context, req *command.NewPersonRequest) (*command.NewPersonReply, error)
type PersonNoteHandler ¶
type PersonNoteHandler struct {
// contains filtered or unexported fields
}
PersonNoteHandler provides a PersonNote handler.
func NewPersonNoteHandler ¶
func NewPersonNoteHandler(setupContext context.Context, env string, log *zap.Logger, stmtInsertEvent *sqlx.Stmt) (*PersonNoteHandler, error)
NewPersonNoteHandler prepares a PersonNote handler.
func (*PersonNoteHandler) PersonNote ¶
func (h *PersonNoteHandler) PersonNote(ctx context.Context, req *command.PersonNoteRequest) (*command.BasicReply, error)
type StatusHandler ¶
type StatusHandler struct {
// contains filtered or unexported fields
}
StatusHandler provides a Status handler.
func NewStatusHandler ¶
func NewStatusHandler(setupContext context.Context, env string, log *zap.Logger, db *sqlx.DB) (*StatusHandler, error)
NewStatusHandler prepares a Status handler.
func (*StatusHandler) Status ¶
func (h *StatusHandler) Status(ctx context.Context, req *command.StatusRequest) (*command.StatusReply, error)
Click to show internal directories.
Click to hide internal directories.