Documentation
¶
Index ¶
- type Client
- func (c *Client) DeleteWithAuth(ctx context.Context, path string) (*Response, error)
- func (c *Client) Get(ctx context.Context, path string) (*Response, error)
- func (c *Client) GetWithAuth(ctx context.Context, path string) (*Response, error)
- func (c *Client) PostJSON(ctx context.Context, path string, body any) (*Response, error)
- func (c *Client) PostJSONWithAuth(ctx context.Context, path string, body any) (*Response, error)
- func (c *Client) PostMultipart(ctx context.Context, path string, body io.Reader, contentType string) (*Response, error)
- func (c *Client) SetAuth(token string)
- func (c *Client) SetDebug(enabled bool)
- func (c *Client) SetDryRun(enabled bool)
- func (c *Client) SetDryRunOutput(w io.Writer)
- func (c *Client) SetOrg(orgID string)
- func (c *Client) UploadFile(ctx context.Context, path, filePath string) (*Response, error)
- func (c *Client) ValidateAuth(ctx context.Context) error
- type Response
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 is the Taufinity API client with retry/backoff and auth support.
func (*Client) DeleteWithAuth ¶
DeleteWithAuth performs an authenticated DELETE request.
func (*Client) GetWithAuth ¶
GetWithAuth performs an authenticated GET request.
func (*Client) PostJSONWithAuth ¶
PostJSONWithAuth performs an authenticated POST request with JSON body.
func (*Client) PostMultipart ¶
func (c *Client) PostMultipart(ctx context.Context, path string, body io.Reader, contentType string) (*Response, error)
PostMultipart performs an authenticated POST request with multipart form data.
func (*Client) SetDebug ¶
SetDebug enables or disables debug request logging via a structured slog logger. When enabled, all HTTP requests and non-2xx responses are logged to stderr at Debug level.
func (*Client) SetDryRun ¶
SetDryRun enables or disables dry-run mode. In dry-run mode, non-GET requests are logged but not executed.
func (*Client) SetDryRunOutput ¶
SetDryRunOutput sets the writer for dry-run output.
func (*Client) UploadFile ¶
UploadFile performs a multipart file upload.