Documentation ¶
Index ¶
- Variables
- func AppendQueryParams(url string, query_params map[string]string) string
- func ConfigureDynamoDB()
- func Contains(arr []string, str string) bool
- func Get(url string, queryParams map[string]string, headers 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 Post(url string, payload map[string]string, headers http.Header) ([]byte, error)
- func PrepareUpdateExpression(request interface{}, keysToExclude []string) map[string]interface{}
- func Put(url string, payload map[string]string, headers http.Header) ([]byte, error)
- func TransactWriteItems(transactItems []TransactItem) map[string]interface{}
- func ZapLogger() *zap.Logger
- type AWSConfigurations
- type Configurations
- 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 FMSConfigurations
- type MyDynamo
- type ServerConfigurations
- type TableConfigurations
- type TableStructure
- type TransactItem
Constants ¶
This section is empty.
Variables ¶
var ZapLoggerObj *zap.Logger
ZapLoggerObj Global LOgger Object
Functions ¶
func AppendQueryParams ¶ added in v1.0.6
func ConfigureDynamoDB ¶
func ConfigureDynamoDB()
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 AWSConfigurations ¶ added in v1.0.8
type AWSConfigurations struct { Region string Tables TableConfigurations }
AWSConfigurations exported
type Configurations ¶ added in v1.0.8
type Configurations struct { Server ServerConfigurations AWS AWSConfigurations Version string FMS FMSConfigurations HttpTimeoutInSeconds time.Duration }
Configurations contains all the config data needed for the service
var ConfigurationObj Configurations
ConfigurationObj exported
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 FMSConfigurations ¶ added in v1.0.8
type MyDynamo ¶
type MyDynamo struct {
Db dynamodbiface.DynamoDBAPI
}
MyDynamo : For creating dynamodb connection.
var Dyna *MyDynamo
Dyna - exported
type ServerConfigurations ¶ added in v1.0.8
ServerConfigurations exported
type TableConfigurations ¶ added in v1.0.8
type TableConfigurations struct {
Vehicle TableStructure
}
TableConfigurations exported
var TableDetails TableConfigurations
TableDetails exported
type TableStructure ¶ added in v1.0.8
TableStructure exported