Versions in this module Expand all Collapse all v0 v0.0.3 Nov 3, 2022 v0.0.2 Nov 3, 2022 Changes in this version + type AuthClient struct + func NewAuthClient(url string, headers map[string]string) *AuthClient + func (a *AuthClient) Login(body LoginParams) (*AuthResponse, *KontenbaseError) + func (a *AuthClient) Logout() (*AuthResponse, *KontenbaseError) + func (a *AuthClient) Register(body RegisterParams) (*AuthResponse, *KontenbaseError) + func (a *AuthClient) SaveToken(token string) + func (a *AuthClient) Token() string + func (a *AuthClient) Update(body map[string]interface{}) (*ProfileResponse, *KontenbaseError) + func (a *AuthClient) User(opts ...*options.UserOptions) (*ProfileResponse, *KontenbaseError) + type AuthResponse struct + Status int + StatusText string + Token string + User map[string]interface{} + type BulkResponse struct + Data []map[string]interface{} + Limit int + Skip int + Status int + StatusText string + type Callback func(event string, payload map[string]interface{}) error + type HTTPClient struct + func NewHTTPClient(baseUrl string, headers map[string]string) *HTTPClient + func (h *HTTPClient) Delete(path string, headers map[string]string) (*HTTPResponse, *KontenbaseError) + func (h *HTTPClient) Get(path string, headers map[string]string) (*HTTPResponse, *KontenbaseError) + func (h *HTTPClient) Patch(path string, rawBody interface{}, headers map[string]string) (*HTTPResponse, *KontenbaseError) + func (h *HTTPClient) Post(path string, rawBody interface{}, headers map[string]string) (*HTTPResponse, *KontenbaseError) + func (h *HTTPClient) Send(method string, path string, rawBody interface{}, headers map[string]string) (*HTTPResponse, *KontenbaseError) + type HTTPResponse struct + Data interface{} + Header http.Header + StatusCode int + StatusText string + type KontenbaseError struct + Message string + Status int + StatusText string + func (err *KontenbaseError) Error() string + type LoginParams struct + Email string + Password string + type Message struct + Event string + Payload map[string]interface{} + type ProfileResponse struct + Status int + StatusText string + User map[string]interface{} + type QueryClient struct + func NewQueryClient(url string, headers map[string]string) *QueryClient + func (q *QueryClient) Count(opts ...*options.CountOptions) (*SingleResponse, *KontenbaseError) + func (q *QueryClient) Create(body map[string]interface{}) (*SingleResponse, *KontenbaseError) + func (q *QueryClient) DeleteByID(id string) (*SingleResponse, *KontenbaseError) + func (q *QueryClient) Find(opts ...*options.FindOptions) (*BulkResponse, *KontenbaseError) + func (q *QueryClient) GetByID(id string, opts ...*options.GetByIDOptions) (*SingleResponse, *KontenbaseError) + func (q *QueryClient) Link(id string, body map[string]interface{}) (*SingleResponse, *KontenbaseError) + func (q *QueryClient) Unlink(id string, body map[string]interface{}) (*SingleResponse, *KontenbaseError) + func (q *QueryClient) UpdateByID(id string, body map[string]interface{}) (*SingleResponse, *KontenbaseError) + type RealtimeClient struct + func NewRealtimeClient(url string, apiKey string, auth *AuthClient) *RealtimeClient + func (r *RealtimeClient) Close() error + func (r *RealtimeClient) Subscribe(name string, opts options.SubscribeOptions) (string, error) + func (r *RealtimeClient) Unsubscribe(key string) error + type RegisterParams struct + Email string + FirstName string + Password string + type SingleResponse struct + Data map[string]interface{} + Status int + StatusText string + type Storage struct + FileName string + MimeType string + Size int64 + URL string + type StorageClient struct + func NewStorageClient(url string, auth *AuthClient) *StorageClient + func (s *StorageClient) Upload(file io.Reader) (*StorageSingleResponse, *KontenbaseError) + type StorageSingleResponse struct + Data Storage + Status int + StatusText string