dmsnitch

package
v0.1.5-0...-0f7876f Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2021 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BaseUrl string = "https://api.deadmanssnitch.com/v1/"
)

Variables

This section is empty.

Functions

func Provider

func Provider() terraform.ResourceProvider

Types

type DMSnitchClient

type DMSnitchClient struct {
	ApiKey     string
	HTTPClient *http.Client
}

func (*DMSnitchClient) Delete

func (c *DMSnitchClient) Delete(endpoint string) (*http.Response, error)

func (*DMSnitchClient) Do

func (c *DMSnitchClient) Do(method, endpoint string, payload *bytes.Buffer) (*http.Response, error)

func (*DMSnitchClient) Get

func (c *DMSnitchClient) Get(endpoint string) (*http.Response, error)

func (*DMSnitchClient) Patch

func (c *DMSnitchClient) Patch(endpoint string, jsonpayload *bytes.Buffer) (*http.Response, error)

func (*DMSnitchClient) Post

func (c *DMSnitchClient) Post(endpoint string, jsonpayload *bytes.Buffer) (*http.Response, error)

type Error

type Error struct {
	Validations types.Array `json:"validations,omitempty"`
	Message     string      `json:"error,omitempty"`
	Type        string      `json:"type,omitempty"`
	StatusCode  int
	Endpoint    string
}

func (Error) Error

func (e Error) Error() string

type Snitch

type Snitch struct {
	Token    string   `json:"token,omitempty"`
	Url      string   `json:"check_in_url,omitempty"`
	Name     string   `json:"name,omitempty"`
	Status   string   `json:"status,omitempty"`
	Interval string   `json:"interval,omitempty"`
	Type     string   `json:"alert_type,omitempty"`
	Email    []string `json:"alert_email,omitempty"`
	Notes    string   `json:"notes,omitempty"`
	Tags     []string `json:"tags,omitempty"`
}

Jump to

Keyboard shortcuts

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