Documentation ¶
Index ¶
- Constants
- Variables
- func Init(traceHandle io.Writer, infoHandle io.Writer, warningHandle io.Writer, ...)
- func InitLocalDBInstance(endpoint string) error
- func InitServerDBInstance(region, accessKey, secretKey string) error
- func UpdateMinusValue(l, r string) string
- func UpdatePlusValue(l, r string) string
- func Update_if_not_exists(toUpdate SetValueMap) string
- func Update_list_append(toAppend SetValueMap) string
- type BatchGetItemExecutor
- type BatchWriteItemExecutor
- type CreateCollectionModel
- type CreateTableExecutor
- type DynErrors
- type FieldCache
- type GetItemExecutor
- type GoDynamoDB
- func (db GoDynamoDB) DeleteTable(i ReadModel) error
- func (db GoDynamoDB) GetBatchGetItemExecutor(is []ReadModel) (*BatchGetItemExecutor, error)
- func (db GoDynamoDB) GetBatchWriteItemExecutor(toPut, toDelete []WriteModel) (*BatchWriteItemExecutor, error)
- func (d GoDynamoDB) GetCreateTableExecutor(i CreateCollectionModel) (*CreateTableExecutor, error)
- func (db GoDynamoDB) GetGetItemExecutor(i ReadModel) (*GetItemExecutor, error)
- func (db GoDynamoDB) GetPutItemExcutor(i WriteModel) (*PutItemExecutor, error)
- func (db GoDynamoDB) GetQueryExecutor(i ReadModel) (*QueryExecutor, error)
- func (db GoDynamoDB) GetScanExecutor(i ReadModel) (*ScanExecutor, error)
- func (db GoDynamoDB) GetUpdateItemExecutor(i WriteModel) (*UpdateItemExecutor, error)
- type KeyPair
- type ProjectionDefination
- type PutItemExecutor
- type QueryCondExpressHelper
- func And(l, r *QueryCondExpressHelper) *QueryCondExpressHelper
- func Attribute_exist(path string) *QueryCondExpressHelper
- func Attribute_not_exist(path string) *QueryCondExpressHelper
- func Attribute_type(path, t string) *QueryCondExpressHelper
- func Begins_with(path, prefix string) *QueryCondExpressHelper
- func Between(l, rl, rr string) *QueryCondExpressHelper
- func Contains(path, op string) *QueryCondExpressHelper
- func Eq(l, r string) *QueryCondExpressHelper
- func GE(l, r string) *QueryCondExpressHelper
- func GT(l, r string) *QueryCondExpressHelper
- func In(l string, r ...string) *QueryCondExpressHelper
- func LE(l, r string) *QueryCondExpressHelper
- func LT(l, r string) *QueryCondExpressHelper
- func NE(l, r string) *QueryCondExpressHelper
- func NewQueryCondExpress() *QueryCondExpressHelper
- func Not(l *QueryCondExpressHelper) *QueryCondExpressHelper
- func Or(l, r *QueryCondExpressHelper) *QueryCondExpressHelper
- func Size(path string) *QueryCondExpressHelper
- func Wrap(l *QueryCondExpressHelper) *QueryCondExpressHelper
- type QueryExecutor
- type ReadModel
- type ScanExecutor
- type SetValueMap
- type Throughput
- type UpdateCondExpressHelper
- type UpdateItemExecutor
- type WriteModel
Constants ¶
View Source
const ( WriteProvisionedThroughput = 0 ReadProvisionedThroughput = 1 ProjectAll = "ALL" ProjectKey = "KEYS_ONLY" ProjectDefined = "INCLUDE" )
View Source
const (
Unknow = "unknow error"
)
Variables ¶
Functions ¶
func InitLocalDBInstance ¶
we will use a singleton so you should only call this for one time
func InitServerDBInstance ¶
func UpdateMinusValue ¶
func UpdatePlusValue ¶
func Update_if_not_exists ¶
func Update_if_not_exists(toUpdate SetValueMap) string
func Update_list_append ¶
func Update_list_append(toAppend SetValueMap) string
Types ¶
type BatchGetItemExecutor ¶
type BatchGetItemExecutor struct {
// contains filtered or unexported fields
}
func (*BatchGetItemExecutor) Exec ¶
func (e *BatchGetItemExecutor) Exec() error
type BatchWriteItemExecutor ¶
type BatchWriteItemExecutor struct {
// contains filtered or unexported fields
}
func (*BatchWriteItemExecutor) Exec ¶
func (e *BatchWriteItemExecutor) Exec() error
type CreateCollectionModel ¶
type CreateCollectionModel interface { GetTableName() string //provide only table throughput and global index throughput GetPrevision() map[string]Throughput GetProjection() map[string]ProjectionDefination }
type CreateTableExecutor ¶
type CreateTableExecutor struct {
// contains filtered or unexported fields
}
func (*CreateTableExecutor) Exec ¶
func (e *CreateTableExecutor) Exec() error
type DynErrors ¶
type DynErrors struct {
// contains filtered or unexported fields
}
func NewDynError ¶
type FieldCache ¶
type FieldCache struct {
// contains filtered or unexported fields
}
type GetItemExecutor ¶
type GetItemExecutor struct {
// contains filtered or unexported fields
}
func (*GetItemExecutor) Exec ¶
func (e *GetItemExecutor) Exec() error
type GoDynamoDB ¶
type GoDynamoDB struct {
// contains filtered or unexported fields
}
func GetDBInstance ¶
func GetDBInstance() GoDynamoDB
func (GoDynamoDB) DeleteTable ¶
func (db GoDynamoDB) DeleteTable(i ReadModel) error
func (GoDynamoDB) GetBatchGetItemExecutor ¶
func (db GoDynamoDB) GetBatchGetItemExecutor(is []ReadModel) (*BatchGetItemExecutor, error)
func (GoDynamoDB) GetBatchWriteItemExecutor ¶
func (db GoDynamoDB) GetBatchWriteItemExecutor(toPut, toDelete []WriteModel) (*BatchWriteItemExecutor, error)
func (GoDynamoDB) GetCreateTableExecutor ¶
func (d GoDynamoDB) GetCreateTableExecutor(i CreateCollectionModel) (*CreateTableExecutor, error)
need to refactor to a more clear func
func (GoDynamoDB) GetGetItemExecutor ¶
func (db GoDynamoDB) GetGetItemExecutor(i ReadModel) (*GetItemExecutor, error)
func (GoDynamoDB) GetPutItemExcutor ¶
func (db GoDynamoDB) GetPutItemExcutor(i WriteModel) (*PutItemExecutor, error)
func (GoDynamoDB) GetQueryExecutor ¶
func (db GoDynamoDB) GetQueryExecutor(i ReadModel) (*QueryExecutor, error)
func (GoDynamoDB) GetScanExecutor ¶
func (db GoDynamoDB) GetScanExecutor(i ReadModel) (*ScanExecutor, error)
func (GoDynamoDB) GetUpdateItemExecutor ¶
func (db GoDynamoDB) GetUpdateItemExecutor(i WriteModel) (*UpdateItemExecutor, error)
type ProjectionDefination ¶
type ProjectionDefination struct {
// contains filtered or unexported fields
}
func NewProjectionDefination ¶
func NewProjectionDefination(projectType, fields string) ProjectionDefination
type PutItemExecutor ¶
type PutItemExecutor struct {
// contains filtered or unexported fields
}
func (*PutItemExecutor) Exec ¶
func (e *PutItemExecutor) Exec() error
type QueryCondExpressHelper ¶
type QueryCondExpressHelper struct {
// contains filtered or unexported fields
}
any query helper should be cached after it's created
func And ¶
func And(l, r *QueryCondExpressHelper) *QueryCondExpressHelper
func Attribute_exist ¶
func Attribute_exist(path string) *QueryCondExpressHelper
func Attribute_not_exist ¶
func Attribute_not_exist(path string) *QueryCondExpressHelper
func Attribute_type ¶
func Attribute_type(path, t string) *QueryCondExpressHelper
func Begins_with ¶
func Begins_with(path, prefix string) *QueryCondExpressHelper
func Between ¶
func Between(l, rl, rr string) *QueryCondExpressHelper
func Contains ¶
func Contains(path, op string) *QueryCondExpressHelper
func Eq ¶
func Eq(l, r string) *QueryCondExpressHelper
func GE ¶
func GE(l, r string) *QueryCondExpressHelper
func GT ¶
func GT(l, r string) *QueryCondExpressHelper
func In ¶
func In(l string, r ...string) *QueryCondExpressHelper
func LE ¶
func LE(l, r string) *QueryCondExpressHelper
func LT ¶
func LT(l, r string) *QueryCondExpressHelper
func NE ¶
func NE(l, r string) *QueryCondExpressHelper
func NewQueryCondExpress ¶
func NewQueryCondExpress() *QueryCondExpressHelper
won't gusee place holder for it, just create a query with place holer, I think that's more effective for a Server side program
func Not ¶
func Not(l *QueryCondExpressHelper) *QueryCondExpressHelper
func Or ¶
func Or(l, r *QueryCondExpressHelper) *QueryCondExpressHelper
func Size ¶
func Size(path string) *QueryCondExpressHelper
func Wrap ¶
func Wrap(l *QueryCondExpressHelper) *QueryCondExpressHelper
func (*QueryCondExpressHelper) AddExpressMap ¶
func (q *QueryCondExpressHelper) AddExpressMap(originalKey, placeHolder string) *QueryCondExpressHelper
type QueryExecutor ¶
type QueryExecutor struct {
// contains filtered or unexported fields
}
func (*QueryExecutor) AddValue ¶
func (q *QueryExecutor) AddValue(express string, v interface{}) *QueryExecutor
func (*QueryExecutor) Exec ¶
func (q *QueryExecutor) Exec() error
func (*QueryExecutor) GetCount ¶
func (q *QueryExecutor) GetCount() int64
func (*QueryExecutor) GetRet ¶
func (q *QueryExecutor) GetRet() []ReadModel
func (*QueryExecutor) WithKeyCondition ¶
func (q *QueryExecutor) WithKeyCondition(helper *QueryCondExpressHelper) *QueryExecutor
type ScanExecutor ¶
type ScanExecutor struct {
// contains filtered or unexported fields
}
func (*ScanExecutor) Exec ¶
func (q *ScanExecutor) Exec() (*ScanExecutor, error)
func (*ScanExecutor) GetCount ¶
func (q *ScanExecutor) GetCount() int64
func (*ScanExecutor) GetRet ¶
func (q *ScanExecutor) GetRet() []ReadModel
type SetValueMap ¶
type SetValueMap struct {
SetName, SetValue string
}
type Throughput ¶
type Throughput struct {
// contains filtered or unexported fields
}
func NewThroughput ¶
func NewThroughput(read, write int64) Throughput
type UpdateCondExpressHelper ¶
type UpdateCondExpressHelper struct {
// contains filtered or unexported fields
}
func AddToField ¶
func AddToField(toAdd ...SetValueMap) *UpdateCondExpressHelper
func DeleteFromSet ¶
func DeleteFromSet(toDelete ...SetValueMap) *UpdateCondExpressHelper
func NewUpdateExpress ¶
func NewUpdateExpress() *UpdateCondExpressHelper
won't gusee place holder for it, just create a query with place holer, I think that's more effective for a Server side program
func RemoveField ¶
func RemoveField(path ...string) *UpdateCondExpressHelper
func SetValue ¶
func SetValue(toSet ...SetValueMap) *UpdateCondExpressHelper
func (*UpdateCondExpressHelper) AddExpressMap ¶
func (q *UpdateCondExpressHelper) AddExpressMap(originalKey, placeHolder string) *UpdateCondExpressHelper
type UpdateItemExecutor ¶
type UpdateItemExecutor struct {
// contains filtered or unexported fields
}
func (*UpdateItemExecutor) AddValue ¶
func (q *UpdateItemExecutor) AddValue(express string, v interface{}) *UpdateItemExecutor
func (*UpdateItemExecutor) Exex ¶
func (e *UpdateItemExecutor) Exex() error
func (*UpdateItemExecutor) SetUpdateExpress ¶
func (e *UpdateItemExecutor) SetUpdateExpress(exp *UpdateCondExpressHelper) *UpdateItemExecutor
type WriteModel ¶
type WriteModel interface {
GetTableName() string
}
Click to show internal directories.
Click to hide internal directories.