Documentation
¶
Index ¶
- func ConnectToDB(ctx context.Context, DBCfg *config.DBConfig, log *zerolog.Logger) (*pgxpool.Pool, error)
- type Alert
- type CloseMonitorIncidentParams
- type CreateAlertParams
- type CreateInvitationParams
- type CreateMonitorIncidentParams
- type CreateMonitorParams
- type CreateUserParams
- type DBTX
- type DeleteMonitorParams
- type GetAllMonitorByUserIDParams
- type GetIncidentByIDAndUserIDParams
- type GetIncidentByIDAndUserIDRow
- type GetMonitorByIDRow
- type GetMonitorParams
- type GetMonitorRow
- type GetTeamRow
- type GetUserByEmailRow
- type GetUserByIDRow
- type InstanceSetting
- type Invitation
- type ListIncidentsByUserCursorParams
- type ListIncidentsByUserCursorRow
- type ListIncidentsByUserIDParams
- type ListIncidentsByUserIDRow
- type ListUsersRow
- type Monitor
- type MonitorIncident
- type Queries
- func (q *Queries) AcceptInvitation(ctx context.Context, token string) error
- 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) CreateInvitation(ctx context.Context, arg CreateInvitationParams) (Invitation, 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) DecrementMonitorCount(ctx context.Context, id pgtype.UUID) error
- func (q *Queries) DeleteInvitation(ctx context.Context, id pgtype.UUID) error
- func (q *Queries) DeleteMonitor(ctx context.Context, arg DeleteMonitorParams) (int64, 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) GetInvitationByToken(ctx context.Context, token string) (Invitation, 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) GetRegistrationsEnabled(ctx context.Context) (bool, error)
- func (q *Queries) GetTeam(ctx context.Context) (GetTeamRow, error)
- func (q *Queries) GetUserActiveStatus(ctx context.Context, id pgtype.UUID) (bool, 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) GetUserPasswordHash(ctx context.Context, id pgtype.UUID) (string, error)
- func (q *Queries) HasUsers(ctx context.Context) (bool, 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) ListInvitations(ctx context.Context) ([]Invitation, error)
- func (q *Queries) ListUsers(ctx context.Context) ([]ListUsersRow, error)
- func (q *Queries) SetRegistrationsEnabled(ctx context.Context, registrationsEnabled bool) error
- func (q *Queries) SetUserActive(ctx context.Context, arg SetUserActiveParams) 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) UpdateTeamName(ctx context.Context, name string) error
- func (q *Queries) UpdateUserName(ctx context.Context, arg UpdateUserNameParams) error
- func (q *Queries) UpdateUserPassword(ctx context.Context, arg UpdateUserPasswordParams) error
- func (q *Queries) WithTx(tx pgx.Tx) *Queries
- type SetUserActiveParams
- type Team
- type UpdateAlertStatusParams
- type UpdateMonitorStatusParams
- type UpdateUserNameParams
- type UpdateUserPasswordParams
- 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 CreateInvitationParams ¶ added in v0.1.2
type CreateMonitorParams ¶
type CreateUserParams ¶
type DeleteMonitorParams ¶ added in v0.1.2
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 GetTeamRow ¶ added in v0.1.2
type GetUserByEmailRow ¶
type GetUserByIDRow ¶
type InstanceSetting ¶ added in v0.1.2
type Invitation ¶ added in v0.1.2
type Invitation struct {
ID pgtype.UUID
Email string
Role string
Token string
ExpiresAt pgtype.Timestamptz
AcceptedAt pgtype.Timestamptz
InvitedBy pgtype.UUID
CreatedAt pgtype.Timestamptz
}
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 ListUsersRow ¶ added in v0.1.2
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) AcceptInvitation ¶ added in v0.1.2
func (*Queries) CloseMonitorIncident ¶
func (*Queries) CountIncidentsByUserID ¶
func (*Queries) CreateAlert ¶
func (q *Queries) CreateAlert(ctx context.Context, arg CreateAlertParams) error
func (*Queries) CreateInvitation ¶ added in v0.1.2
func (q *Queries) CreateInvitation(ctx context.Context, arg CreateInvitationParams) (Invitation, error)
func (*Queries) CreateMonitor ¶
func (*Queries) CreateMonitorIncident ¶
func (*Queries) CreateUser ¶
func (*Queries) DecrementMonitorCount ¶ added in v0.1.2
func (*Queries) DeleteInvitation ¶ added in v0.1.2
func (*Queries) DeleteMonitor ¶ added in v0.1.2
func (*Queries) GetAllMonitorByUserID ¶
func (*Queries) GetIncidentByIDAndUserID ¶
func (q *Queries) GetIncidentByIDAndUserID(ctx context.Context, arg GetIncidentByIDAndUserIDParams) (GetIncidentByIDAndUserIDRow, error)
func (*Queries) GetInvitationByToken ¶ added in v0.1.2
func (*Queries) GetMonitor ¶
func (q *Queries) GetMonitor(ctx context.Context, arg GetMonitorParams) (GetMonitorRow, error)
func (*Queries) GetMonitorByID ¶
func (*Queries) GetMonitorIncidentByID ¶
func (*Queries) GetRegistrationsEnabled ¶ added in v0.1.2
func (*Queries) GetTeam ¶ added in v0.1.2
func (q *Queries) GetTeam(ctx context.Context) (GetTeamRow, error)
func (*Queries) GetUserActiveStatus ¶ added in v0.1.2
func (*Queries) GetUserByEmail ¶
func (*Queries) GetUserByID ¶
func (*Queries) GetUserPasswordHash ¶ added in v0.1.2
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) ListInvitations ¶ added in v0.1.2
func (q *Queries) ListInvitations(ctx context.Context) ([]Invitation, error)
func (*Queries) ListUsers ¶ added in v0.1.2
func (q *Queries) ListUsers(ctx context.Context) ([]ListUsersRow, error)
func (*Queries) SetRegistrationsEnabled ¶ added in v0.1.2
func (*Queries) SetUserActive ¶ added in v0.1.2
func (q *Queries) SetUserActive(ctx context.Context, arg SetUserActiveParams) error
func (*Queries) UpdateAlertStatus ¶
func (*Queries) UpdateMonitorStatus ¶
func (*Queries) UpdateTeamName ¶ added in v0.1.2
func (*Queries) UpdateUserName ¶ added in v0.1.2
func (q *Queries) UpdateUserName(ctx context.Context, arg UpdateUserNameParams) error
func (*Queries) UpdateUserPassword ¶ added in v0.1.2
func (q *Queries) UpdateUserPassword(ctx context.Context, arg UpdateUserPasswordParams) error
type SetUserActiveParams ¶ added in v0.1.2
type UpdateAlertStatusParams ¶
type UpdateUserNameParams ¶ added in v0.1.2
type UpdateUserPasswordParams ¶ added in v0.1.2
Click to show internal directories.
Click to hide internal directories.