Documentation
¶
Index ¶
- Variables
- func KeyFromURL(url string) (id, share string, err error)
- type Client
- func (c *Client) Do(r *http.Request, v any) (resp *http.Response, err error)
- func (c *Client) FollowRedirect(r *http.Request, v any, delay time.Duration) (resp *http.Response, err error)
- func (c *Client) FollowRedirectLoop(r *http.Request, v any, delay time.Duration) (resp *http.Response, err error)
- func (c *Client) NewRequest(ctx context.Context, method, path string, body io.Reader) (*http.Request, error)
- type ClientOption
- func ClientOptionsFromConfig(cfg Config) (options []ClientOption, err error)
- func ClientOptionsFromEnv() (options []ClientOption, err error)
- func ClientOptionsFromURL(url string) (options []ClientOption, err error)
- func WithDebugWriter(debugWriter io.Writer) ClientOption
- func WithEndpoint(endpoint string) ClientOption
- func WithHTTPClient(httpClient *http.Client) ClientOption
- type Config
- type Error
- type Redirect
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMissingEndpointEnv = errors.New("missing environment variable KEYCTL_ENDPOINT") ErrMissingEndpointInURL = errors.New("missing host in URL") ErrMissingIDInURL = errors.New("missing ID in URL") ErrUnsupportedScheme = errors.New("unsupported scheme") ErrMissingEndpoint = errors.New("missing Endpoint in config") )
View Source
var (
ErrNotFound = errors.New("not found")
)
View Source
var ErrRedirect = Redirect{}