Documentation ¶
Index ¶
- Variables
- func BackoffErrorNotify(prefix string) backoff.Notify
- func BsonMEqual(v1, v2 bson.M) (ok bool)
- func BytesToString(b []byte) string
- func CleanupDemo() (err error)
- func Close(c io.Closer)
- func Compress(files []*os.File, dest string) error
- func ComputeHmacSha256(message string, secret string) string
- func Contains(array interface{}, val interface{}) (fla bool)
- func CopyDir(src string, dst string) error
- func CopyFile(src, dst string) error
- func CreateDirPath(filePath string)
- func DeCompress(srcFile *os.File, dstPath string) error
- func DeCompressByPath(tarFile, dest string) error
- func DecryptAES(src string) (res string, err error)
- func DefaultWait()
- func DenormalizeBsonMObjectId(m bson.M) (res bson.M)
- func EncryptAES(src string) (res string, err error)
- func EncryptMd5(str string) string
- func EnvIsTrue(key string, defaultOk bool) bool
- func Exists(path string) bool
- func FillEmptyFileData(data []byte) (res []byte)
- func FilterToQuery(f interfaces.Filter) (q bson.M, err error)
- func ForceInitModule(fn func() error) (err error)
- func GetAllFilesFromDir(dirPath string) ([]*os.File, error)
- func GetApiAddress() (res string)
- func GetArrayItems(array interface{}) (res []interface{}, err error)
- func GetCockroachdbSession(ds *models.DataSource) (s db.Session, err error)
- func GetCockroachdbSessionWithTimeout(ds *models.DataSource, timeout time.Duration) (s db.Session, err error)
- func GetElasticsearchClient(ds *models.DataSource) (c *elasticsearch.Client, err error)
- func GetElasticsearchClientWithTimeout(ds *models.DataSource, timeout time.Duration) (c *elasticsearch.Client, err error)
- func GetElasticsearchQuery(query generic.ListQuery) (buf *bytes.Buffer)
- func GetElasticsearchQueryWithOptions(query generic.ListQuery, opts *generic.ListOptions) (buf *bytes.Buffer)
- func GetFilesFromDir(dirPath string) ([]*os.File, error)
- func GetFromDbCache(key string, getFn func() (string, error)) (res string, err error)
- func GetKafkaConnection(ds *models.DataSource) (c *kafka.Conn, err error)
- func GetKafkaConnectionWithTimeout(ds *models.DataSource, timeout time.Duration) (c *kafka.Conn, err error)
- func GetLocalTime(t time.Time) time.Time
- func GetLocalTimeString(t time.Time) string
- func GetMongoClient(ds *models.DataSource) (c *mongo2.Client, err error)
- func GetMongoClientWithTimeout(ds *models.DataSource, timeout time.Duration) (c *mongo2.Client, err error)
- func GetMongoOpts(opts *generic.ListOptions) (res *mongo.FindOptions)
- func GetMongoQuery(query generic.ListQuery) (res bson.M)
- func GetMssqlSession(ds *models.DataSource) (s db.Session, err error)
- func GetMssqlSessionWithTimeout(ds *models.DataSource, timeout time.Duration) (s db.Session, err error)
- func GetMysqlSession(ds *models.DataSource) (s db.Session, err error)
- func GetMysqlSessionWithTimeout(ds *models.DataSource, timeout time.Duration) (s db.Session, err error)
- func GetNodeType() string
- func GetPostgresqlSession(ds *models.DataSource) (s db.Session, err error)
- func GetPostgresqlSessionWithTimeout(ds *models.DataSource, timeout time.Duration) (s db.Session, err error)
- func GetResultHash(value interface{}, keys []string) (res string, err error)
- func GetRpcParam(key string, params map[string]string) string
- func GetSecretKey() string
- func GetSecretKeyBytes() []byte
- func GetSpiderCol(col string, name string) string
- func GetSpiderMd5Str(file string) string
- func GetSqlQuery(query generic.ListQuery) (res db.Cond)
- func GetSqliteSession(ds *models.DataSource) (s db.Session, err error)
- func GetSqliteSessionWithTimeout(ds *models.DataSource, timeout time.Duration) (s db.Session, err error)
- func GetTimeString(t time.Time) string
- func GetUserFromArgs(args ...interface{}) (u interfaces.User)
- func ImportDemo() (err error)
- func InitGitClientAuth(g *models.Git, gitClient *vcs.GitClient)
- func InitModule(id interfaces.ModuleId, fn func() error) (err error)
- func InitializedDemo() (ok bool)
- func IsCancellable(status string) bool
- func IsDebug() bool
- func IsDemo() (ok bool)
- func IsDir(path string) bool
- func IsDocker() (ok bool)
- func IsFile(path string) bool
- func IsMaster() bool
- func JsonToBytes(d interface{}) (bytes []byte, err error)
- func ListDir(path string) []os.FileInfo
- func LogDebug(msg string)
- func NewUUIDString() (res string)
- func NormalizeBsonMObjectId(m bson.M) (res bson.M)
- func NormalizeObjectId(v interface{}) (res interface{})
- func ObjectToString(params interface{}) string
- func OpenFile(fileName string) *os.File
- func ReadFileOneLine(fileName string) string
- func ReimportDemo() (err error)
- func RemoveFiles(path string)
- func SetFileVariable(filePath string, key string, value string) error
- func ShuffleArray(slice []interface{}) (err error)
- func StringArrayContains(arr []string, str string) bool
- func TrimFileData(data []byte) (res []byte)
- func VisualizeContainer(c *dig.Container) (err error)
- type ChanMap
Constants ¶
This section is empty.
Variables ¶
View Source
var CronUtils = cronUtils{ // contains filtered or unexported fields }
View Source
var TaskExecChanMap = NewChanMap()
Functions ¶
func BackoffErrorNotify ¶ added in v0.6.0
func BackoffErrorNotify(prefix string) backoff.Notify
func BsonMEqual ¶ added in v0.6.0
func BytesToString ¶
func CleanupDemo ¶ added in v0.6.1
func CleanupDemo() (err error)
func ComputeHmacSha256 ¶
func DeCompressByPath ¶
func DecryptAES ¶ added in v0.6.0
func DefaultWait ¶ added in v0.6.0
func DefaultWait()
func DenormalizeBsonMObjectId ¶ added in v0.6.0
func EncryptAES ¶ added in v0.6.0
func EncryptMd5 ¶ added in v0.6.0
func FillEmptyFileData ¶ added in v0.6.0
func FilterToQuery ¶ added in v0.6.1
func FilterToQuery(f interfaces.Filter) (q bson.M, err error)
FilterToQuery Translate entity.Filter to bson.M
func ForceInitModule ¶ added in v0.6.0
func GetApiAddress ¶ added in v0.6.1
func GetApiAddress() (res string)
func GetArrayItems ¶ added in v0.6.0
func GetArrayItems(array interface{}) (res []interface{}, err error)
func GetCockroachdbSession ¶ added in v0.6.2
func GetCockroachdbSession(ds *models.DataSource) (s db.Session, err error)
func GetCockroachdbSessionWithTimeout ¶ added in v0.6.2
func GetCockroachdbSessionWithTimeout(ds *models.DataSource, timeout time.Duration) (s db.Session, err error)
func GetElasticsearchClient ¶ added in v0.6.2
func GetElasticsearchClient(ds *models.DataSource) (c *elasticsearch.Client, err error)
func GetElasticsearchClientWithTimeout ¶ added in v0.6.2
func GetElasticsearchClientWithTimeout(ds *models.DataSource, timeout time.Duration) (c *elasticsearch.Client, err error)
func GetElasticsearchQuery ¶ added in v0.6.2
func GetElasticsearchQueryWithOptions ¶ added in v0.6.2
func GetFromDbCache ¶ added in v0.6.0
func GetKafkaConnection ¶ added in v0.6.2
func GetKafkaConnection(ds *models.DataSource) (c *kafka.Conn, err error)
func GetKafkaConnectionWithTimeout ¶ added in v0.6.2
func GetKafkaConnectionWithTimeout(ds *models.DataSource, timeout time.Duration) (c *kafka.Conn, err error)
func GetLocalTimeString ¶
func GetMongoClient ¶ added in v0.6.2
func GetMongoClient(ds *models.DataSource) (c *mongo2.Client, err error)
func GetMongoClientWithTimeout ¶ added in v0.6.2
func GetMongoOpts ¶ added in v0.6.0
func GetMongoOpts(opts *generic.ListOptions) (res *mongo.FindOptions)
func GetMssqlSession ¶ added in v0.6.2
func GetMssqlSession(ds *models.DataSource) (s db.Session, err error)
func GetMssqlSessionWithTimeout ¶ added in v0.6.2
func GetMssqlSessionWithTimeout(ds *models.DataSource, timeout time.Duration) (s db.Session, err error)
func GetMysqlSession ¶ added in v0.6.2
func GetMysqlSession(ds *models.DataSource) (s db.Session, err error)
func GetMysqlSessionWithTimeout ¶ added in v0.6.2
func GetMysqlSessionWithTimeout(ds *models.DataSource, timeout time.Duration) (s db.Session, err error)
func GetNodeType ¶ added in v0.6.1
func GetNodeType() string
func GetPostgresqlSession ¶ added in v0.6.2
func GetPostgresqlSession(ds *models.DataSource) (s db.Session, err error)
func GetPostgresqlSessionWithTimeout ¶ added in v0.6.2
func GetPostgresqlSessionWithTimeout(ds *models.DataSource, timeout time.Duration) (s db.Session, err error)
func GetResultHash ¶ added in v0.6.1
func GetSecretKey ¶ added in v0.6.0
func GetSecretKey() string
func GetSecretKeyBytes ¶ added in v0.6.0
func GetSecretKeyBytes() []byte
func GetSpiderCol ¶
func GetSpiderMd5Str ¶
func GetSqlQuery ¶ added in v0.6.2
func GetSqliteSession ¶ added in v0.6.2
func GetSqliteSession(ds *models.DataSource) (s db.Session, err error)
func GetSqliteSessionWithTimeout ¶ added in v0.6.2
func GetSqliteSessionWithTimeout(ds *models.DataSource, timeout time.Duration) (s db.Session, err error)
func GetTimeString ¶
func GetUserFromArgs ¶ added in v0.6.0
func GetUserFromArgs(args ...interface{}) (u interfaces.User)
func ImportDemo ¶ added in v0.6.1
func ImportDemo() (err error)
func InitGitClientAuth ¶ added in v0.6.1
func InitModule ¶ added in v0.6.0
func InitModule(id interfaces.ModuleId, fn func() error) (err error)
func InitializedDemo ¶ added in v0.6.1
func InitializedDemo() (ok bool)
func IsCancellable ¶ added in v0.6.0
func JsonToBytes ¶ added in v0.6.0
func NewUUIDString ¶ added in v0.6.0
func NewUUIDString() (res string)
func NormalizeObjectId ¶ added in v0.6.1
func NormalizeObjectId(v interface{}) (res interface{})
func ReadFileOneLine ¶
func ReimportDemo ¶ added in v0.6.1
func ReimportDemo() (err error)
func RemoveFiles ¶
func RemoveFiles(path string)
func SetFileVariable ¶
设置文件变量值 可以理解为将文件中的变量占位符替换为想要设置的值
func ShuffleArray ¶ added in v0.6.0
func ShuffleArray(slice []interface{}) (err error)
func StringArrayContains ¶
func TrimFileData ¶ added in v0.6.0
func VisualizeContainer ¶ added in v0.6.0
Types ¶
type ChanMap ¶
type ChanMap struct {
// contains filtered or unexported fields
}
func NewChanMap ¶
func NewChanMap() *ChanMap
func (*ChanMap) ChanBlocked ¶
func (*ChanMap) HasChanKey ¶
Source Files ¶
- args.go
- array.go
- backoff.go
- bool.go
- bson.go
- cache.go
- chan.go
- cockroachdb.go
- cron.go
- debug.go
- demo.go
- di.go
- docker.go
- encrypt.go
- es.go
- file.go
- filter.go
- git.go
- helpers.go
- init.go
- json.go
- kafka.go
- mongo.go
- mssql.go
- mysql.go
- node.go
- os.go
- postgresql.go
- result.go
- rpc.go
- spider.go
- sql.go
- sqlite.go
- stats.go
- task.go
- time.go
- uuid.go
Click to show internal directories.
Click to hide internal directories.