Documentation ¶
Index ¶
- Constants
- Variables
- func NewEventMiddleware(evCh chan<- cqs.Event) cqs.CommandHandlerMiddleware
- type ActivateDeactivateServer
- type ActivateDeactivateServerCmd
- type AllPrograms
- type CommandBus
- type CreatePrograms
- type CreateProgramsCmd
- type CreateStatus
- type CreateStatusCmd
- type CreateZone
- type CreateZoneCmd
- type CreateZoneError
- type ExecutePins
- type ExecutePinsCmd
- type ExecuteZone
- type ExecuteZoneCmd
- type ExecuteZoneError
- type ExecuteZoneWithStatus
- type ExecuteZoneWithStatusCmd
- type ExecuteZoneWithStatusError
- type ExecutionLogRepository
- type FindAllPrograms
- type FindAllProgramsQuery
- type FindExecutionLogs
- type FindExecutionLogsQuery
- type FindProgramsInTime
- type FindProgramsInTimeQuery
- type FindStatus
- type FindStatusQuery
- type FindWeather
- type FindWeatherQuery
- type MessagePublisher
- type PinExecutor
- type ProgramRepository
- type ProgramsInTime
- type PublishMessage
- type PublishMessageCmd
- type QueryBus
- type RainRepository
- type RemoveZone
- type RemoveZoneCmd
- type SaveExecutionLog
- type SaveExecutionLogCmd
- type SaveExecutionLogError
- type StatusRepository
- type TemperatureProgramRepository
- type TemperatureRepository
- type UnSubscribedCommandError
- type UnSubscribedQueryError
- type UpdateStatus
- type UpdateStatusCmd
- type WeeklyProgramRepository
- type ZoneRepository
Constants ¶
View Source
const ActivateDeactivateServerCmdName = "activateDeactivateServer"
View Source
const CreateProgramsCmdName = "createPrograms"
View Source
const CreateStatusCmdName = "createStatus"
View Source
const CreateZoneCmdName = "createZone"
View Source
const ExecutePinsCmdName = "executePins"
View Source
const ExecuteZoneCmdName = "executeZone"
View Source
const ExecuteZoneWithStatusCmdName = "executeZoneWithStatus"
View Source
const FindAllProgramsQueryName = "findAllPrograms"
View Source
const FindExecutionLogsQueryName = "findExecutionLogs"
View Source
const FindProgramsInTimeQueryName = "findProgramsInTime"
View Source
const FindStatusQueryName = "findStatus"
View Source
const FindWeatherQueryName = "findWeather"
View Source
const PublishMessageCmdName = "publishMessage"
View Source
const RemoveZoneCmdName = "removeZone"
View Source
const SaveExecutionLogCmdName = "saveExecutionLog"
View Source
const UpdateStatusCmdName = "updateStatus"
Variables ¶
View Source
var ErrInvalidExecutionsLogLimit = errors.New("invalid executions log limit")
View Source
var ErrStatusAlreadyExist = errors.New("status already exist")
Functions ¶
func NewEventMiddleware ¶
func NewEventMiddleware(evCh chan<- cqs.Event) cqs.CommandHandlerMiddleware
Types ¶
type ActivateDeactivateServer ¶
type ActivateDeactivateServer struct {
// contains filtered or unexported fields
}
func NewActivateDeactivateServer ¶
func NewActivateDeactivateServer(stRepo StatusRepository) *ActivateDeactivateServer
type ActivateDeactivateServerCmd ¶
type ActivateDeactivateServerCmd struct {
Active bool
}
func (ActivateDeactivateServerCmd) Name ¶
func (a ActivateDeactivateServerCmd) Name() string
type AllPrograms ¶
type CommandBus ¶
type CommandBus struct {
// contains filtered or unexported fields
}
func NewCommandBus ¶
func NewCommandBus() CommandBus
func (CommandBus) Subscribe ¶
func (c CommandBus) Subscribe(name string, command cqs.CommandHandler)
type CreatePrograms ¶
type CreatePrograms struct {
// contains filtered or unexported fields
}
func NewCreatePrograms ¶
func NewCreatePrograms( daily, odd, even ProgramRepository, weekly WeeklyProgramRepository, temperature TemperatureProgramRepository, ) CreatePrograms
type CreateProgramsCmd ¶
type CreateProgramsCmd struct {
Daily, Odd, Even []program.Program
Weekly []program.Weekly
Temperature []program.Temperature
}
func (CreateProgramsCmd) Name ¶
func (c CreateProgramsCmd) Name() string
type CreateStatus ¶
type CreateStatus struct {
// contains filtered or unexported fields
}
func NewCreateStatus ¶
func NewCreateStatus(sr StatusRepository) CreateStatus
type CreateStatusCmd ¶
func (CreateStatusCmd) Name ¶
func (c CreateStatusCmd) Name() string
type CreateZone ¶
type CreateZone struct {
// contains filtered or unexported fields
}
func NewCreateZone ¶
func NewCreateZone(zr ZoneRepository) CreateZone
type CreateZoneCmd ¶
func (CreateZoneCmd) Name ¶
func (c CreateZoneCmd) Name() string
type CreateZoneError ¶
type CreateZoneError struct {
// contains filtered or unexported fields
}
func (CreateZoneError) Error ¶
func (c CreateZoneError) Error() string
type ExecutePins ¶
type ExecutePins struct {
// contains filtered or unexported fields
}
func NewExecutePins ¶
func NewExecutePins(pe PinExecutor) ExecutePins
type ExecutePinsCmd ¶
func (ExecutePinsCmd) Name ¶
func (e ExecutePinsCmd) Name() string
type ExecuteZone ¶
type ExecuteZone struct {
// contains filtered or unexported fields
}
func NewExecuteZone ¶
func NewExecuteZone(zr ZoneRepository) ExecuteZone
type ExecuteZoneCmd ¶
func (ExecuteZoneCmd) Name ¶
func (e ExecuteZoneCmd) Name() string
type ExecuteZoneError ¶
type ExecuteZoneError struct {
// contains filtered or unexported fields
}
func (ExecuteZoneError) Error ¶
func (e ExecuteZoneError) Error() string
type ExecuteZoneWithStatus ¶
type ExecuteZoneWithStatus struct {
// contains filtered or unexported fields
}
func NewExecuteZoneWithStatus ¶
func NewExecuteZoneWithStatus(zr ZoneRepository, st StatusRepository) *ExecuteZoneWithStatus
type ExecuteZoneWithStatusCmd ¶
func (ExecuteZoneWithStatusCmd) Name ¶
func (e ExecuteZoneWithStatusCmd) Name() string
type ExecuteZoneWithStatusError ¶
type ExecuteZoneWithStatusError struct {
// contains filtered or unexported fields
}
func (ExecuteZoneWithStatusError) Error ¶
func (e ExecuteZoneWithStatusError) Error() string
type ExecutionLogRepository ¶
type ExecutionLogRepository interface { Save(ctx context.Context, logs []program.ExecutionLog) error FindAll(ctx context.Context) ([]program.ExecutionLog, error) }
type FindAllPrograms ¶
type FindAllPrograms struct {
// contains filtered or unexported fields
}
func NewFindAllPrograms ¶
func NewFindAllPrograms( daily ProgramRepository, odd ProgramRepository, even ProgramRepository, weekly WeeklyProgramRepository, temperature TemperatureProgramRepository, ) FindAllPrograms
type FindAllProgramsQuery ¶
type FindAllProgramsQuery struct{}
func (FindAllProgramsQuery) Name ¶
func (f FindAllProgramsQuery) Name() string
type FindExecutionLogs ¶
type FindExecutionLogs struct {
// contains filtered or unexported fields
}
func NewFindExecutionLogs ¶
func NewFindExecutionLogs(elr ExecutionLogRepository) FindExecutionLogs
type FindExecutionLogsQuery ¶
type FindExecutionLogsQuery struct {
Limit int
}
func (FindExecutionLogsQuery) Name ¶
func (f FindExecutionLogsQuery) Name() string
type FindProgramsInTime ¶
type FindProgramsInTime struct {
Daily, Odd, Even ProgramRepository
Weekly WeeklyProgramRepository
Temperature TemperatureProgramRepository
}
func NewFindProgramsInTime ¶
func NewFindProgramsInTime( daily, odd, even ProgramRepository, weekly WeeklyProgramRepository, temperature TemperatureProgramRepository, ) FindProgramsInTime
type FindProgramsInTimeQuery ¶
func (FindProgramsInTimeQuery) Name ¶
func (f FindProgramsInTimeQuery) Name() string
type FindStatus ¶
type FindStatus struct {
// contains filtered or unexported fields
}
func NewFindStatus ¶
func NewFindStatus(sr StatusRepository) FindStatus
type FindStatusQuery ¶
type FindStatusQuery struct{}
func (FindStatusQuery) Name ¶
func (f FindStatusQuery) Name() string
type FindWeather ¶
type FindWeather struct {
// contains filtered or unexported fields
}
func NewFindWeather ¶
func NewFindWeather(tr TemperatureRepository, rr RainRepository) FindWeather
type FindWeatherQuery ¶
type FindWeatherQuery struct{}
func (FindWeatherQuery) Name ¶
func (f FindWeatherQuery) Name() string
type MessagePublisher ¶
type PinExecutor ¶
type ProgramRepository ¶
type ProgramsInTime ¶
type PublishMessage ¶
type PublishMessage struct {
// contains filtered or unexported fields
}
func NewPublishMessage ¶
func NewPublishMessage(elp MessagePublisher) PublishMessage
type PublishMessageCmd ¶
type PublishMessageCmd struct {
Message string
}
func (PublishMessageCmd) Name ¶
func (p PublishMessageCmd) Name() string
type QueryBus ¶
type QueryBus struct {
// contains filtered or unexported fields
}
func NewQueryBus ¶
func NewQueryBus() QueryBus
type RemoveZone ¶
type RemoveZone struct {
// contains filtered or unexported fields
}
func NewRemoveZone ¶
func NewRemoveZone(zr ZoneRepository) RemoveZone
type RemoveZoneCmd ¶
type RemoveZoneCmd struct {
ID string
}
func (RemoveZoneCmd) Name ¶
func (r RemoveZoneCmd) Name() string
type SaveExecutionLog ¶
type SaveExecutionLog struct {
// contains filtered or unexported fields
}
func NewSaveExecutionLog ¶
func NewSaveExecutionLog(elr ExecutionLogRepository) SaveExecutionLog
type SaveExecutionLogCmd ¶
func (SaveExecutionLogCmd) Name ¶
func (s SaveExecutionLogCmd) Name() string
type SaveExecutionLogError ¶
type SaveExecutionLogError struct {
// contains filtered or unexported fields
}
func (SaveExecutionLogError) Error ¶
func (s SaveExecutionLogError) Error() string
type StatusRepository ¶
type TemperatureRepository ¶
type UnSubscribedCommandError ¶
type UnSubscribedCommandError struct {
// contains filtered or unexported fields
}
func (UnSubscribedCommandError) Error ¶
func (u UnSubscribedCommandError) Error() string
type UnSubscribedQueryError ¶
type UnSubscribedQueryError struct {
// contains filtered or unexported fields
}
func (UnSubscribedQueryError) Error ¶
func (u UnSubscribedQueryError) Error() string
type UpdateStatus ¶
type UpdateStatus struct {
// contains filtered or unexported fields
}
func NewUpdateStatus ¶
func NewUpdateStatus(sr StatusRepository) UpdateStatus
type UpdateStatusCmd ¶
func (UpdateStatusCmd) Name ¶
func (u UpdateStatusCmd) Name() string
type WeeklyProgramRepository ¶
Source Files ¶
- activate_deactivate_server.go
- command_bus.go
- create_programs.go
- create_status.go
- create_zone.go
- event_middleware.go
- execute_pins.go
- execute_zone.go
- execute_zone_with_status.go
- find_all_programs.go
- find_execution_logs.go
- find_programs_in_time.go
- find_status.go
- find_weather.go
- message_publisher.go
- pin_executor.go
- publish_message.go
- query_bus.go
- remove_zone.go
- repositories.go
- save_execution_log.go
- update_status.go
Click to show internal directories.
Click to hide internal directories.