models

package
v0.0.0-...-88d673b Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package models implements all the structs required by application

Index

Constants

This section is empty.

Variables

View Source
var ColumnToOriginalCol map[string]string

ColumnToOriginalCol for Original column map

View Source
var OriginalColResponse map[string]string

OriginalColResponse for Original Column Response

View Source
var SpannerTableMap = make(map[string]string)

SpannerTableMap for spanner column map

View Source
var TableColChangeMap map[string]struct{}

TableColChangeMap for changed columns map

View Source
var TableColumnMap map[string][]string

TableColumnMap - this contains the list of columns for the tables

View Source
var TableDDL map[string]map[string]string

TableDDL - this contains the DDL

Functions

This section is empty.

Types

type BatchDeleteItem

type BatchDeleteItem struct {
	Key map[string]*dynamodb.AttributeValue `json:"Key"`
}

BatchDeleteItem is for BatchWriteSubItems

type BatchGetMeta

type BatchGetMeta struct {
	RequestItems map[string]BatchGetWithProjectionMeta `json:"RequestItems"`
}

BatchGetMeta struct

type BatchGetWithProjectionMeta

type BatchGetWithProjectionMeta struct {
	TableName                string                                `json:"TableName"`
	KeyArray                 []map[string]interface{}              `json:"KeyArray"`
	ProjectionExpression     string                                `json:"ProjectionExpression"`
	ExpressionAttributeNames map[string]string                     `json:"ExpressionAttributeNames"`
	Keys                     []map[string]*dynamodb.AttributeValue `json:"Keys"`
}

BatchGetWithProjectionMeta struct

type BatchMeta

type BatchMeta struct {
	TableName    string                                `json:"TableName"`
	KeyArray     []map[string]interface{}              `json:"KeyArray"`
	DynamoObject []map[string]*dynamodb.AttributeValue `json:"DynamoObject"`
}

BatchMeta struct

type BatchMetaUpdate

type BatchMetaUpdate struct {
	TableName    string                                `json:"TableName"`
	ArrAttrMap   []map[string]interface{}              `json:"ArrAttrMap"`
	DynamoObject []map[string]*dynamodb.AttributeValue `json:"DynamoObject"`
}

BatchMetaUpdate struct

type BatchPutItem

type BatchPutItem struct {
	Item map[string]*dynamodb.AttributeValue `json:"Item"`
}

BatchPutItem is for BatchWriteSubItems

type BatchWriteItem

type BatchWriteItem struct {
	RequestItems map[string][]BatchWriteSubItems `json:"RequestItems"`
}

BatchWriteItem for Batch Operation

type BatchWriteItemResponse

type BatchWriteItemResponse struct {
	UnprocessedItems map[string][]BatchWriteSubItems `json:"UnprocessedItems"`
}

BatchWriteItemResponse for Batch Operation

type BatchWriteSubItems

type BatchWriteSubItems struct {
	DelReq BatchDeleteItem `json:"DeleteRequest"`
	PutReq BatchPutItem    `json:"PutRequest"`
}

BatchWriteSubItems is for BatchWriteItem

type BulkDelete

type BulkDelete struct {
	TableName          string                                `json:"TableName"`
	PrimaryKeyMapArray []map[string]interface{}              `json:"KeyArray"`
	DynamoObject       []map[string]*dynamodb.AttributeValue `json:"DynamoObject"`
}

BulkDelete struct

type ConfigControllerModel

type ConfigControllerModel struct {
	Mux               sync.RWMutex
	UniqueVal         string
	CornTime          string
	StopConfigManager bool
	ReadMap           map[string]struct{}
	WriteMap          map[string]struct{}
	StreamEnable      map[string]struct{}
	PubSubTopic       map[string]string
}

ConfigControllerModel for Config controller

var ConfigController *ConfigControllerModel

ConfigController object for ConfigControllerModel

type Delete

type Delete struct {
	TableName                 string                              `json:"TableName"`
	PrimaryKeyMap             map[string]interface{}              `json:"PrimaryKeyMap"`
	ConditionExpression       string                              `json:"ConditionExpression"`
	ExpressionAttributeMap    map[string]interface{}              `json:"ExpressionAttributeMap"`
	Key                       map[string]*dynamodb.AttributeValue `json:"Key"`
	ExpressionAttributeValues map[string]*dynamodb.AttributeValue `json:"ExpressionAttributeValues"`
	ExpressionAttributeNames  map[string]string                   `json:"ExpressionAttributeNames"`
}

Delete struct

type Eval

type Eval struct {
	Cond       *vm.Program
	Attributes []string
	Cols       []string
	Tokens     []string
	ValueMap   map[string]interface{}
}

Eval for Evaluation expression

type GetItemMeta

type GetItemMeta struct {
	TableName                string                              `json:"TableName"`
	PrimaryKeyMap            map[string]interface{}              `json:"PrimaryKeyMap"`
	ProjectionExpression     string                              `json:"ProjectionExpression"`
	ExpressionAttributeNames map[string]string                   `json:"ExpressionAttributeNames"`
	Key                      map[string]*dynamodb.AttributeValue `json:"Key"`
}

GetItemMeta struct

type GetKeyMeta

type GetKeyMeta struct {
	Key          string                              `json:"Key"`
	Type         string                              `json:"Type"`
	DynamoObject map[string]*dynamodb.AttributeValue `json:"DynamoObject"`
}

GetKeyMeta struct

type Meta

