datax

package
v0.0.0-...-203c0f7 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: Apache-2.0 Imports: 41 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VcsActionInit   uint32 = 1 << 16
	VcsActionPullOK uint32 = 1 << 19
	VcsActionPullER uint32 = 1 << 20
)

Variables

View Source
var (
	VcsGitVerReg = regexp.MustCompile(`^[a-f0-9]{30,50}$`)
)

Functions

func FieldDebug

func FieldDebug(fields []*api.NodeField, colname string, length int) template.HTML

func FieldHtml

func FieldHtml(fields []*api.NodeField, colname string) template.HTML

func FieldHtmlPrint

func FieldHtmlPrint(nodeEntry api.Node, colname, lang string) template.HTML

func FieldHtmlSubPrint

func FieldHtmlSubPrint(nodeEntry api.Node, colname string, length int, lang string) template.HTML

func FieldString

func FieldString(fields []*api.NodeField, colname string) string

func FieldStringPrint

func FieldStringPrint(nodeEntry api.Node, colname, lang string) string

func FieldSubHtml

func FieldSubHtml(fields []*api.NodeField, colname string, length int) template.HTML

func FieldSubString

func FieldSubString(fields []*api.NodeField, colname string, length int) string

func FieldTimeFormat

func FieldTimeFormat(fields []*api.NodeField, colname, format string) string

func FilterUri

func FilterUri(data map[string]interface{}, args ...interface{}) template.URL

func GdocLocalPath

func GdocLocalPath(docId string) string

func GdocNodeId

func GdocNodeId(name string) string

func NodeTermQuery

func NodeTermQuery(modname string, model *api.NodeModel, terms []api.NodeTerm) []api.NodeTerm

func OpActionAllow

func OpActionAllow(opbase, op uint32) bool

func Pagelet

func Pagelet(data map[string]interface{}, args ...string) template.HTML

func StringSub

func StringSub(s string, start, length int) string

func TermTaxonomyCacheClean

func TermTaxonomyCacheClean(modname, table string)

func TermTaxonomyCacheEntry

func TermTaxonomyCacheEntry(modname, table string, termid uint32) *api.Term

func TermTaxonomyCacheIndexes

func TermTaxonomyCacheIndexes(modname, table, termid_s string) []uint32

func TextHtml2Str

func TextHtml2Str(src string) string

func TimeFormat

func TimeFormat(timeString, formatFrom, formatTo string) string

func UnixtimeFormat

func UnixtimeFormat(timeValue interface{}, formatTo string) string

func Worker

func Worker()

Types

type NodeSearchEngine

type NodeSearchEngine interface {
	Query(bucket string, q string, qs *QuerySet) api.NodeList
	Put(bucket string, node api.Node) error
	ModelSet(bucket string, model *api.NodeModel) error
}

func NewNodeSphinxSearchEngine

func NewNodeSphinxSearchEngine(prefix string) (NodeSearchEngine, error)

type NodeSphinxSearchEngine

type NodeSphinxSearchEngine struct {
	// contains filtered or unexported fields
}

func (*NodeSphinxSearchEngine) ModelSet

func (it *NodeSphinxSearchEngine) ModelSet(bukname string, model *api.NodeModel) error

func (*NodeSphinxSearchEngine) Put

func (it *NodeSphinxSearchEngine) Put(bukname string, node api.Node) error

func (*NodeSphinxSearchEngine) Query

func (it *NodeSphinxSearchEngine) Query(bukname string, q string, qs *QuerySet) api.NodeList

type QuerySet

type QuerySet struct {
	ModName string
	ModelID string

	Table string

	Pager bool
	// contains filtered or unexported fields
}

func NewQuery

func NewQuery(modname, table string) *QuerySet

func (*QuerySet) Filter

func (q *QuerySet) Filter(expr string, args ...interface{}) string

func (*QuerySet) FilterOr

func (q *QuerySet) FilterOr(expr string, args ...interface{}) string

func (*QuerySet) From

func (q *QuerySet) From(s string) string

func (*QuerySet) Hash

func (q *QuerySet) Hash() string

func (*QuerySet) Limit

func (q *QuerySet) Limit(num int64) string

func (*QuerySet) NodeCount

func (q *QuerySet) NodeCount() (int64, error)

func (*QuerySet) NodeEntry

func (q *QuerySet) NodeEntry() api.Node

func (*QuerySet) NodeList

func (q *QuerySet) NodeList(fields, terms []string) api.NodeList

func (*QuerySet) NodeListSearch

func (q *QuerySet) NodeListSearch(qry string) api.NodeList

func (*QuerySet) Offset

func (q *QuerySet) Offset(num int64) string

func (*QuerySet) Order

func (q *QuerySet) Order(s string) string

func (*QuerySet) Query

func (q *QuerySet) Query() []rdb.Entry

func (*QuerySet) QueryEntry

func (q *QuerySet) QueryEntry() *rdb.Entry

func (*QuerySet) Select

func (q *QuerySet) Select(s string) string

func (*QuerySet) TermCount

func (q *QuerySet) TermCount() (int64, error)

func (*QuerySet) TermEntry

func (q *QuerySet) TermEntry() api.Term

func (*QuerySet) TermList

func (q *QuerySet) TermList() api.TermList

func (*QuerySet) Where

func (q *QuerySet) Where() rdb.Filter

type SphinxSearchConfig

type SphinxSearchConfig struct {
	Prefix  string                           `json:"prefix"`
	Buckets []*SphinxSearchConfigBucketEntry `json:"buckets"`
	Daemon  struct {
		CpuCoreNum  int `json:"cpu_core_num"`
		MaxChildren int `json:"max_children"`
	} `json:"daemon"`
}

type SphinxSearchConfigBucketEntry

type SphinxSearchConfigBucketEntry struct {
	Name             string         `json:"name"`
	StatsFullIndexed int64          `json:"stats_full_indexed"`
	Model            *api.NodeModel `json:"model"`
	// contains filtered or unexported fields
}

type TermList

type TermList api.TermList

func TermSync

func TermSync(modname, modelid, terms string) (TermList, error)

func (*TermList) Content

func (t *TermList) Content() string

func (*TermList) Index

func (t *TermList) Index() string

type VcsRepoItem

type VcsRepoItem struct {
	Url      string `json:"url"`
	Branch   string `json:"branch"`
	Dir      string `json:"dir"`
	AuthUser string `json:"auth_user,omitempty"`
	AuthPass string `json:"auth_pass,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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