Documentation ¶
Index ¶
- func FileIsExisted(path string) bool
- func GetCtxKeyDateTimeFormatFixFields(ctx context.Context) map[string]string
- func GetCtxKeyIgnoreSystemIndex(ctx context.Context) bool
- func GetCtxKeySourceESVersion(ctx context.Context) string
- func GetCtxKeySourceFieldMap(ctx context.Context) map[string]interface{}
- func GetCtxKeySourceIndexSetting(ctx context.Context) interface{}
- func GetCtxKeySourceObject(ctx context.Context) string
- func GetCtxKeyTargetESVersion(ctx context.Context) string
- func GetCtxKeyTargetFieldMap(ctx context.Context) map[string]interface{}
- func GetCtxKeyTargetIndexSetting(ctx context.Context) interface{}
- func GetCtxKeyTargetObject(ctx context.Context) string
- func GetCtxKeyTaskAction(ctx context.Context) string
- func GetCtxKeyTaskID(ctx context.Context) string
- func GetCtxKeyTaskName(ctx context.Context) string
- func GetFirstKeyMapValue(m map[string]interface{}) (string, map[string]interface{})
- func GetLogger(ctx context.Context) *log.Entry
- func GetSubDirectories(dir string) ([]string, error)
- func GetTaskLogger(ctx context.Context) *log.Entry
- func GetValueFromMapByPath(data map[string]interface{}, path string) (interface{}, bool)
- func GoRecovery(ctx context.Context, f func())
- func InitLogger(cfg *config.Config)
- func InsertSlice[T any](slice []T, index int, value T) []T
- func IsCustomError(err error, code ErrCode) bool
- func MaxAtomicUint64() *atomic.Uint64
- func NewCustomError(code ErrCode, format string, args ...any) error
- func Recovery(ctx context.Context)
- func SetCtxKeyDateTimeFormatFixFields(ctx context.Context, fields map[string]string) context.Context
- func SetCtxKeyIgnoreSystemIndex(ctx context.Context, ignoreSystemIndex bool) context.Context
- func SetCtxKeySourceESVersion(ctx context.Context, version string) context.Context
- func SetCtxKeySourceFieldMap(ctx context.Context, fieldMap map[string]interface{}) context.Context
- func SetCtxKeySourceIndexSetting(ctx context.Context, setting interface{}) context.Context
- func SetCtxKeySourceObject(ctx context.Context, obj string) context.Context
- func SetCtxKeyTargetESVersion(ctx context.Context, version string) context.Context
- func SetCtxKeyTargetFieldMap(ctx context.Context, fieldMap map[string]interface{}) context.Context
- func SetCtxKeyTargetIndexSetting(ctx context.Context, setting interface{}) context.Context
- func SetCtxKeyTargetObject(ctx context.Context, index string) context.Context
- func SetCtxKeyTaskAction(ctx context.Context, action string) context.Context
- func SetCtxKeyTaskID(ctx context.Context, id string) context.Context
- func SetCtxKeyTaskName(ctx context.Context, name string) context.Context
- func SetCtxKeyTaskProgress(ctx context.Context, taskProgress *TaskProgress) context.Context
- func SetValueFromMapByPath(data map[string]interface{}, path string, value interface{}) bool
- func ZeroAtomicUint64() *atomic.Uint64
- type CtxKey
- type CustomError
- type ErrCode
- type Errs
- type TaskProgress
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileIsExisted ¶ added in v1.0.30
func GetCtxKeyIgnoreSystemIndex ¶ added in v1.0.10
func GetCtxKeySourceFieldMap ¶
func GetCtxKeySourceObject ¶ added in v1.0.30
func GetCtxKeyTargetFieldMap ¶
func GetCtxKeyTargetObject ¶ added in v1.0.30
func GetCtxKeyTaskAction ¶
func GetCtxKeyTaskID ¶
func GetCtxKeyTaskName ¶
func GetFirstKeyMapValue ¶ added in v1.1.0
func GetSubDirectories ¶ added in v1.0.30
func GetValueFromMapByPath ¶ added in v1.1.0
func GoRecovery ¶
func InitLogger ¶
func InsertSlice ¶ added in v1.1.0
func IsCustomError ¶ added in v1.0.35
func MaxAtomicUint64 ¶ added in v1.0.35
func NewCustomError ¶ added in v1.0.35
NewCustomError creates a new CustomError with the given code and message.
func SetCtxKeyIgnoreSystemIndex ¶ added in v1.0.10
func SetCtxKeySourceFieldMap ¶
func SetCtxKeySourceObject ¶ added in v1.0.30
func SetCtxKeyTargetFieldMap ¶
func SetCtxKeyTargetObject ¶ added in v1.0.30
func SetCtxKeyTaskAction ¶
func SetCtxKeyTaskProgress ¶ added in v1.1.4
func SetCtxKeyTaskProgress(ctx context.Context, taskProgress *TaskProgress) context.Context
func SetValueFromMapByPath ¶ added in v1.1.0
func ZeroAtomicUint64 ¶ added in v1.0.35
Types ¶
type CtxKey ¶
type CtxKey string
const ( CtxKeySourceESVersion CtxKey = "sourceEsVersion" CtxKeyTargetESVersion CtxKey = "targetEsVersion" CtxKeySourceObject CtxKey = "sourceObject" CtxKeyTargetObject CtxKey = "targetObject" CtxKeyTaskName CtxKey = "taskName" CtxKeyTaskID CtxKey = "taskId" CtxKeyTaskAction CtxKey = "taskAction" CtxKeySourceIndexSetting CtxKey = "sourceIndexSetting" CtxKeyTargetIndexSetting CtxKey = "targetIndexSetting" CtxKeySourceFieldMap CtxKey = "sourceFieldMap" CtxKeyTargetFieldMap CtxKey = "targetFieldMap" CtxKeyDateTimeFormatFixFields CtxKey = "dateTimeFormatFixFields" CtxKeyIgnoreSystemIndex CtxKey = "ignoreSystemIndex" CtxKeyTaskProgress CtxKey = "taskProgress" )
type CustomError ¶ added in v1.0.35
func (*CustomError) Error ¶ added in v1.0.35
func (e *CustomError) Error() string
Error implements the error interface for CustomError.
type Errs ¶
type Errs struct {
// contains filtered or unexported fields
}
Errs is an error that collects other errors, for when you want to do several things and then report all of them.
type TaskProgress ¶ added in v1.1.4
func GetCtxKeyTaskProgress ¶ added in v1.1.4
func GetCtxKeyTaskProgress(ctx context.Context) *TaskProgress
Source Files ¶
Click to show internal directories.
Click to hide internal directories.