productstatus

package
v0.0.0-...-a204362 Latest Latest
Warning

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

Go to latest
Published: May 12, 2017 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client represents a Productstatus API client.

func New

func New(rawurl string, username string, apiKey string) (*Client, error)

New returns a new Productstatus client

func (*Client) BasePath

func (c *Client) BasePath() string

BasePath returns the start URI of all requests, currently at API version 1.

func (*Client) DeleteResource

func (c *Client) DeleteResource(r Resource) error

DeleteResource marks a Resource as deleted through a PATCH request.

func (*Client) Get

func (c *Client) Get(path string) ([]byte, error)

Get takes a path, queries the server, checks the response code, and returns a byte slice with the object body.

func (*Client) GetDataInstance

func (c *Client) GetDataInstance(uri string) (*DataInstance, error)

GetDataInstance returns a DataInstance resource.

func (*Client) GetProduct

func (c *Client) GetProduct(uri string) (*Product, error)

GetProduct returns a Product resource.

func (*Client) GetResource

func (c *Client) GetResource(uri string) (Resource, error)

GetResource takes a URI, queries Productstatus, and returns a Resource.

func (*Client) GetServiceBackend

func (c *Client) GetServiceBackend(uri string) (*ServiceBackend, error)

GetServiceBackend returns a ServiceBackend resource.

func (*Client) ResourcePath

func (c *Client) ResourcePath(resource string) string

ResourcePath returns the URI of a resource endpoint.

type DataInstance

type DataInstance struct {
	Url     string
	Expires string
	// contains filtered or unexported fields
}

DataInstance represents a DataInstancestatus DataInstance resource.

func (*DataInstance) URI

func (r *DataInstance) URI() string

URI implements Resource.

type Product

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

Product represents a Productstatus Product resource.

func (*Product) URI

func (r *Product) URI() string

URI implements Resource.

type Resource

type Resource interface {
	URI() string
}

Resource represents any Productstatus resource.

func NewDataInstance

func NewDataInstance() Resource

NewDataInstance returns a DataInstance resource.

func NewProduct

func NewProduct() Resource

NewProduct returns a Product resource.

func NewServiceBackend

func NewServiceBackend() Resource

NewServiceBackend returns a ServiceBackend resource.

type ServiceBackend

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

ServiceBackend represents a Productstatus ServiceBackend resource.

func (*ServiceBackend) URI

func (r *ServiceBackend) URI() string

URI implements Resource.

Jump to

Keyboard shortcuts

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