Documentation
¶
Overview ¶
Package taiga is an HTTP client for the Taiga REST API v1.
Index ¶
- func ToOutput(err error) *output.Error
- type APIError
- type Client
- func (c *Client) BaseURL() string
- func (c *Client) Do(ctx context.Context, r Request) (*Response, error)
- func (c *Client) GetAll(ctx context.Context, path string, q url.Values) ([]json.RawMessage, error)
- func (c *Client) PrepareVersioned(ctx context.Context, path string, patch map[string]any) (map[string]any, map[string]json.RawMessage, error)
- func (c *Client) WriteVersioned(ctx context.Context, method, path string, patch map[string]any, force bool) (*Response, error)
- type ConflictError
- type NetworkError
- type Option
- type Request
- type Response
- type StaticToken
- type Token
- type TokenSource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type APIError ¶
APIError is a non-2xx response from Taiga.
func (*APIError) IsVersionConflict ¶
IsVersionConflict reports Taiga's optimistic-concurrency rejection (409, or 400 with a "version" key).
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func New ¶
func New(baseURL string, ts TokenSource, opts ...Option) *Client
New builds a client for baseURL (scheme://host, already normalized).
func (*Client) GetAll ¶
GetAll returns every item of a list endpoint, asking Taiga to disable pagination and, if it paginates anyway, following the page number announced in X-Pagination-Next.
type ConflictError ¶
ConflictError means another writer changed the fields we are updating.
func (*ConflictError) Error ¶
func (e *ConflictError) Error() string
type NetworkError ¶
NetworkError wraps transport failures.
func (*NetworkError) Error ¶
func (e *NetworkError) Error() string
func (*NetworkError) Unwrap ¶
func (e *NetworkError) Unwrap() error
Click to show internal directories.
Click to hide internal directories.