Documentation
¶
Index ¶
- func EzDiff(m1 Monitor, m2 Monitor) string
- func GetAWSConfig(ctx context.Context) aws.Config
- func GetRemote(path string, cli HClient) ([]byte, error)
- func PatchRemote(cli HClient, path string, obj []byte) ([]byte, error)
- func PostRemote(cli HClient, path string, obj []byte) ([]byte, error)
- func SaveToFile(monitor []Monitor, path string) error
- func SaveToS3(ctx context.Context, monitor []Monitor, path string, uploader MyUploader) error
- func SelectiveCompare(m1 Monitor, m2 Monitor) bool
- type HClient
- type Monitor
- type Monitors
- type MyDownloader
- type MyUploader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SaveToFile ¶
func SelectiveCompare ¶
Types ¶
type Monitor ¶
type Monitor struct {
ID string `json:"id,omitempty"`
Type string `json:"type,omitempty"`
URL string `json:"url,omitempty"`
PronounceableName string `json:"pronounceable_name,omitempty"`
AuthUsername string `json:"auth_username,omitempty"`
AuthPassword string `json:"auth_password,omitempty"`
MonitorType string `json:"monitor_type,omitempty"`
MonitorGroupID any `json:"monitor_group_id,omitempty"`
LastCheckedAt *time.Time `json:"last_checked_at,omitempty"`
Status string `json:"status,omitempty"`
PolicyID any `json:"policy_id,omitempty"`
RequiredKeyword string `json:"required_keyword,omitempty"`
VerifySsl bool `json:"verify_ssl,omitempty"`
CheckFrequency int `json:"check_frequency,omitempty"`
Call bool `json:"call,omitempty"`
Sms bool `json:"sms,omitempty"`
Email bool `json:"email,omitempty"`
Push bool `json:"push,omitempty"`
TeamWait any `json:"team_wait,omitempty"`
HTTPMethod string `json:"http_method,omitempty"`
RequestTimeout int `json:"request_timeout,omitempty"`
RecoveryPeriod int `json:"recovery_period,omitempty"`
RequestHeaders []any `json:"request_headers,omitempty"`
RequestBody string `json:"request_body,omitempty"`
FollowRedirects bool `json:"follow_redirects,omitempty"`
RememberCookies bool `json:"remember_cookies,omitempty"`
CreatedAt *time.Time `json:"created_at,omitempty"`
UpdatedAt *time.Time `json:"updated_at,omitempty"`
SslExpiration any `json:"ssl_expiration,omitempty"`
DomainExpiration any `json:"domain_expiration,omitempty"`
Regions []string `json:"regions,omitempty"`
ExpectedStatusCodes []int `json:"expected_status_codes,omitempty"`
Port any `json:"port,omitempty"`
ConfirmationPeriod int `json:"confirmation_period,omitempty"`
PausedAt any `json:"paused_at,omitempty"`
Paused *bool `json:"paused,omitempty"`
MaintenanceFrom any `json:"maintenance_from,omitempty"`
MaintenanceTo any `json:"maintenance_to,omitempty"`
MaintenanceTimezone string `json:"maintenance_timezone,omitempty"`
}
func LoadFromFile ¶
func LoadFromS3 ¶
call as LoadFromS3(ctx, "monitors.json", manager.NewDownloader(client))
type MyDownloader ¶
type MyDownloader interface {
Download(ctx context.Context, w io.WriterAt, input *s3.GetObjectInput, opts ...func(*manager.Downloader)) (n int64, err error)
}
type MyUploader ¶
type MyUploader interface {
Upload(ctx context.Context, input *s3.PutObjectInput, opts ...func(*manager.Uploader)) (*manager.UploadOutput, error)
}
Click to show internal directories.
Click to hide internal directories.