Versions in this module Expand all Collapse all v0 v0.1.0 May 15, 2024 Changes in this version + type App struct + func NewApp(ctx context.Context, slackBotToken string, slackChannel string, ...) (*App, error) + func NewAppWithClient(redshiftClient GetUsageLimitAPIClient, slackClient PostMessageAPIClient, ...) *App + func (app *App) Handler(ctx context.Context, raw json.RawMessage) (interface{}, error) + func (app *App) SendReport(ctx context.Context, message CloudWatchAlermMessage) error + type AppOption func(*App) + func WithLogger(logger *slog.Logger) AppOption + func WithReportTemplate(tmpl *template.Template) AppOption + func WithRetryCount(count int) AppOption + type CloudWatchAlermMessage struct + AWSAccountID string + AWSRegion string + AlarmArn string + AlarmConfigurationUpdatedTimestamp string + AlarmDescription *string + AlarmName string + NewStateReason string + NewStateValue string + OldStateValue string + StateChangeTime string + Trigger CloudWatchAlermMessageTrigger + func (m *CloudWatchAlermMessage) IsRedshiftServerlessLimitUsage() bool + func (m *CloudWatchAlermMessage) UsageLimitID() string + func (m *CloudWatchAlermMessage) WorkgroupName() string + type CloudWatchAlermMessageTrigger struct + ComparisonOperator string + Dimensions []CloudWatchAlermMessageTriggerDimension + EvaluateLowSampleCountPercentile string + EvaluationPeriods int + MetricName string + Namespace string + Period int + Statistic string + StatisticType string + Threshold float64 + TreatMissingData string + Unit any + type CloudWatchAlermMessageTriggerDimension struct + Name string + Value string + type GetUsageLimitAPIClient interface + GetUsageLimit func(ctx context.Context, params *redshiftserverless.GetUsageLimitInput, ...) (*redshiftserverless.GetUsageLimitOutput, error) + type PostMessageAPIClient interface + PostMessageContext func(ctx context.Context, channel string, opts ...slack.MsgOption) (string, string, error)