Documentation ¶
Index ¶
- type Client
- func (c *Client) BasePath() string
- func (c *Client) DeleteResource(r Resource) error
- func (c *Client) Get(path string) ([]byte, error)
- func (c *Client) GetDataInstance(uri string) (*DataInstance, error)
- func (c *Client) GetProduct(uri string) (*Product, error)
- func (c *Client) GetResource(uri string) (Resource, error)
- func (c *Client) GetServiceBackend(uri string) (*ServiceBackend, error)
- func (c *Client) ResourcePath(resource string) string
- type DataInstance
- type Product
- type Resource
- type ServiceBackend
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 (*Client) BasePath ¶
BasePath returns the start URI of all requests, currently at API version 1.
func (*Client) DeleteResource ¶
DeleteResource marks a Resource as deleted through a PATCH request.
func (*Client) Get ¶
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 ¶
GetProduct returns a Product resource.
func (*Client) GetResource ¶
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 ¶
ResourcePath returns the URI of a resource endpoint.
type DataInstance ¶
DataInstance represents a DataInstancestatus DataInstance resource.
type Product ¶
type Product struct {
// contains filtered or unexported fields
}
Product represents a Productstatus Product resource.
type Resource ¶
type Resource interface {
URI() string
}
Resource represents any Productstatus resource.
func NewDataInstance ¶
func NewDataInstance() Resource
NewDataInstance returns a DataInstance 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.