Documentation ¶
Index ¶
- Constants
- func RandomRecordId() string
- func TimestampNow() float64
- type EncryptedPayload
- type GetRecordsOptions
- type KeyBundle
- type KeysPayload
- type Record
- type StorageClient
- func (sc *StorageClient) DeleteCollection(collectionName string) error
- func (sc *StorageClient) FetchKeys() (KeyBundle, error)
- func (sc *StorageClient) GetEncryptedRecord(collectionName, recordId string, keyBundle *KeyBundle) (Record, error)
- func (sc *StorageClient) GetEncryptedRecords(collectionName string, keyBundle *KeyBundle, options *GetRecordsOptions) ([]Record, error)
- func (sc *StorageClient) GetRecord(collectionName, recordId string) (Record, error)
- func (sc *StorageClient) Login() error
- func (sc *StorageClient) PutEncryptedRecord(collectionName string, record Record, keyBundle *KeyBundle) (string, error)
- func (sc *StorageClient) PutEncryptedRecords(collectionName string, records []Record, keyBundle *KeyBundle) error
Constants ¶
View Source
const USER_AGENT = "SyncAPI/0.1 (https://github.com/st3fan/moz-syncapi)"
Variables ¶
This section is empty.
Functions ¶
func RandomRecordId ¶
func RandomRecordId() string
func TimestampNow ¶
func TimestampNow() float64
Types ¶
type EncryptedPayload ¶
type GetRecordsOptions ¶
type KeyBundle ¶
func NewKeyBundle ¶
type KeysPayload ¶
type KeysPayload struct {
Default []string `json:"default"`
}
type Record ¶
type StorageClient ¶
type StorageClient struct {
// contains filtered or unexported fields
}
func NewStorageClient ¶
func NewStorageClient(endpoint, hawkKeyId, hawkKey string, secret []byte) (*StorageClient, error)
func (*StorageClient) DeleteCollection ¶
func (sc *StorageClient) DeleteCollection(collectionName string) error
func (*StorageClient) FetchKeys ¶
func (sc *StorageClient) FetchKeys() (KeyBundle, error)
func (*StorageClient) GetEncryptedRecord ¶
func (sc *StorageClient) GetEncryptedRecord(collectionName, recordId string, keyBundle *KeyBundle) (Record, error)
func (*StorageClient) GetEncryptedRecords ¶
func (sc *StorageClient) GetEncryptedRecords(collectionName string, keyBundle *KeyBundle, options *GetRecordsOptions) ([]Record, error)
func (*StorageClient) GetRecord ¶
func (sc *StorageClient) GetRecord(collectionName, recordId string) (Record, error)
func (*StorageClient) Login ¶
func (sc *StorageClient) Login() error
func (*StorageClient) PutEncryptedRecord ¶
func (*StorageClient) PutEncryptedRecords ¶
func (sc *StorageClient) PutEncryptedRecords(collectionName string, records []Record, keyBundle *KeyBundle) error
Click to show internal directories.
Click to hide internal directories.