Documentation
¶
Index ¶
- func ConnectToDB(ctx context.Context, DBCfg *config.DBConfig, log *zerolog.Logger) (*pgxpool.Pool, error)
- type Alert
- type CloseMonitorIncidentParams
- type CreateAlertParams
- type CreateMonitorIncidentParams
- type CreateMonitorParams
- type CreateUserParams
- type DBTX
- type GetAllMonitorByUserIDParams
- type GetIncidentByIDAndUserIDParams
- type GetIncidentByIDAndUserIDRow
- type GetMonitorByIDRow
- type GetMonitorParams
- type GetMonitorRow
- type GetUserByEmailRow
- type GetUserByIDRow
- type ListIncidentsByUserCursorParams
- type ListIncidentsByUserCursorRow
- type ListIncidentsByUserIDParams
- type ListIncidentsByUserIDRow
- type Monitor
- type MonitorIncident
- type Queries
- func (q *Queries) CloseMonitorIncident(ctx context.Context, arg CloseMonitorIncidentParams) (pgtype.UUID, error)
- func (q *Queries) CountIncidentsByUserID(ctx context.Context, userID pgtype.UUID) (int64, error)
- func (q *Queries) CreateAlert(ctx context.Context, arg CreateAlertParams) error
- func (q *Queries) CreateMonitor(ctx context.Context, arg CreateMonitorParams) (pgtype.UUID, error)
- func (q *Queries) CreateMonitorIncident(ctx context.Context, arg CreateMonitorIncidentParams) (pgtype.UUID, error)
- func (q *Queries) CreateUser(ctx context.Context, arg CreateUserParams) (pgtype.UUID, error)
- func (q *Queries) GetAllMonitorByUserID(ctx context.Context, arg GetAllMonitorByUserIDParams) ([]Monitor, error)
- func (q *Queries) GetIncidentByIDAndUserID(ctx context.Context, arg GetIncidentByIDAndUserIDParams) (GetIncidentByIDAndUserIDRow, error)
- func (q *Queries) GetMonitor(ctx context.Context, arg GetMonitorParams) (GetMonitorRow, error)
- func (q *Queries) GetMonitorByID(ctx context.Context, id pgtype.UUID) (GetMonitorByIDRow, error)
- func (q *Queries) GetMonitorIncidentByID(ctx context.Context, id pgtype.UUID) (MonitorIncident, error)
- func (q *Queries) GetUserByEmail(ctx context.Context, email string) (GetUserByEmailRow, error)
- func (q *Queries) GetUserByID(ctx context.Context, id pgtype.UUID) (GetUserByIDRow, error)
- func (q *Queries) IncrementMonitorCount(ctx context.Context, id pgtype.UUID) (int64, error)
- func (q *Queries) ListIncidentsByUserCursor(ctx context.Context, arg ListIncidentsByUserCursorParams) ([]ListIncidentsByUserCursorRow, error)
- func (q *Queries) ListIncidentsByUserID(ctx context.Context, arg ListIncidentsByUserIDParams) ([]ListIncidentsByUserIDRow, error)
- func (q *Queries) UpdateAlertStatus(ctx context.Context, arg UpdateAlertStatusParams) (int64, error)
- func (q *Queries) UpdateMonitorStatus(ctx context.Context, arg UpdateMonitorStatusParams) (int64, error)
- func (q *Queries) WithTx(tx pgx.Tx) *Queries
- type UpdateAlertStatusParams
- type UpdateMonitorStatusParams
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Alert ¶
type Alert struct {
ID pgtype.UUID
IncidentID pgtype.UUID
SentAt pgtype.Timestamptz
AlertEmail string
Status string
CreatedAt pgtype.Timestamptz
}
type CloseMonitorIncidentParams ¶
type CloseMonitorIncidentParams struct {
MonitorID pgtype.UUID
EndTime pgtype.Timestamptz
}
type CreateAlertParams ¶
type CreateMonitorParams ¶
type CreateUserParams ¶
type GetIncidentByIDAndUserIDRow ¶
type GetIncidentByIDAndUserIDRow struct {
ID pgtype.UUID
MonitorID pgtype.UUID
MonitorUrl string
StartTime pgtype.Timestamptz
EndTime pgtype.Timestamptz
Alerted bool
HttpStatus int32
LatencyMs int32
CreatedAt pgtype.Timestamptz
IsActive bool
DurationSec int64
AlertStatus string
AlertEmail string
AlertSentAt pgtype.Timestamptz
}
type GetMonitorByIDRow ¶
type GetMonitorRow ¶
type GetUserByEmailRow ¶
type GetUserByIDRow ¶
type ListIncidentsByUserCursorParams ¶
type ListIncidentsByUserCursorParams struct {
UserID pgtype.UUID
Column2 string
Column3 pgtype.Timestamptz
Column4 pgtype.Timestamptz
Column5 string
Column6 pgtype.UUID
Column7 pgtype.Timestamptz
Column8 pgtype.UUID
Limit int32
}
type ListIncidentsByUserCursorRow ¶
type ListIncidentsByUserCursorRow struct {
ID pgtype.UUID
MonitorID pgtype.UUID
MonitorUrl string
StartTime pgtype.Timestamptz
EndTime pgtype.Timestamptz
Alerted bool
HttpStatus int32
LatencyMs int32
CreatedAt pgtype.Timestamptz
IsActive bool
DurationSec int64
AlertStatus string
AlertEmail string
AlertSentAt pgtype.Timestamptz
}
type ListIncidentsByUserIDRow ¶
type ListIncidentsByUserIDRow struct {
ID pgtype.UUID
MonitorID pgtype.UUID
MonitorUrl string
StartTime pgtype.Timestamptz
EndTime pgtype.Timestamptz
Alerted bool
HttpStatus int32
LatencyMs int32
CreatedAt pgtype.Timestamptz
IsActive bool
DurationSec int64
AlertStatus string
AlertEmail string
AlertSentAt pgtype.Timestamptz
}
type MonitorIncident ¶
type MonitorIncident struct {
ID pgtype.UUID
MonitorID pgtype.UUID
StartTime pgtype.Timestamptz
EndTime pgtype.Timestamptz
Alerted bool
HttpStatus int32
LatencyMs int32
CreatedAt pgtype.Timestamptz
}
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) CloseMonitorIncident ¶
func (*Queries) CountIncidentsByUserID ¶
func (*Queries) CreateAlert ¶
func (q *Queries) CreateAlert(ctx context.Context, arg CreateAlertParams) error
func (*Queries) CreateMonitor ¶
func (*Queries) CreateMonitorIncident ¶
func (*Queries) CreateUser ¶
func (*Queries) GetAllMonitorByUserID ¶
func (*Queries) GetIncidentByIDAndUserID ¶
func (q *Queries) GetIncidentByIDAndUserID(ctx context.Context, arg GetIncidentByIDAndUserIDParams) (GetIncidentByIDAndUserIDRow, error)
func (*Queries) GetMonitor ¶
func (q *Queries) GetMonitor(ctx context.Context, arg GetMonitorParams) (GetMonitorRow, error)
func (*Queries) GetMonitorByID ¶
func (*Queries) GetMonitorIncidentByID ¶
func (*Queries) GetUserByEmail ¶
func (*Queries) GetUserByID ¶
func (*Queries) IncrementMonitorCount ¶
func (*Queries) ListIncidentsByUserCursor ¶
func (q *Queries) ListIncidentsByUserCursor(ctx context.Context, arg ListIncidentsByUserCursorParams) ([]ListIncidentsByUserCursorRow, error)
func (*Queries) ListIncidentsByUserID ¶
func (q *Queries) ListIncidentsByUserID(ctx context.Context, arg ListIncidentsByUserIDParams) ([]ListIncidentsByUserIDRow, error)
func (*Queries) UpdateAlertStatus ¶
func (*Queries) UpdateMonitorStatus ¶
type UpdateAlertStatusParams ¶
Click to show internal directories.
Click to hide internal directories.