Documentation ¶
Index ¶
- func AddHistoryForTarget(ctx context.Context, db *sqlx.DB, history *models.TargetHistory) error
- func CountChecks(ctx context.Context, db *sqlx.DB) (int, error)
- func CountHooks(ctx context.Context, db *sqlx.DB) (int, error)
- func CountTargets(ctx context.Context, db *sqlx.DB) (int, error)
- func CountTriggers(ctx context.Context, db *sqlx.DB) (int, error)
- func CountWorkerGroups(ctx context.Context, db *sqlx.DB) (int, error)
- func CreateCheck(ctx context.Context, db *sqlx.DB, check *models.Check) error
- func CreateHook(ctx context.Context, db *sqlx.DB, hook *models.Hook) error
- func CreateOAuth2State(ctx context.Context, db *sqlx.DB, oauth2State *models.OAuth2State) error
- func CreateOrUpdateCheckSchedule(ctx context.Context, t client.Client, check *models.Check, ...) error
- func CreateOrUpdateHookSchedule(ctx context.Context, t client.Client, hook *models.Hook) error
- func CreateTarget(ctx context.Context, db *sqlx.DB, target *models.Target) error
- func CreateTrigger(ctx context.Context, db *sqlx.DB, trigger *models.Trigger) error
- func CreateWorkerGroup(ctx context.Context, db *sqlx.DB, workerGroup *models.WorkerGroup) error
- func DeleteCheck(ctx context.Context, db *sqlx.DB, id string) error
- func DeleteCheckSchedule(ctx context.Context, t client.Client, id string) error
- func DeleteHook(ctx context.Context, db *sqlx.DB, id string) error
- func DeleteHookSchedule(ctx context.Context, t client.Client, id string) error
- func DeleteOAuth2State(ctx context.Context, db *sqlx.DB, state string) (deleted bool, err error)
- func DeleteTarget(ctx context.Context, db *sqlx.DB, id string) error
- func DeleteTrigger(ctx context.Context, db *sqlx.DB, id string) error
- func DeleteWorkerGroup(ctx context.Context, db *sqlx.DB, id string) error
- func GetActiveWorkers(ctx context.Context, workerGroupId string, temporal client.Client) ([]string, error)
- func GetCheck(ctx context.Context, db *sqlx.DB, id string) (*models.Check, error)
- func GetCheckState(ctx context.Context, temporal client.Client, id string) (models.CheckState, error)
- func GetCheckWithWorkerGroups(ctx context.Context, db *sqlx.DB, id string) (*models.CheckWithWorkerGroups, error)
- func GetChecks(ctx context.Context, db *sqlx.DB) ([]*models.Check, error)
- func GetChecksWithWorkerGroups(ctx context.Context, db *sqlx.DB) ([]*models.CheckWithWorkerGroups, error)
- func GetHook(ctx context.Context, db *sqlx.DB, id string) (*models.Hook, error)
- func GetHookState(ctx context.Context, temporal client.Client, id string) (models.HookState, error)
- func GetHooks(ctx context.Context, db *sqlx.DB) ([]*models.Hook, error)
- func GetTarget(ctx context.Context, db *sqlx.DB, id string) (*models.Target, error)
- func GetTargets(ctx context.Context, db *sqlx.DB) ([]*models.Target, error)
- func GetTargetsWithFilter(ctx context.Context, db *sqlx.DB, filter string) ([]*models.Target, error)
- func GetTrigger(ctx context.Context, db *sqlx.DB, id string) (*models.Trigger, error)
- func GetTriggers(ctx context.Context, db *sqlx.DB) ([]*models.Trigger, error)
- func GetWorkerGroup(ctx context.Context, db *sqlx.DB, id string) (*models.WorkerGroup, error)
- func GetWorkerGroupWithChecks(ctx context.Context, db *sqlx.DB, id string) (*models.WorkerGroupWithChecks, error)
- func GetWorkerGroups(ctx context.Context, db *sqlx.DB) ([]*models.WorkerGroup, error)
- func GetWorkerGroupsById(ctx context.Context, db *sqlx.DB, ids []string) ([]*models.WorkerGroup, error)
- func GetWorkerGroupsWithChecks(ctx context.Context, db *sqlx.DB) ([]*models.WorkerGroupWithChecks, error)
- func SetCheckState(ctx context.Context, temporal client.Client, id string, ...) error
- func SetHookState(ctx context.Context, temporal client.Client, id string, state models.HookState) error
- func SetTargetState(ctx context.Context, db *sqlx.DB, id string, state models.TargetState) error
- func UpdateCheck(ctx context.Context, db *sqlx.DB, check *models.Check) error
- func UpdateCheckWorkerGroups(ctx context.Context, db *sqlx.DB, check *models.Check, ...) error
- func UpdateHook(ctx context.Context, db *sqlx.DB, hook *models.Hook) error
- func UpdateTarget(ctx context.Context, db *sqlx.DB, target *models.Target) error
- func UpdateTrigger(ctx context.Context, db *sqlx.DB, trigger *models.Trigger) error
- type CheckHistory
- type HookHistory
- type TargetHistory
- type TargetHistoryDateRange
- type TriggerHistory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddHistoryForTarget ¶
func CreateOAuth2State ¶
func CreateTarget ¶
func CreateTrigger ¶
func CreateWorkerGroup ¶
func DeleteCheckSchedule ¶
func DeleteHookSchedule ¶
func DeleteOAuth2State ¶
func GetActiveWorkers ¶
func GetCheckState ¶
func GetHookState ¶
func GetTargetsWithFilter ¶
func GetTrigger ¶
func GetWorkerGroup ¶
func GetWorkerGroups ¶
func GetWorkerGroupsById ¶
func SetCheckState ¶
func SetHookState ¶
func SetTargetState ¶
func UpdateCheckWorkerGroups ¶
func UpdateTarget ¶
Types ¶
type CheckHistory ¶
type CheckHistory struct { CheckId string Status string Duration time.Duration StartTime time.Time EndTime time.Time WorkerGroupName string Note string }
func GetCheckHistoryForCheck ¶
func GetLastNCheckHistory ¶
type HookHistory ¶
type HookHistory struct { HookId string Status string Duration time.Duration StartTime time.Time EndTime time.Time WorkerGroupName string Note string }
func GetHookHistoryForHook ¶
func GetLastNHookHistory ¶
type TargetHistory ¶
type TargetHistory struct { *models.TargetHistory TargetName string `db:"target_name"` WorkerGroupName string `db:"worker_group_name"` CheckName string `db:"check_name"` }
func GetTargetHistoryForTarget ¶
func GetTargetHistoryForTarget(ctx context.Context, db *sqlx.DB, targetId string, dateRange TargetHistoryDateRange) ([]*TargetHistory, error)
type TargetHistoryDateRange ¶
type TargetHistoryDateRange string
const ( TargetHistoryDateRange60Days TargetHistoryDateRange = "60_DAYS" TargetHistoryDateRange48Hours TargetHistoryDateRange = "48_HOURS" TargetHistoryDateRange60Minutes TargetHistoryDateRange = "60_MINUTES" )
Click to show internal directories.
Click to hide internal directories.