Documentation ¶
Index ¶
- Constants
- Variables
- func Connect(ctx context.Context, endpoints []string, database string) error
- func CreateTable(ctx context.Context, conf *TableConfigs) (string, error)
- func GenerateSql(ctx context.Context, conf *TableConfigs) (string, error)
- func GetTableFieldTypes() []string
- func ListTable(ctx context.Context, endpoints []string) ([]action_sink.Table, error)
- func TableInfo(ctx context.Context, endpoints []string, tableName string) (action_sink.Table, error)
- type ActionConfig
- type MapField
- type ModelConfigs
- type ModelField
- type Table
- type TableConfigs
- type TableField
Constants ¶
View Source
const ChronusSinkId = "ChronusSinkId"
View Source
const SinkChronusHashTableKey = "rulemanager-sinks-chronus"
View Source
const SinkLogChronus = "[SinkChronus]"
Variables ¶
View Source
var EmptySQL = ""
View Source
var EnumBaseFieldTypes []action_sink.BaseFieldType = []action_sink.BaseFieldType{ { Name: "Int8", LengthLimit: false, }, { Name: "Int16", LengthLimit: false, }, { Name: "Int32", LengthLimit: false, }, { Name: "Int64", LengthLimit: false, }, { Name: "UInt8", LengthLimit: false, }, { Name: "UInt16", LengthLimit: false, }, { Name: "UInt32", LengthLimit: false, }, { Name: "UInt64", LengthLimit: false, }, { Name: "Float32", LengthLimit: false, }, { Name: "Float64", LengthLimit: false, }, { Name: "String", LengthLimit: false, }, { Name: "Date", LengthLimit: false, }, }
Functions ¶
func CreateTable ¶
func CreateTable(ctx context.Context, conf *TableConfigs) (string, error)
create table.
func GenerateSql ¶
func GenerateSql(ctx context.Context, conf *TableConfigs) (string, error)
generate sql.
func GetTableFieldTypes ¶
func GetTableFieldTypes() []string
Types ¶
type ActionConfig ¶
type MapField ¶
type MapField struct { TFieldName string `json:"tfield_name" mapstructure:"tfield_name"` MField ModelField `json:"mfield" mapstructure:"mfield"` }
type ModelConfigs ¶
type ModelField ¶
type Table ¶
type Table struct { Name string Fields []action_sink.TableField }
func (Table) GetFields ¶
func (t Table) GetFields() []action_sink.TableField
type TableConfigs ¶
type TableConfigs struct { Name string Database string Endpoints []string Partitions []string Fields []TableField }
type TableField ¶
func (TableField) GetName ¶
func (tf TableField) GetName() string
func (TableField) GetType ¶
func (tf TableField) GetType() string
func (TableField) ISPK ¶
func (tf TableField) ISPK() bool
Click to show internal directories.
Click to hide internal directories.