Documentation
¶
Index ¶
- type 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
- type BulkResponse
- type Callback
- type 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
- type KontenbaseError
- type LoginParams
- type Message
- type ProfileResponse
- type 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
- type RegisterParams
- type SingleResponse
- type Storage
- type StorageClient
- type StorageSingleResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthClient ¶
type AuthClient struct {
// contains filtered or unexported fields
}
func NewAuthClient ¶
func NewAuthClient(url string, headers map[string]string) *AuthClient
func (*AuthClient) Login ¶
func (a *AuthClient) Login(body LoginParams) (*AuthResponse, *KontenbaseError)
func (*AuthClient) Logout ¶
func (a *AuthClient) Logout() (*AuthResponse, *KontenbaseError)
func (*AuthClient) Register ¶
func (a *AuthClient) Register(body RegisterParams) (*AuthResponse, *KontenbaseError)
func (*AuthClient) SaveToken ¶
func (a *AuthClient) SaveToken(token string)
func (*AuthClient) Token ¶
func (a *AuthClient) Token() string
func (*AuthClient) Update ¶
func (a *AuthClient) Update(body map[string]interface{}) (*ProfileResponse, *KontenbaseError)
func (*AuthClient) User ¶
func (a *AuthClient) User(opts ...*options.UserOptions) (*ProfileResponse, *KontenbaseError)
type AuthResponse ¶
type BulkResponse ¶
type HTTPClient ¶
type HTTPClient struct {
// contains filtered or unexported fields
}
func NewHTTPClient ¶
func NewHTTPClient(baseUrl string, headers map[string]string) *HTTPClient
func (*HTTPClient) Delete ¶
func (h *HTTPClient) Delete(path string, headers map[string]string) (*HTTPResponse, *KontenbaseError)
func (*HTTPClient) Get ¶
func (h *HTTPClient) Get(path string, headers map[string]string) (*HTTPResponse, *KontenbaseError)
func (*HTTPClient) Patch ¶
func (h *HTTPClient) Patch(path string, rawBody interface{}, headers map[string]string) (*HTTPResponse, *KontenbaseError)
func (*HTTPClient) Post ¶
func (h *HTTPClient) Post(path string, rawBody interface{}, headers map[string]string) (*HTTPResponse, *KontenbaseError)
func (*HTTPClient) Send ¶
func (h *HTTPClient) Send(method string, path string, rawBody interface{}, headers map[string]string) (*HTTPResponse, *KontenbaseError)
type HTTPResponse ¶
type KontenbaseError ¶
type KontenbaseError struct { Message string `json:"message"` Status int `json:"status"` StatusText string `json:"statusText"` }
func (*KontenbaseError) Error ¶
func (err *KontenbaseError) Error() string
type LoginParams ¶
type ProfileResponse ¶
type QueryClient ¶
type QueryClient struct {
// contains filtered or unexported fields
}
func NewQueryClient ¶
func NewQueryClient(url string, headers map[string]string) *QueryClient
func (*QueryClient) Count ¶
func (q *QueryClient) Count(opts ...*options.CountOptions) (*SingleResponse, *KontenbaseError)
func (*QueryClient) Create ¶
func (q *QueryClient) Create(body map[string]interface{}) (*SingleResponse, *KontenbaseError)
func (*QueryClient) DeleteByID ¶
func (q *QueryClient) DeleteByID(id string) (*SingleResponse, *KontenbaseError)
func (*QueryClient) Find ¶
func (q *QueryClient) Find(opts ...*options.FindOptions) (*BulkResponse, *KontenbaseError)
func (*QueryClient) GetByID ¶
func (q *QueryClient) GetByID(id string, opts ...*options.GetByIDOptions) (*SingleResponse, *KontenbaseError)
func (*QueryClient) Link ¶
func (q *QueryClient) Link(id string, body map[string]interface{}) (*SingleResponse, *KontenbaseError)
func (*QueryClient) Unlink ¶
func (q *QueryClient) Unlink(id string, body map[string]interface{}) (*SingleResponse, *KontenbaseError)
func (*QueryClient) UpdateByID ¶
func (q *QueryClient) UpdateByID(id string, body map[string]interface{}) (*SingleResponse, *KontenbaseError)
type RealtimeClient ¶
type RealtimeClient struct {
// contains filtered or unexported fields
}
func NewRealtimeClient ¶
func NewRealtimeClient(url string, apiKey string, auth *AuthClient) *RealtimeClient
func (*RealtimeClient) Close ¶
func (r *RealtimeClient) Close() error
func (*RealtimeClient) Subscribe ¶
func (r *RealtimeClient) Subscribe(name string, opts options.SubscribeOptions) (string, error)
func (*RealtimeClient) Unsubscribe ¶
func (r *RealtimeClient) Unsubscribe(key string) error
type RegisterParams ¶
type SingleResponse ¶
type StorageClient ¶
type StorageClient struct {
// contains filtered or unexported fields
}
func NewStorageClient ¶
func NewStorageClient(url string, auth *AuthClient) *StorageClient
func (*StorageClient) Upload ¶
func (s *StorageClient) Upload(file io.Reader) (*StorageSingleResponse, *KontenbaseError)
type StorageSingleResponse ¶
Click to show internal directories.
Click to hide internal directories.