Documentation
¶
Overview ¶
Package httpclient is a client of the heartbeats' HTTP API
Index ¶
- type Client
- func (c *Client) CreateHeartbeat(ctx context.Context, meta schema.HeartbeatMeta) (*schema.Heartbeat, error)
- func (c *Client) DeleteHeartbeat(ctx context.Context, id uuid.UUID) (*schema.Heartbeat, error)
- func (c *Client) GetHeartbeat(ctx context.Context, id uuid.UUID) (*schema.Heartbeat, error)
- func (c *Client) ListHeartbeats(ctx context.Context, req schema.HeartbeatListRequest) (*schema.HeartbeatList, error)
- func (c *Client) UpdateHeartbeat(ctx context.Context, id uuid.UUID, change schema.HeartbeatRequest) (*schema.Heartbeat, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client is a client of the heartbeats' HTTP API, which wraps the base HTTP client, with typed methods for its requests
func New ¶
New returns a client of the heartbeats' API, at the URL, which is the server's API endpoint, such as http://localhost:8084/api, with the options
func (*Client) CreateHeartbeat ¶
func (c *Client) CreateHeartbeat(ctx context.Context, meta schema.HeartbeatMeta) (*schema.Heartbeat, error)
CreateHeartbeat creates the heartbeat, and returns it
func (*Client) DeleteHeartbeat ¶
DeleteHeartbeat deletes the heartbeat with the identifier, and returns it, as it was
func (*Client) GetHeartbeat ¶
GetHeartbeat returns the heartbeat with the identifier
func (*Client) ListHeartbeats ¶
func (c *Client) ListHeartbeats(ctx context.Context, req schema.HeartbeatListRequest) (*schema.HeartbeatList, error)
ListHeartbeats returns the heartbeats, the soonest first, as the request selects, and how many there are