type Meta struct {
	TableName                 string                              `json:"TableName"`
	AttrMap                   map[string]interface{}              `json:"AttrMap"`
	ReturnValues              string                              `json:"ReturnValues"`
	ConditionExpression       string                              `json:"ConditionExpression"`
	ExpressionAttributeMap    map[string]interface{}              `json:"ExpressionAttributeMap"`
	ExpressionAttributeNames  map[string]string                   `json:"ExpressionAttributeNames"`
	ExpressionAttributeValues map[string]*dynamodb.AttributeValue `json:"ExpressionAttributeValues"`
	Item                      map[string]*dynamodb.AttributeValue `json:"Item"`
}

Meta struct

type Query

type Query struct {
	TableName                 string                              `json:"TableName"`
	IndexName                 string                              `json:"IndexName"`
	OnlyCount                 bool                                `json:"OnlyCount"`
	Limit                     int64                               `json:"Limit"`
	SortAscending             bool                                `json:"ScanIndexForward"`
	StartFrom                 map[string]interface{}              `json:"StartFrom"`
	ProjectionExpression      string                              `json:"ProjectionExpression"`
	ExpressionAttributeNames  map[string]string                   `json:"ExpressionAttributeNames"`
	FilterExp                 string                              `json:"FilterExpression"`
	RangeExp                  string                              `json:"KeyConditionExpression"`
	RangeValMap               map[string]interface{}              `json:"RangeValMap"`
	ExpressionAttributeValues map[string]*dynamodb.AttributeValue `json:"ExpressionAttributeValues"`
	ExclusiveStartKey         map[string]*dynamodb.AttributeValue `json:"ExclusiveStartKey"`
	Select                    string                              `json:"Select"`
}

Query struct

type ScanMeta

type ScanMeta struct {
	TableName                 string                              `json:"TableName"`
	IndexName                 string                              `json:"IndexName"`
	OnlyCount                 bool                                `json:"OnlyCount"`
	Select                    string                              `json:"Select"`
	Limit                     int64                               `json:"Limit"`
	StartFrom                 map[string]interface{}              `json:"StartFrom"`
	ExclusiveStartKey         map[string]*dynamodb.AttributeValue `json:"ExclusiveStartKey"`
	FilterExpression          string                              `json:"FilterExpression"`
	ProjectionExpression      string                              `json:"ProjectionExpression"`
	ExpressionAttributeNames  map[string]string                   `json:"ExpressionAttributeNames"`
	ExpressionAttributeMap    map[string]interface{}              `json:"ExpressionAttributeMap"`
	ExpressionAttributeValues map[string]*dynamodb.AttributeValue `json:"ExpressionAttributeValues"`
}

ScanMeta for Scan request

type SetKeyMeta

type SetKeyMeta struct {
	Key          string                              `json:"Key"`
	Type         string                              `json:"Type"`
	Value        string                              `json:"Value"`
	DynamoObject map[string]*dynamodb.AttributeValue `json:"DynamoObject"`
}

SetKeyMeta struct

type StreamDataModel

type StreamDataModel struct {
	OldImage       map[string]interface{} `json:"OldImage"`
	NewImage       map[string]interface{} `json:"NewImage"`
	Keys           map[string]interface{} `json:"Keys"`
	Timestamp      int64                  `json:"Timestamp"`
	Table          string                 `json:"TableName"`
	EventName      string                 `json:"EventName"`
	SequenceNumber int64                  `json:"SequenceNumber"`
	EventID        string                 `json:"EventId"`
	EventSourceArn string                 `json:"EventSourceArn"`
}

StreamDataModel for streaming data

type TableConfig

type TableConfig struct {
	PartitionKey     string                 `json:"PartitionKey,omitempty"`
	SortKey          string                 `json:"SortKey,omitempty"`
	Indices          map[string]TableConfig `json:"Indices,omitempty"`
	GCSSourcePath    string                 `json:"GcsSourcePath,omitempty"`
	DDBIndexName     string                 `json:"DdbIndexName,omitempty"`
	SpannerIndexName string                 `json:"Table,omitempty"`
	IsPadded         bool                   `json:"IsPadded,omitempty"`
	IsComplement     bool                   `json:"IsComplement,omitempty"`
	TableSource      string                 `json:"TableSource,omitempty"`
	ActualTable      string                 `json:"ActualTable,omitempty"`
}

TableConfig for Configuration table

type UpdateAttr

type UpdateAttr struct {
	TableName                 string                              `json:"TableName"`
	PrimaryKeyMap             map[string]interface{}              `json:"PrimaryKeyMap"`
	ReturnValues              string                              `json:"ReturnValues"`
	UpdateExpression          string                              `json:"UpdateExpression"`
	ConditionExpression       string                              `json:"ConditionExpression"`
	ExpressionAttributeMap    map[string]interface{}              `json:"AttrVals"`
	ExpressionAttributeNames  map[string]string                   `json:"ExpressionAttributeNames"`
	Key                       map[string]*dynamodb.AttributeValue `json:"Key"`
	ExpressionAttributeValues map[string]*dynamodb.AttributeValue `json:"ExpressionAttributeValues"`
}

UpdateAttr struct

type UpdateExpressionCondition

type UpdateExpressionCondition struct {
	Field     []string
	Value     []string
	Condition []string
	ActionVal string
	AddValues map[string]float64
}

UpdateExpressionCondition for Update Condition

Jump to

Keyboard shortcuts

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