Documentation
¶
Index ¶
- Variables
- func AppendQueryParams(url string, query_params map[string]string) string
- func ConfigureDynamoDB(region string)
- func Contains(arr []string, str string) bool
- func GetCall(url string, query_params map[string]string, header http.Header, ...) ([]byte, error)
- func GetUTCTimeString() string
- func GetUUID() string
- func InterfaceToMap(request interface{}) map[string]interface{}
- func IsEmpty(str string) bool
- func Logger(inner http.Handler, name string) http.Handler
- func LowerFirst(s string) string
- func PrepareUpdateExpression(request interface{}, keysToExclude []string) map[string]interface{}
- func TransactWriteItems(transactItems []TransactItem) map[string]interface{}
- func ZapLogger() *zap.Logger
- type DBService
- func (db DBService) BatchGetItem(keyDetails []map[string]string, items interface{}) error
- func (db DBService) BatchWriteItemDelete(keyDetails []map[string]string, items interface{}) error
- func (db DBService) GetItem(keyDetails map[string]string, item interface{}) error
- func (db DBService) PutItem(transactItem TransactItem)
- func (db DBService) QueryOnGSI(keyDetails map[string]string, items interface{}, keyEx string, ...) error
- func (db DBService) QuerytItem(keyDetails map[string]string, items interface{}, keyEx string) error
- func (db DBService) UpdateItem(keyDetails map[string]string, itemDetails map[string]string, ...)
- type MyDynamo
- type TransactItem
Constants ¶
This section is empty.
Variables ¶
View Source
var ZapLoggerObj *zap.Logger
ZapLoggerObj Global LOgger Object
Functions ¶
func AppendQueryParams ¶ added in v1.0.6
func ConfigureDynamoDB ¶
func ConfigureDynamoDB(region string)
ConfigureDynamoDB : For creating dynamodb connection.
func GetUTCTimeString ¶ added in v1.0.6
func GetUTCTimeString() string
func InterfaceToMap ¶
func InterfaceToMap(request interface{}) map[string]interface{}
InterfaceToMap function converts an interface to map
func LowerFirst ¶ added in v1.0.6
func PrepareUpdateExpression ¶ added in v1.0.6
func TransactWriteItems ¶
func TransactWriteItems(transactItems []TransactItem) map[string]interface{}
TransactWriteItems write to dynamodb in a single transaction
Types ¶
type DBService ¶
type DBService struct {
TableName string
}
DBService : For creating dynamodb connection.
func (DBService) BatchGetItem ¶
BatchGetItem gets data from dynamodb (with multiple PK returns multiple records)
func (DBService) BatchWriteItemDelete ¶
BatchWriteItemDelete delete data from dynamodb (with multiple PK delete in single go)
func (DBService) PutItem ¶
func (db DBService) PutItem(transactItem TransactItem)
PutItem : Inserts an item into Dynamodb
func (DBService) QueryOnGSI ¶
func (db DBService) QueryOnGSI(keyDetails map[string]string, items interface{}, keyEx string, indexName string) error
QueryOnGSI gets data from dynamodb by querying on GSI
func (DBService) QuerytItem ¶
QuerytItem gets data from dynamodb (only HK returns multiple records)
type MyDynamo ¶
type MyDynamo struct {
Db dynamodbiface.DynamoDBAPI
}
MyDynamo : For creating dynamodb connection.
var Dyna *MyDynamo
Dyna - exported
Click to show internal directories.
Click to hide internal directories.