Documentation
¶
Index ¶
- Constants
- type Client
- func (cli *Client) Checker(ctx context.Context, check *health.CheckState) error
- func (cli *Client) GetRedirect(ctx context.Context, options Options, key string) (*models.Redirect, apiError.Error)
- func (cli *Client) Health() *healthcheck.Client
- func (cli *Client) PutRedirect(ctx context.Context, options Options, id string, payload models.Redirect) apiError.Error
- func (cli *Client) URL() string
- type Options
- type ResponseInfo
Constants ¶
View Source
const ( // List of available headers Authorization string = request.AuthHeaderKey )
View Source
const (
RedirectEndpoint = "%s/v1/redirects/%s"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewWithHealthClient ¶
func NewWithHealthClient(hcCli *healthcheck.Client) *Client
NewWithHealthClient creates a new instance of redirect API Client, reusing the URL and Clienter from the provided healthcheck client
func (*Client) Checker ¶
Checker calls redirect api health endpoint and returns a check object to the caller
func (*Client) GetRedirect ¶ added in v0.3.0
func (cli *Client) GetRedirect(ctx context.Context, options Options, key string) (*models.Redirect, apiError.Error)
GetRedirect gets the /redirects/{id} endpoint
func (*Client) Health ¶
func (cli *Client) Health() *healthcheck.Client
Health returns the underlying Healthcheck Client for this redirect API client
Click to show internal directories.
Click to hide internal directories.