Documentation
¶
Index ¶
- type BuildInfo
- type Client
- func (c *Client) AdminRepositoryReset() (*generated.RepositoryResetResponse, error)
- func (c *Client) AttachmentExists(attachmentID string) (bool, error)
- func (c *Client) ChangeOwnPassword(reqBody UserChangePasswordRequest) error
- func (c *Client) CreateUser(reqBody UserCreateRequest) (map[string]interface{}, error)
- func (c *Client) DeleteUser(username string) error
- func (c *Client) DownloadAppBundleFile(path, destPath string, preview bool) error
- func (c *Client) DownloadAttachment(attachmentID string, outputPath string) error
- func (c *Client) DownloadAttachmentsExport(destPath string) error
- func (c *Client) DownloadParquetExport(destPath string) error
- func (c *Client) DownloadRawJSONExport(destPath string) error
- func (c *Client) GetAppBundleManifest() (map[string]interface{}, error)
- func (c *Client) GetAppBundleVersions() (map[string]interface{}, error)
- func (c *Client) GetVersion() (*SystemVersionInfo, error)
- func (c *Client) ListUsers() ([]generated.UserListItem, error)
- func (c *Client) ResetUserPassword(reqBody UserResetPasswordRequest) error
- func (c *Client) SwitchAppBundleVersion(version string) (map[string]interface{}, error)
- func (c *Client) SyncPull(clientID string, currentVersion int64, schemaTypes []string, limit int, ...) (map[string]interface{}, error)
- func (c *Client) SyncPush(clientID string, transmissionID string, records []map[string]interface{}, ...) (map[string]interface{}, error)
- func (c *Client) UploadAppBundle(bundlePath string) (map[string]interface{}, error)
- func (c *Client) UploadAttachment(attachmentID string, filePath string) (map[string]interface{}, error)
- type DatabaseInfo
- type ServerInfo
- type SystemInfo
- type SystemVersionInfo
- type UserChangePasswordRequest
- type UserCreateRequest
- type UserResetPasswordRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client represents a Synkronus API client
func (*Client) AdminRepositoryReset ¶
func (c *Client) AdminRepositoryReset() (*generated.RepositoryResetResponse, error)
AdminRepositoryReset performs an irreversible server-side wipe of observation and attachment sync data (admin JWT).
func (*Client) AttachmentExists ¶
AttachmentExists checks if an attachment exists on the server
func (*Client) ChangeOwnPassword ¶
func (c *Client) ChangeOwnPassword(reqBody UserChangePasswordRequest) error
ChangeOwnPassword calls POST /users/change-password (self)
func (*Client) CreateUser ¶
func (c *Client) CreateUser(reqBody UserCreateRequest) (map[string]interface{}, error)
CreateUser calls POST /users to create a new user (admin)
func (*Client) DeleteUser ¶
DeleteUser calls DELETE /users/delete/{username} (admin)
func (*Client) DownloadAppBundleFile ¶
DownloadAppBundleFile downloads a specific file from the app bundle If preview is true, adds ?preview=true to the request URL
func (*Client) DownloadAttachment ¶
DownloadAttachment downloads an attachment from the server
func (*Client) DownloadAttachmentsExport ¶
DownloadAttachmentsExport downloads a ZIP of all current attachments to the specified destination path
func (*Client) DownloadParquetExport ¶
DownloadParquetExport downloads the Parquet export ZIP archive to the specified destination path
func (*Client) DownloadRawJSONExport ¶
DownloadRawJSONExport downloads the per-observation JSON ZIP export to the specified destination path
func (*Client) GetAppBundleManifest ¶
GetAppBundleManifest retrieves the app bundle manifest
func (*Client) GetAppBundleVersions ¶
GetAppBundleVersions retrieves available app bundle versions
func (*Client) GetVersion ¶
func (c *Client) GetVersion() (*SystemVersionInfo, error)
GetVersion retrieves version information from the Synkronus server
func (*Client) ListUsers ¶
func (c *Client) ListUsers() ([]generated.UserListItem, error)
ListUsers calls GET /api/users (admin only).
func (*Client) ResetUserPassword ¶
func (c *Client) ResetUserPassword(reqBody UserResetPasswordRequest) error
ResetUserPassword calls POST /users/reset-password (admin)
func (*Client) SwitchAppBundleVersion ¶
SwitchAppBundleVersion switches to a specific app bundle version
func (*Client) SyncPull ¶
func (c *Client) SyncPull(clientID string, currentVersion int64, schemaTypes []string, limit int, pageToken string, repositoryGeneration *int64) (map[string]interface{}, error)
SyncPull pulls updated records from the server
func (*Client) SyncPush ¶
func (c *Client) SyncPush(clientID string, transmissionID string, records []map[string]interface{}, repositoryGeneration *int64) (map[string]interface{}, error)
SyncPush pushes records to the server
func (*Client) UploadAppBundle ¶
UploadAppBundle uploads a new app bundle
type DatabaseInfo ¶
type ServerInfo ¶
type ServerInfo struct {
Version string `json:"version"`
}
type SystemInfo ¶
type SystemVersionInfo ¶
type SystemVersionInfo struct {
Server ServerInfo `json:"server"`
Database DatabaseInfo `json:"database"`
System SystemInfo `json:"system"`
Build BuildInfo `json:"build"`
}
SystemVersionInfo represents the version information of the Synkronus server
type UserChangePasswordRequest ¶
type UserChangePasswordRequest struct {
OldPassword string `json:"oldPassword"`
NewPassword string `json:"newPassword"`
}
UserChangePasswordRequest represents the payload for changing own password
type UserCreateRequest ¶
type UserCreateRequest struct {
Username string `json:"username"`
Password string `json:"password"`
Role string `json:"role"`
}
UserCreateRequest represents the payload for creating a user
type UserResetPasswordRequest ¶
type UserResetPasswordRequest struct {
Username string `json:"username"`
NewPassword string `json:"newPassword"`
}
UserResetPasswordRequest represents the payload for resetting a user's password