api

package
v0.0.0-...-64c01a7 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alert

type Alert struct {
	ID        string  `json:"id"`
	Subject   string  `json:"subject"`
	Status    string  `json:"status"`
	StartDate string  `json:"start_date"`
	UpdatedAt string  `json:"updated_at"`
	Entries   []Entry `json:"entries"`
}

type Alerts

type Alerts struct {
	ServiceAlerts []ServiceAlert `json:"service_alerts"`
}

type Client

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

Client is a type that represents a client of Vultr Status

func NewClient

func NewClient() *Client

NewClient is a function that creates a new Client

func (*Client) Alerts

func (c *Client) Alerts() (*Alerts, error)

Alerts is a method that corresponds to the Vultr Status Alert method

func (*Client) Do

func (c *Client) Do(ctx context.Context, method, url string, body io.Reader) ([]byte, error)

Do is a method that implements requests against Vultr Status

func (*Client) Status

func (c *Client) Status() (*Status, error)

Status is a method that corresponds to the Vultr Status Status method

type Entry

type Entry struct {
	UpdatedAt string `json:"updated_at"`
	Message   string `json:"message"`
}

type Region

type Region struct {
	Location    string  `json:"location"`
	Country     string  `json:"country"`
	CountryName string  `json:"country_name"`
	Alerts      []Alert `json:"alerts"`
}

type ServiceAlert

type ServiceAlert struct {
	ID        string  `json:"id"`
	Region    string  `json:"region"`
	Subject   string  `json:"subject"`
	StartDate string  `json:"start_date"`
	UpdatedAt string  `json:"updated_at"`
	Status    string  `json:"status"`
	Entries   []Entry `json:"entries"`
}

type Status

type Status struct {
	ServiceAlerts []ServiceAlert    `json:"service_alerts"`
	Regions       map[string]Region `json:"regions"`
}

Jump to

Keyboard shortcuts

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