Documentation
¶
Index ¶
- func ExcelColumnType2String(ect ExcelColumnType) string
- func GetComments(f *excelize.File, sheetName string) map[string]string
- func GetStartXY(arr [][]string) (int, int)
- func HasDuplication(arr [][]string, x int) bool
- func ProcHead(arr [][]string, sx int, sy int) [][]string
- func StartChatBot(ctx context.Context, adacorecfgfn string, chatbotcfgfn string) error
- type DebugExcelColumnType
- type ExcelCellType
- type ExcelColumnType
- type ExcelColumnTypeObj
- type ExcelData
- type ServiceCore
- func (core *ServiceCore) NewAppData() (proto.Message, error)
- func (core *ServiceCore) NewUserData(ui *chatbotpb.UserInfo) (proto.Message, error)
- func (core *ServiceCore) OnDebug(ctx context.Context, serv *chatbot.Serv, chat *chatbotpb.ChatMsg, ...) ([]*chatbotpb.ChatMsg, error)
- func (core *ServiceCore) UnmarshalAppData(buf []byte) (proto.Message, error)
- func (core *ServiceCore) UnmarshalUserData(buf []byte) (proto.Message, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExcelColumnType2String ¶ added in v0.2.23
func ExcelColumnType2String(ect ExcelColumnType) string
ExcelColumnType2String - ExcelColumnType -> string
func GetComments ¶ added in v0.2.23
GetComments - get comments with sheetName
func GetStartXY ¶ added in v0.2.23
GetStartXY - get start x & y
func HasDuplication ¶ added in v0.2.23
HasDuplication - is there no duplication?
Types ¶
type DebugExcelColumnType ¶ added in v0.2.23
DebugExcelColumnType - excel column type
type ExcelCellType ¶ added in v0.2.23
type ExcelCellType int32
ExcelCellType - excel cell type
const ( // CellInvalid - invalid CellInvalid ExcelCellType = -1 // CellString - string CellString ExcelCellType = 0 // CellInt32 - int32 CellInt32 ExcelCellType = 1 // CellInt64 - int64 CellInt64 ExcelCellType = 2 // CellFloat32 - float32 CellFloat32 ExcelCellType = 3 // CellFloat64 - float64 CellFloat64 ExcelCellType = 4 // CellPercentage - percentage CellPercentage ExcelCellType = 5 // CellNull - null CellNull ExcelCellType = 6 )
func AnalysisCell ¶ added in v0.2.23
func AnalysisCell(arr [][]string, x int, sy int) ExcelCellType
AnalysisCell - analysis cell, exclude rows with y <= sy
type ExcelColumnType ¶ added in v0.2.23
type ExcelColumnType int32
ExcelColumnType - excel column type
const ( // ColumnInfo - info ColumnInfo ExcelColumnType = 0 // ColumnNumberPrimaryKey - number primary key ColumnNumberPrimaryKey ExcelColumnType = 1 // ColumnPrimaryKey - primary key ColumnPrimaryKey ExcelColumnType = 2 // ColumnDataTime - data time ColumnDataTime ExcelColumnType = 3 // ColumnNumber - number ColumnNumber ExcelColumnType = 4 // ColumnPercentage - percentage ColumnPercentage ExcelColumnType = 5 // ColumnIgnorePrimaryKey - ignore primary key ColumnIgnorePrimaryKey ExcelColumnType = 6 // ColumnCategory - category ColumnCategory ExcelColumnType = 7 // ColumnInt - int ColumnInt ExcelColumnType = 8 // ColumnTimestamp - timestamp ColumnTimestamp ExcelColumnType = 9 // ColumnTimestampMs - timestampms ColumnTimestampMs ExcelColumnType = 10 // ColumnNull - null ColumnNull ExcelColumnType = 11 // ColumnTreeCategory - tree category ColumnTreeCategory ExcelColumnType = 12 // ColumnIgnore - ignore ColumnIgnore ExcelColumnType = 13 // ColumnMultiCategories - multiple categories ColumnMultiCategories ExcelColumnType = 14 )
func AnalysisColumn ¶ added in v0.2.23
func AnalysisColumn(arr [][]string, x int, sy int) ExcelColumnType
AnalysisColumn - analysis column, exclude rows with y == 0
func AnalysisColumnsType ¶ added in v0.2.23
func AnalysisColumnsType(arr [][]string, sx int, sy int) []ExcelColumnType
AnalysisColumnsType - analysis column type
type ExcelColumnTypeObj ¶ added in v0.2.23
type ExcelColumnTypeObj struct { Name string Type ExcelColumnType Separator string }
ExcelColumnTypeObj - excel column type object
func AnalysisColumnsTypeWithComments ¶ added in v0.2.23
func AnalysisColumnsTypeWithComments(arr [][]string, sx int, sy int, mapComments map[string]string) []ExcelColumnTypeObj
AnalysisColumnsTypeWithComments - analysis ColumnsType with comments
type ExcelData ¶ added in v0.2.23
type ExcelData struct { StartX int StartY int Columns []ExcelColumnTypeObj ColumnsAuto []ExcelColumnType Arr [][]string CurSheetName string }
ExcelData - excel data
type ServiceCore ¶
type ServiceCore struct { }
ServiceCore - chatbot service core
func (*ServiceCore) NewAppData ¶
func (core *ServiceCore) NewAppData() (proto.Message, error)
NewAppData - new a app data
func (*ServiceCore) NewUserData ¶
NewUserData - new a userdata
func (*ServiceCore) OnDebug ¶ added in v0.2.23
func (core *ServiceCore) OnDebug(ctx context.Context, serv *chatbot.Serv, chat *chatbotpb.ChatMsg, ui *chatbotpb.UserInfo, ud proto.Message) ([]*chatbotpb.ChatMsg, error)
OnDebug - call in plugin.debug
func (*ServiceCore) UnmarshalAppData ¶
func (core *ServiceCore) UnmarshalAppData(buf []byte) (proto.Message, error)
UnmarshalAppData - unmarshal
func (*ServiceCore) UnmarshalUserData ¶
func (core *ServiceCore) UnmarshalUserData(buf []byte) (proto.Message, error)
UnmarshalUserData - unmarshal