statusio

package
v0.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 27, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Component

type Component struct {
	Name string `json:"name"`
}

type IncidentRaw

type IncidentRaw struct {
	Name      string `json:"name"`
	Message   string `json:"message"`
	Timestamp string `json:"timestamp"`
	Code      string `json:"code"`
	Impact    string `json:"impact"`
}

type Month

type Month struct {
	Incidents []IncidentRaw `json:"incidents"`
	Year      int           `json:"year"`
	Month     string        `json:"name"`
}

type PageStatus

type PageStatus struct {
	Components []Component `json:"components"`
	Months     []Month     `json:"months"`
}

Additional structs to capture the overall structure of the JSON

type StatusioProvider

type StatusioProvider struct {
	// contains filtered or unexported fields
}

func NewStatusioProvider

func NewStatusioProvider(logger *zap.Logger, httpClient *http.Client) *StatusioProvider

func (*StatusioProvider) Name

func (s *StatusioProvider) Name() string

func (*StatusioProvider) ScrapeStatusPageCurrent

func (s *StatusioProvider) ScrapeStatusPageCurrent(ctx context.Context, url string) ([]api.Incident, error)

func (*StatusioProvider) ScrapeStatusPageHistorical

func (s *StatusioProvider) ScrapeStatusPageHistorical(ctx context.Context, url string) ([]api.Incident, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL