freshping_client

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Check

type Check struct {
	ID                 int    `json:"id"`
	Name               string `json:"name"`
	Status             string `json:"status"`
	PerformanceStatus  string `json:"performance_status"`
	AlertNote          string `json:"alert_note"`
	Location           string `json:"location"`
	AlertUsers         []int  `json:"alert_users"`
	AlertContacts      []int  `json:"alert_contacts"`
	MonitoringInterval int    `json:"monitoring_interval"`
	URL                string `json:"url"`
	RequestTimeout     int    `json:"request_timeout"`
	BasicAuthUsername  string `json:"basic_auth_username"`
	BasicAuthPassword  string `json:"basic_auth_password"`
	CommandString      string `json:"command_string"`
	SuccessString      string `json:"success_string"`
	ErrorString        string `json:"error_string"`
}

type CheckListResponse

type CheckListResponse struct {
	Results []Check `json:"results"`
}

type Client

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

func New

func New(options ...ClientOption) *Client

func (*Client) GetCheck

func (c *Client) GetCheck(id int64) (*Check, error)

func (*Client) GetChecks

func (c *Client) GetChecks() ([]Check, error)

func (*Client) GetUsers

func (c *Client) GetUsers() (*UserListResponse, error)

type ClientOption

type ClientOption func(c *Client)

func WithAuth

func WithAuth(apiKey string, subdomain string) ClientOption

type Contact added in v0.2.0

type Contact struct {
	ID    int    `json:"id"`
	Name  string `json:"name"`
	Email string `json:"email"`
}

type User

type User struct {
	ID                        int    `json:"id"`
	Name                      string `json:"name"`
	Email                     string `json:"email"`
	Role                      string `json:"role"`
	DisableWeeklyReportEmails bool   `json:"disable_weekly_report_emails"`
	DisableAlertEmails        bool   `json:"disable_alert_emails"`
}

type UserListResponse

type UserListResponse struct {
	Users    []User    `json:"users"`
	Contacts []Contact `json:"contacts"`
}

Jump to

Keyboard shortcuts

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