Documentation
¶
Index ¶
- type APIError
- type Client
- func (c *Client) Context() (context.Context, context.CancelFunc)
- func (c *Client) Delete(ctx context.Context, path string) error
- func (c *Client) Do(ctx context.Context, method, path string, body interface{}, result interface{}) error
- func (c *Client) Get(ctx context.Context, path string, result interface{}) error
- func (c *Client) GetEndpoint() string
- func (c *Client) GetProjectID() string
- func (c *Client) ListAll(ctx context.Context, path string, limit int, itemsKey string, ...) error
- func (c *Client) Patch(ctx context.Context, path string, body, result interface{}) error
- func (c *Client) Post(ctx context.Context, path string, body, result interface{}) error
- func (c *Client) Put(ctx context.Context, path string, body, result interface{}) error
- type ListResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIError ¶
type APIError struct {
StatusCode int `json:"-"`
Message string `json:"message"`
Code int `json:"code,omitempty"`
Type string `json:"type,omitempty"`
Version string `json:"version,omitempty"`
}
APIError represents a structured error from the Appwrite API
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client wraps the Appwrite API client
func (*Client) Context ¶
func (c *Client) Context() (context.Context, context.CancelFunc)
Context returns a context with timeout
func (*Client) Do ¶
func (c *Client) Do(ctx context.Context, method, path string, body interface{}, result interface{}) error
Do executes an API request
func (*Client) GetEndpoint ¶
GetEndpoint returns the API endpoint
func (*Client) GetProjectID ¶
GetProjectID returns the project ID
func (*Client) ListAll ¶
func (c *Client) ListAll(ctx context.Context, path string, limit int, itemsKey string, collector func(json.RawMessage) error) error
ListAll fetches all pages using offset-based pagination
type ListResponse ¶
type ListResponse struct {
Total int `json:"total"`
Items json.RawMessage `json:"-"`
}
ListResponse represents a paginated list response from Appwrite
Click to show internal directories.
Click to hide internal directories.