Documentation ¶
Index ¶
- Variables
- func Connect(c *credentials.Credentials, region string) error
- func CreateItem(av map[string]*dynamodb.AttributeValue) error
- func DecodeToDynamoAttribute(readBody io.ReadCloser, m interface{}) (map[string]*dynamodb.AttributeValue, error)
- func DecodeToDynamoAttributeAndJson(readBody io.ReadCloser, m interface{}) (map[string]*dynamodb.AttributeValue, error, string)
- func DecodeToMap(b io.ReadCloser, m interface{}) (map[string]interface{}, error)
- func DeleteItem(itemValue string) error
- func GetItem(itemValue string) (*dynamodb.GetItemOutput, error)
- func GetParameterValue(r io.ReadCloser, m interface{}) (string, error)
- func StringFromMap(m map[string]interface{}, p string) string
- func Unmarshal(result *dynamodb.GetItemOutput, m interface{}) map[string]interface{}
- func UpdateItem(updatingField string, identifier string, updateVal string) (bool, error)
- type ErrorString
Constants ¶
This section is empty.
Variables ¶
View Source
var DynamoConnection *dynamodb.DynamoDB
View Source
var DynamoTable string
** Values injected from main internal that imports this library **
View Source
var GenericModel interface{}
View Source
var SearchParam string
Functions ¶
func Connect ¶
func Connect(c *credentials.Credentials, region string) error
Create a connection to DB and assign the session to DynamoConnection variable DynamoConnection variable is shared by other resources(CRUD)
func CreateItem ¶
func CreateItem(av map[string]*dynamodb.AttributeValue) error
Item created using AttributeValue which is decoded by modeldecoding
func DecodeToDynamoAttribute ¶
func DecodeToDynamoAttribute(readBody io.ReadCloser, m interface{}) (map[string]*dynamodb.AttributeValue, error)
* * Convert type interface to dynamodb readable object *
func DecodeToDynamoAttributeAndJson ¶
func DecodeToDynamoAttributeAndJson(readBody io.ReadCloser, m interface{}) (map[string]*dynamodb.AttributeValue, error, string)
* * Convert type interface to dynamodb readable object and JSON *
func DecodeToMap ¶
func DecodeToMap(b io.ReadCloser, m interface{}) (map[string]interface{}, error)
* * Convert the interface fields into a map *
func DeleteItem ¶
func GetParameterValue ¶
func GetParameterValue(r io.ReadCloser, m interface{}) (string, error)
* * Get the specific value query by the unique identifier *
func StringFromMap ¶
* * Convert a interface type to string *
func Unmarshal ¶
func Unmarshal(result *dynamodb.GetItemOutput, m interface{}) map[string]interface{}
* * Model mapping of type interface to item from dynamodb *
Types ¶
type ErrorString ¶
errorString is a trivial implementation of error.
func (*ErrorString) Error ¶
func (e *ErrorString) Error() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.