Documentation ¶
Index ¶
- Variables
- func AssertEvent(expectedResult models.Event, actualResult models.Event, t *testing.T)
- func AssertEvents(expectedResult []models.Event, actualResult []models.Event, t *testing.T)
- func AssertHealthCheck(expectedResult HealthCheck, actualResult HealthCheck, t *testing.T)
- func DbClient() *sql.DB
- func GetEvent(id string) (int, models.Event)
- func GetEventResponse(res *http.Response) (int, models.Event)
- func GetEvents() (int, []models.Event)
- func GetEventsResponse(res *http.Response) (int, []models.Event)
- func PutEvent(id string, payload models.Event) (int, models.Event)
- func PutEventResponse(res *http.Response) (int, models.Event)
- func StartServer() *http.Server
- type DbConfig
- type HealthCheck
- type SQSReceiveMessageImpl
Constants ¶
This section is empty.
Variables ¶
View Source
var Events = []models.Event{ { DeviceId: "esp32-2424242424", Description: "Maximum threshold reached", Type: "temperature", Event: "TEMPERATURE_MAX_THRESHOLD", Read: false, }, { DeviceId: "esp32-4646464646", Description: "Minimum threshold reached", Type: "temperature", Event: "TEMPERATURE_MIN_THRESHOLD", Read: false, }, { DeviceId: "esp32-0123456789", Description: "Maximum threshold reached", Type: "temperature", Event: "TEMPERATURE_MAX_THRESHOLD", Read: false, }, }
Functions ¶
func AssertEvent ¶
func AssertEvents ¶
func AssertHealthCheck ¶
func AssertHealthCheck(expectedResult HealthCheck, actualResult HealthCheck, t *testing.T)
func StartServer ¶
Types ¶
type DbConfig ¶
func (*DbConfig) CreateDbTable ¶
func (*DbConfig) CreateEvent ¶
func (*DbConfig) DeleteEvents ¶
func (*DbConfig) DropDbTable ¶
type HealthCheck ¶
type HealthCheck struct { Version string `json:"version,omitempty"` Status string `json:"status,omitempty"` Environment string `json:"environment,omitempty"` }
func GetHealthCheck ¶
func GetHealthCheck() (int, HealthCheck)
func GetHealthCheckResponse ¶
func GetHealthCheckResponse(res *http.Response) (int, HealthCheck)
type SQSReceiveMessageImpl ¶
type SQSReceiveMessageImpl struct{}
func (SQSReceiveMessageImpl) GetQueueUrl ¶
func (dt SQSReceiveMessageImpl) GetQueueUrl(ctx context.Context, params *sqs.GetQueueUrlInput, optFns ...func(*sqs.Options)) (*sqs.GetQueueUrlOutput, error)
func (SQSReceiveMessageImpl) ReceiveMessage ¶
func (dt SQSReceiveMessageImpl) ReceiveMessage(ctx context.Context, params *sqs.ReceiveMessageInput, optFns ...func(*sqs.Options)) (*sqs.ReceiveMessageOutput, error)
Click to show internal directories.
Click to hide internal directories.