uptime

package
v0.0.0-...-e95c352 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version    string
	CommitHash string
)

Functions

This section is empty.

Types

type CheckTag

type CheckTag struct {
	Pk       uint   `json:"pk,omitempty"`
	Url      string `json:"url,omitempty"`
	Name     string `json:"tag"`
	ColorHex string `json:"color_hex"`
}

https://uptime.com/api/v1/docs/#/check-tags/get_service_tag_detail

type CheckTagListResult

type CheckTagListResult struct {
	Count    uint       `json:"count"`
	Next     *uint      `json:"next"`
	Previous *uint      `json:"previous"`
	Results  []CheckTag `json:"results"`
}

https://uptime.com/api/v1/docs/#/check-tags/get_servicetaglist

type CheckTagPostResult

type CheckTagPostResult struct {
	Count    uint     `json:"count"`
	Next     *uint    `json:"next"`
	Previous *uint    `json:"previous"`
	Results  CheckTag `json:"results"`
}

https://uptime.com/api/v1/docs/#/check-tags/post_servicetaglist

type ClientCredentials

type ClientCredentials struct {
	Token    string
	Email    string
	Password string
}

type UptimeClient

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

func NewClient

func NewClient(ctx context.Context, baseUrl, subaccount, token, email, password string) (*UptimeClient, error)

func (*UptimeClient) DeleteCheckTag

func (c *UptimeClient) DeleteCheckTag(ctx context.Context, pk uint) error

func (*UptimeClient) GetCheckTag

func (c *UptimeClient) GetCheckTag(ctx context.Context, pk uint) (*CheckTag, error)

func (*UptimeClient) GetCheckTags

func (c *UptimeClient) GetCheckTags(ctx context.Context) ([]CheckTag, error)

func (*UptimeClient) NewCheckTag

func (c *UptimeClient) NewCheckTag(ctx context.Context, checkTag *CheckTag) (pk uint, err error)

func (*UptimeClient) UpdateCheckTag

func (c *UptimeClient) UpdateCheckTag(ctx context.Context, checkTag *CheckTag) error

Jump to

Keyboard shortcuts

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