Documentation
¶
Index ¶
- func GetDefaultClient(timeout time.Duration) (*http.Client, error)
- type AppwriteError
- type Client
- func (client *Client) AddHeader(key string, value string)
- func (client *Client) Call(method string, path string, headers map[string]interface{}, ...) (*ClientResponse, error)
- func (client *Client) FileUpload(url string, headers map[string]interface{}, params map[string]interface{}, ...) (*ClientResponse, error)
- func (client *Client) String() string
- type ClientOption
- type ClientResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AppwriteError ¶
type AppwriteError struct {
// contains filtered or unexported fields
}
AppwriteError represents an error of a client request
func (*AppwriteError) Error ¶
func (ce *AppwriteError) Error() string
func (*AppwriteError) GetMessage ¶
func (ce *AppwriteError) GetMessage() string
func (*AppwriteError) GetResponse ¶ added in v0.7.0
func (ce *AppwriteError) GetResponse() string
func (*AppwriteError) GetStatusCode ¶
func (ce *AppwriteError) GetStatusCode() int
type Client ¶
type Client struct { Client *http.Client Headers map[string]string Endpoint string Timeout time.Duration SelfSigned bool ChunkSize int64 }
Client is the client struct to access Appwrite services
func New ¶
func New(optionalSetters ...ClientOption) Client
Initialize a new Appwrite client with a given timeout
func (*Client) AddHeader ¶
AddHeader add a new custom header that the Client should send on each request
func (*Client) Call ¶
func (client *Client) Call(method string, path string, headers map[string]interface{}, params map[string]interface{}) (*ClientResponse, error)
Call an API using Client
func (*Client) FileUpload ¶
type ClientOption ¶
Click to show internal directories.
Click to hide internal directories.