Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { // Session management Username string // contains filtered or unexported fields }
Client represents a Hydra API client.
func (*Client) DoRequest ¶
func (c *Client) DoRequest(ctx context.Context, method, path string, body interface{}, v interface{}) error
DoRequest performs an HTTP request.
func (*Client) GetUsername ¶
GetUsername returns the username of the authenticated user.
func (*Client) IsAuthenticated ¶
IsAuthenticated returns true if the client has an active session.
func (*Client) SetBaseURL ¶
SetBaseURL updates the base URL of the client.
type Option ¶
type Option func(*Client)
Option represents a client configuration option.
func WithHTTPClient ¶
WithHTTPClient sets a custom HTTP client.
func WithTimeout ¶
WithTimeout sets the HTTP client timeout.
func WithUserAgent ¶
WithUserAgent sets a custom user agent.
Click to show internal directories.
Click to hide internal directories.