Documentation
¶
Index ¶
- func ConnectToDB(ctx context.Context, DBCfg *config.DBConfig, log *zerolog.Logger) (*pgxpool.Pool, error)
- type AddTeamMemberParams
- type Alert
- type CloseMonitorIncidentParams
- type CreateAlertParams
- type CreateInvitationParams
- type CreateInvitationRow
- type CreateMonitorIncidentParams
- type CreateMonitorParams
- type CreateUserParams
- type DBTX
- type DeleteInvitationParams
- type DeleteMonitorParams
- type DeletePluginParams
- type GetIncidentByIDAndTeamIDParams
- type GetIncidentByIDAndTeamIDRow
- type GetInvitationByTokenRow
- type GetMonitorByIDRow
- type GetMonitorByTeamIDParams
- type GetMonitorByTeamIDRow
- type GetPluginParams
- type GetTeamMembershipParams
- type GetUserByEmailRow
- type GetUserByIDRow
- type InstanceSetting
- type Invitation
- type ListIncidentsByTeamCursorParams
- type ListIncidentsByTeamCursorRow
- type ListInvitationsRow
- type ListMonitorsByTeamCursorParams
- type ListMonitorsByTeamCursorRow
- type ListTeamMembersRow
- type ListUsersRow
- type Monitor
- type MonitorIncident
- type Plugin
- type Queries
- func (q *Queries) AcceptInvitation(ctx context.Context, token string) error
- func (q *Queries) AddTeamMember(ctx context.Context, arg AddTeamMemberParams) (TeamMember, error)
- func (q *Queries) CloseMonitorIncident(ctx context.Context, arg CloseMonitorIncidentParams) (pgtype.UUID, error)
- func (q *Queries) CreateAlert(ctx context.Context, arg CreateAlertParams) error
- func (q *Queries) CreateInvitation(ctx context.Context, arg CreateInvitationParams) (CreateInvitationRow, 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) CreateTeam(ctx context.Context, name string) (Team, 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, arg DeleteInvitationParams) error
- func (q *Queries) DeleteMonitor(ctx context.Context, arg DeleteMonitorParams) (int64, error)
- func (q *Queries) DeletePlugin(ctx context.Context, arg DeletePluginParams) error
- func (q *Queries) GetIncidentByIDAndTeamID(ctx context.Context, arg GetIncidentByIDAndTeamIDParams) (GetIncidentByIDAndTeamIDRow, error)
- func (q *Queries) GetInvitationByToken(ctx context.Context, token string) (GetInvitationByTokenRow, error)
- func (q *Queries) GetMonitorByID(ctx context.Context, id pgtype.UUID) (GetMonitorByIDRow, error)
- func (q *Queries) GetMonitorByTeamID(ctx context.Context, arg GetMonitorByTeamIDParams) (GetMonitorByTeamIDRow, error)
- func (q *Queries) GetMonitorIncidentByID(ctx context.Context, id pgtype.UUID) (MonitorIncident, error)
- func (q *Queries) GetPlugin(ctx context.Context, arg GetPluginParams) (Plugin, error)
- func (q *Queries) GetRegistrationsEnabled(ctx context.Context) (bool, error)
- func (q *Queries) GetTeamByID(ctx context.Context, id pgtype.UUID) (Team, error)
- func (q *Queries) GetTeamMembership(ctx context.Context, arg GetTeamMembershipParams) (TeamMember, 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) ListIncidentsByTeamCursor(ctx context.Context, arg ListIncidentsByTeamCursorParams) ([]ListIncidentsByTeamCursorRow, error)
- func (q *Queries) ListInvitations(ctx context.Context, teamID pgtype.UUID) ([]ListInvitationsRow, error)
- func (q *Queries) ListMonitorsByTeamCursor(ctx context.Context, arg ListMonitorsByTeamCursorParams) ([]ListMonitorsByTeamCursorRow, error)
- func (q *Queries) ListPlugins(ctx context.Context, teamID pgtype.UUID) ([]Plugin, error)
- func (q *Queries) ListTeamMembers(ctx context.Context, teamID pgtype.UUID) ([]ListTeamMembersRow, error)
- func (q *Queries) ListTeamsByUserID(ctx context.Context, userID pgtype.UUID) ([]Team, error)
- func (q *Queries) ListUsers(ctx context.Context) ([]ListUsersRow, error)
- func (q *Queries) SetRegistrationsEnabled(ctx context.Context, registrationsEnabled bool) error
- func (q *Queries) SetTeamMemberActive(ctx context.Context, arg SetTeamMemberActiveParams) 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, arg UpdateTeamNameParams) error
- func (q *Queries) UpdateUserName(ctx context.Context, arg UpdateUserNameParams) error
- func (q *Queries) UpdateUserPassword(ctx context.Context, arg UpdateUserPasswordParams) error
- func (q *Queries) UpsertPlugin(ctx context.Context, arg UpsertPluginParams) (Plugin, error)
- func (q *Queries) UserIsMember(ctx context.Context, arg UserIsMemberParams) (bool, error)
- func (q *Queries) WithTx(tx pgx.Tx) *Queries
- type SetTeamMemberActiveParams
- type SetUserActiveParams
- type Team
- type TeamMember
- type UpdateAlertStatusParams
- type UpdateMonitorStatusParams
- type UpdateTeamNameParams
- type UpdateUserNameParams
- type UpdateUserPasswordParams
- type UpsertPluginParams
- type User
- type UserIsMemberParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AddTeamMemberParams ¶ added in v0.1.9
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 CreateInvitationRow ¶ added in v0.1.9
type CreateInvitationRow struct {
ID pgtype.UUID
TeamID pgtype.UUID
Email string
Role string
Token string
ExpiresAt pgtype.Timestamptz
AcceptedAt pgtype.Timestamptz
InvitedBy pgtype.UUID
CreatedAt pgtype.Timestamptz
}
type CreateMonitorParams ¶
type CreateUserParams ¶
type DeleteInvitationParams ¶ added in v0.1.9
type DeleteMonitorParams ¶ added in v0.1.2
type DeletePluginParams ¶ added in v0.1.9
type GetIncidentByIDAndTeamIDParams ¶ added in v0.1.9
type GetIncidentByIDAndTeamIDRow ¶ added in v0.1.9
type GetIncidentByIDAndTeamIDRow 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
ExpectedStatus pgtype.Int4
LatencyThresholdMs pgtype.Int4
}
type GetInvitationByTokenRow ¶ added in v0.1.9
type GetInvitationByTokenRow struct {
ID pgtype.UUID
TeamID pgtype.UUID
Email string
Role string
Token string
ExpiresAt pgtype.Timestamptz
AcceptedAt pgtype.Timestamptz
InvitedBy pgtype.UUID
CreatedAt pgtype.Timestamptz
}
type GetMonitorByIDRow ¶
type GetMonitorByTeamIDParams ¶ added in v0.1.9
type GetMonitorByTeamIDRow ¶ added in v0.1.9
type GetPluginParams ¶ added in v0.1.9
type GetTeamMembershipParams ¶ added in v0.1.9
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
TeamID pgtype.UUID
}
type ListIncidentsByTeamCursorParams ¶ added in v0.1.9
type ListIncidentsByTeamCursorParams struct {
TeamID pgtype.UUID
Column2 string
Column3 pgtype.Timestamptz
Column4 pgtype.Timestamptz
Column5 string
Column6 pgtype.UUID
Column7 pgtype.Timestamptz
Column8 pgtype.UUID
Limit int32
}
type ListIncidentsByTeamCursorRow ¶ added in v0.1.9
type ListIncidentsByTeamCursorRow 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
ExpectedStatus pgtype.Int4
LatencyThresholdMs pgtype.Int4
}
type ListInvitationsRow ¶ added in v0.1.9
type ListInvitationsRow struct {
ID pgtype.UUID
TeamID pgtype.UUID
Email string
Role string
Token string
ExpiresAt pgtype.Timestamptz
AcceptedAt pgtype.Timestamptz
InvitedBy pgtype.UUID
CreatedAt pgtype.Timestamptz
}
type ListMonitorsByTeamCursorParams ¶ added in v0.1.9
type ListMonitorsByTeamCursorRow ¶ added in v0.1.9
type ListMonitorsByTeamCursorRow struct {
ID pgtype.UUID
UserID pgtype.UUID
TeamID pgtype.UUID
Url string
AlertEmail pgtype.Text
NotificationChannels string
IntervalSec int32
TimeoutSec int32
LatencyThresholdMs pgtype.Int4
ExpectedStatus pgtype.Int4
Enabled bool
CreatedAt pgtype.Timestamptz
IsDown bool
}
type ListTeamMembersRow ¶ added in v0.1.9
type ListUsersRow ¶ added in v0.1.2
type Monitor ¶
type Monitor struct {
ID pgtype.UUID
UserID pgtype.UUID
Url string
AlertEmail pgtype.Text
IntervalSec int32
TimeoutSec int32
LatencyThresholdMs pgtype.Int4
ExpectedStatus pgtype.Int4
Enabled bool
UpdatedAt pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
TeamID pgtype.UUID
NotificationChannels string
}
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) AddTeamMember ¶ added in v0.1.9
func (q *Queries) AddTeamMember(ctx context.Context, arg AddTeamMemberParams) (TeamMember, error)
func (*Queries) CloseMonitorIncident ¶
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) (CreateInvitationRow, error)
func (*Queries) CreateMonitor ¶
func (*Queries) CreateMonitorIncident ¶
func (*Queries) CreateTeam ¶ added in v0.1.9
func (*Queries) CreateUser ¶
func (*Queries) DecrementMonitorCount ¶ added in v0.1.2
func (*Queries) DeleteInvitation ¶ added in v0.1.2
func (q *Queries) DeleteInvitation(ctx context.Context, arg DeleteInvitationParams) error
func (*Queries) DeleteMonitor ¶ added in v0.1.2
func (*Queries) DeletePlugin ¶ added in v0.1.9
func (q *Queries) DeletePlugin(ctx context.Context, arg DeletePluginParams) error
func (*Queries) GetIncidentByIDAndTeamID ¶ added in v0.1.9
func (q *Queries) GetIncidentByIDAndTeamID(ctx context.Context, arg GetIncidentByIDAndTeamIDParams) (GetIncidentByIDAndTeamIDRow, error)
func (*Queries) GetInvitationByToken ¶ added in v0.1.2
func (*Queries) GetMonitorByID ¶
func (*Queries) GetMonitorByTeamID ¶ added in v0.1.9
func (q *Queries) GetMonitorByTeamID(ctx context.Context, arg GetMonitorByTeamIDParams) (GetMonitorByTeamIDRow, error)
func (*Queries) GetMonitorIncidentByID ¶
func (*Queries) GetRegistrationsEnabled ¶ added in v0.1.2
func (*Queries) GetTeamByID ¶ added in v0.1.9
func (*Queries) GetTeamMembership ¶ added in v0.1.9
func (q *Queries) GetTeamMembership(ctx context.Context, arg GetTeamMembershipParams) (TeamMember, 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) ListIncidentsByTeamCursor ¶ added in v0.1.9
func (q *Queries) ListIncidentsByTeamCursor(ctx context.Context, arg ListIncidentsByTeamCursorParams) ([]ListIncidentsByTeamCursorRow, error)
func (*Queries) ListInvitations ¶ added in v0.1.2
func (*Queries) ListMonitorsByTeamCursor ¶ added in v0.1.9
func (q *Queries) ListMonitorsByTeamCursor(ctx context.Context, arg ListMonitorsByTeamCursorParams) ([]ListMonitorsByTeamCursorRow, error)
func (*Queries) ListPlugins ¶ added in v0.1.9
func (*Queries) ListTeamMembers ¶ added in v0.1.9
func (*Queries) ListTeamsByUserID ¶ added in v0.1.9
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) SetTeamMemberActive ¶ added in v0.1.9
func (q *Queries) SetTeamMemberActive(ctx context.Context, arg SetTeamMemberActiveParams) error
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 (q *Queries) UpdateTeamName(ctx context.Context, arg UpdateTeamNameParams) error
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
func (*Queries) UpsertPlugin ¶ added in v0.1.9
func (*Queries) UserIsMember ¶ added in v0.1.9
type SetTeamMemberActiveParams ¶ added in v0.1.9
type SetUserActiveParams ¶ added in v0.1.2
type Team ¶ added in v0.1.2
type Team struct {
ID pgtype.UUID
Name string
CreatedAt pgtype.Timestamptz
UpdatedAt pgtype.Timestamptz
}
type TeamMember ¶ added in v0.1.9
type UpdateAlertStatusParams ¶
type UpdateTeamNameParams ¶ added in v0.1.9
type UpdateUserNameParams ¶ added in v0.1.2
type UpdateUserPasswordParams ¶ added in v0.1.2
type UpsertPluginParams ¶ added in v0.1.9
Click to show internal directories.
Click to hide internal directories.