Documentation ¶
Overview ¶
Package services implements services for getting data from Spanner and streaming data into pubsub
Index ¶
- func Add(ctx context.Context, tableName string, attrMap map[string]interface{}, ...) (map[string]interface{}, error)
- func BatchDelete(ctx context.Context, tableName string, keyMapArray []map[string]interface{}) error
- func BatchGet(ctx context.Context, tableName string, keyMapArray []map[string]interface{}) ([]map[string]interface{}, error)
- func BatchGetWithProjection(ctx context.Context, tableName string, keyMapArray []map[string]interface{}, ...) ([]map[string]interface{}, error)
- func BatchPut(ctx context.Context, tableName string, arrAttrMap []map[string]interface{}) error
- func Del(ctx context.Context, tableName string, attrMap map[string]interface{}, ...) (map[string]interface{}, error)
- func Delete(ctx context.Context, tableName string, primaryKeyMap map[string]interface{}, ...) error
- func GetWithProjection(ctx context.Context, tableName string, primaryKeyMap map[string]interface{}, ...) (map[string]interface{}, error)
- func InitStream()
- func IsPubSubAllowed(tableName string) (string, bool)
- func IsStreamEnabled(tableName string) bool
- func MayIReadOrWrite(table string, IsMutation bool, operation string) bool
- func Put(ctx context.Context, tableName string, putObj map[string]interface{}, ...) (map[string]interface{}, error)
- func QueryAttributes(ctx context.Context, query models.Query) (map[string]interface{}, string, error)
- func Remove(ctx context.Context, tableName string, updateAttr models.UpdateAttr, ...) (map[string]interface{}, error)
- func Scan(ctx context.Context, scanData models.ScanMeta) (map[string]interface{}, error)
- func StartConfigManager()
- func StreamDataToThirdParty(oldImage, newImage map[string]interface{}, tableName string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Add ¶
func Add(ctx context.Context, tableName string, attrMap map[string]interface{}, condExpression string, m, expressionAttr map[string]interface{}, expr *models.UpdateExpressionCondition, oldRes map[string]interface{}) (map[string]interface{}, error)
Add checks the expression for converting the data
func BatchDelete ¶
BatchDelete service
func BatchGet ¶
func BatchGet(ctx context.Context, tableName string, keyMapArray []map[string]interface{}) ([]map[string]interface{}, error)
BatchGet for batch operation for getting data
func BatchGetWithProjection ¶
func BatchGetWithProjection(ctx context.Context, tableName string, keyMapArray []map[string]interface{}, projectionExpression string, expressionAttributeNames map[string]string) ([]map[string]interface{}, error)
BatchGetWithProjection from Spanner
func Del ¶
func Del(ctx context.Context, tableName string, attrMap map[string]interface{}, condExpression string, expressionAttr map[string]interface{}, expr *models.UpdateExpressionCondition) (map[string]interface{}, error)
Del checks the expression for saving the data
func Delete ¶
func Delete(ctx context.Context, tableName string, primaryKeyMap map[string]interface{}, condExpression string, attrMap map[string]interface{}, expr *models.UpdateExpressionCondition) error
Delete service
func GetWithProjection ¶
func GetWithProjection(ctx context.Context, tableName string, primaryKeyMap map[string]interface{}, projectionExpression string, expressionAttributeNames map[string]string) (map[string]interface{}, error)
GetWithProjection get table data with projection
func IsPubSubAllowed ¶
IsPubSubAllowed to check if PubSub is allowed or not for a table
func IsStreamEnabled ¶
IsStreamEnabled checks if a table is enabled for streaming or not
func MayIReadOrWrite ¶
MayIReadOrWrite for checking the operation is allowed or not
func Put ¶
func Put(ctx context.Context, tableName string, putObj map[string]interface{}, expr *models.UpdateExpressionCondition, conditionExp string, expressionAttr, oldRes map[string]interface{}) (map[string]interface{}, error)
Put writes an object to Spanner
func QueryAttributes ¶
func QueryAttributes(ctx context.Context, query models.Query) (map[string]interface{}, string, error)
QueryAttributes from Spanner
func Remove ¶
func Remove(ctx context.Context, tableName string, updateAttr models.UpdateAttr, actionValue string, expr *models.UpdateExpressionCondition, oldRes map[string]interface{}) (map[string]interface{}, error)
Remove for remove operation in update
func StartConfigManager ¶
func StartConfigManager()
StartConfigManager starts config mangager for fetching the config manager data after certain time
func StreamDataToThirdParty ¶
StreamDataToThirdParty for streaming data to any third party source
Types ¶
This section is empty.