records

package
v0.0.0-...-7fe122b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2018 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDynamoAttribute

func GetDynamoAttribute(value *dynamodb.AttributeValue, kind reflect.Kind) (data []byte, err error)

func GetFieldDataType

func GetFieldDataType(record interface{}, jsonFieldName string) (kind reflect.Kind, err error)

func GetRecordColumns

func GetRecordColumns(record interface{}) (columns []string)

func SetData

func SetData(record interface{}, data map[string]*[]byte) error

func SetField

func SetField(record interface{}, jsonFieldName string, data interface{}) error

Types

type DynamoRecord

type DynamoRecord struct {
	Record
}

func (DynamoRecord) GetConnection

func (d DynamoRecord) GetConnection() connection.ConnectionInterface

func (DynamoRecord) GetDb

func (d DynamoRecord) GetDb() *dynamodb.DynamoDB

type Hello

type Hello struct {
	MySQLRecord
	ID   int    `json:"id"`
	Name string `json:"name"`
}

Hello The record struct the json meta data is used for the name of the column in the db, as well as returning the data in the api response

func (*Hello) Load

func (h *Hello) Load(id int) (err error)

Load the record

type JSON

type JSON map[string]interface{}

type JSONArray

type JSONArray []JSON

type JSONData

type JSONData interface{}

type JSONObject

type JSONObject map[string]interface{}

type JSONTime

type JSONTime time.Time

func (JSONTime) MarshalJSON

func (t JSONTime) MarshalJSON() ([]byte, error)

type MySQLRecord

type MySQLRecord struct {
	Record
}

func (*MySQLRecord) GetConnection

func (p *MySQLRecord) GetConnection() connection.ConnectionInterface

func (*MySQLRecord) GetDb

func (p *MySQLRecord) GetDb() *sql.DB

type Record

type Record struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL