Documentation
¶
Index ¶
- Constants
- func NewRPCChecker() grpcs.ParamChecker
- type CapyskyClient
- func (c *CapyskyClient) Close() error
- func (c *CapyskyClient) CreateCollection(dbName, collName string, collType CollType, csvColumns []string) error
- func (c *CapyskyClient) CreateDatabase(dbName string, password string) error
- func (c *CapyskyClient) DeleteCollection(dbName, collName string) error
- func (c *CapyskyClient) DeleteDatabase(dbName string) error
- func (c *CapyskyClient) DeleteDocs(dbName, collName string, IdGte any, IdLte any) error
- func (c *CapyskyClient) DeleteObject(dbName, collName, key string) error
- func (c *CapyskyClient) GetCollectionMaxId(dbName, collName string) (any, error)
- func (c *CapyskyClient) GetCollectionMinId(dbName, collName string) (any, error)
- func (c *CapyskyClient) GetDoc(dbName, collName string, docId any) (*Cursor, error)
- func (c *CapyskyClient) GetDocs(dbName, collName string, IdGte any, IdLte any) (*Cursor, error)
- func (c *CapyskyClient) GetObject(dbName, collName, key string) ([]byte, error)
- func (c *CapyskyClient) IsCollectionExist(dbName, collName string) (bool, error)
- func (c *CapyskyClient) IsDatabaseExist(dbName string) (bool, error)
- func (c *CapyskyClient) ListCollections(dbName string) ([]string, error)
- func (c *CapyskyClient) ListDatabases() ([]string, error)
- func (c *CapyskyClient) RenameCollection(dbName, oldCollName, newCollName string) error
- func (c *CapyskyClient) RenameDatabase(oldDBName, newDBName string) error
- func (c *CapyskyClient) ResetColumns(dbName, collName string, newCsvColumns []string) error
- func (c *CapyskyClient) ResetDatabasePassword(dbName string, oldPassword, newPassword string) error
- func (c *CapyskyClient) ScanObjectKeys(dbName, collName, pageToken string) ([]string, string, error)
- func (c *CapyskyClient) UpsertDocs(dbName, collName string, docs []any) error
- func (c *CapyskyClient) UpsertObject(dbName, collName, key string, value []byte) error
- type CollType
- type Cursor
Constants ¶
const ( TimeLakeAccessKeyKey = "TimeLake.AccessKeyKey.85629437" CollTypeJson = CollType("json") CollTypeCsv = CollType("csv") CollTypeKv = CollType("kv") )
Variables ¶
This section is empty.
Functions ¶
func NewRPCChecker ¶
func NewRPCChecker() grpcs.ParamChecker
NewRPCChecker used to verify function parameters between RPC client and server. Rules 'grpcs' package needs.
Types ¶
type CapyskyClient ¶
type CapyskyClient struct {
// contains filtered or unexported fields
}
func New ¶
func New(network, addr, accessKey string) (*CapyskyClient, error)
func (*CapyskyClient) CreateCollection ¶
func (c *CapyskyClient) CreateCollection(dbName, collName string, collType CollType, csvColumns []string) error
CreateCollection creates new collection. csvColumns: user should set a valid `csvColumns` only when `collType` is CollTypeCSV, users can append or rename csvColumns, but CAN NOT delete any column.
func (*CapyskyClient) CreateDatabase ¶
func (c *CapyskyClient) CreateDatabase(dbName string, password string) error
CreateDatabase creates a new database.
func (*CapyskyClient) DeleteCollection ¶
func (c *CapyskyClient) DeleteCollection(dbName, collName string) error
DeleteCollection deletes collection.
func (*CapyskyClient) DeleteDatabase ¶
func (c *CapyskyClient) DeleteDatabase(dbName string) error
DeleteDatabase deletes database.
func (*CapyskyClient) DeleteDocs ¶
func (c *CapyskyClient) DeleteDocs(dbName, collName string, IdGte any, IdLte any) error
DeleteDocs deletes documents by document Id range. 'IdGte' and 'IdLte' cannot be nil at the same time.
func (*CapyskyClient) DeleteObject ¶
func (c *CapyskyClient) DeleteObject(dbName, collName, key string) error
DeleteObject deletes object from bucket.
func (*CapyskyClient) GetCollectionMaxId ¶
func (c *CapyskyClient) GetCollectionMaxId(dbName, collName string) (any, error)
GetCollectionMaxId gets the largest document Id in specified collection.
func (*CapyskyClient) GetCollectionMinId ¶
func (c *CapyskyClient) GetCollectionMinId(dbName, collName string) (any, error)
GetCollectionMinId gets the smallest document Id in specified collection.
func (*CapyskyClient) GetDoc ¶
func (c *CapyskyClient) GetDoc(dbName, collName string, docId any) (*Cursor, error)
GetDoc gets document by document Id.
func (*CapyskyClient) GetDocs ¶
GetDocs gets documents by document Id range. 'IdGte' and 'IdLte' cannot be nil at the same time.
func (*CapyskyClient) GetObject ¶
func (c *CapyskyClient) GetObject(dbName, collName, key string) ([]byte, error)
GetObject reads object from bucket.
func (*CapyskyClient) IsCollectionExist ¶
func (c *CapyskyClient) IsCollectionExist(dbName, collName string) (bool, error)
IsCollectionExist checks if collection exist or not.
func (*CapyskyClient) IsDatabaseExist ¶
func (c *CapyskyClient) IsDatabaseExist(dbName string) (bool, error)
IsDatabaseExist checks if database exist or not.
func (*CapyskyClient) ListCollections ¶
func (c *CapyskyClient) ListCollections(dbName string) ([]string, error)
ListCollections gets all collections' name in specified database.
func (*CapyskyClient) ListDatabases ¶
func (c *CapyskyClient) ListDatabases() ([]string, error)
ListDatabases gets all database names.
func (*CapyskyClient) RenameCollection ¶
func (c *CapyskyClient) RenameCollection(dbName, oldCollName, newCollName string) error
RenameCollection renames collection.
func (*CapyskyClient) RenameDatabase ¶
func (c *CapyskyClient) RenameDatabase(oldDBName, newDBName string) error
RenameDatabase renames database.
func (*CapyskyClient) ResetColumns ¶
func (c *CapyskyClient) ResetColumns(dbName, collName string, newCsvColumns []string) error
ResetColumns resets new columns.
func (*CapyskyClient) ResetDatabasePassword ¶
func (c *CapyskyClient) ResetDatabasePassword(dbName string, oldPassword, newPassword string) error
ResetDatabasePassword resets password for database. Users can perform multiple passwords for one 'dbName'. The last password will take effect and the previous password will be used only for decrypting the old chunks.
func (*CapyskyClient) ScanObjectKeys ¶
func (c *CapyskyClient) ScanObjectKeys(dbName, collName, pageToken string) ([]string, string, error)
ScanObjectKeys scans object keys in bucket.
func (*CapyskyClient) UpsertDocs ¶
func (c *CapyskyClient) UpsertDocs(dbName, collName string, docs []any) error
UpsertDocs update/insert documents.
func (*CapyskyClient) UpsertObject ¶
func (c *CapyskyClient) UpsertObject(dbName, collName, key string, value []byte) error
UpsertObject update/insert object into bucket.