classify

package module
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CategoryHandler

type CategoryHandler func(item interface{}) interface{}

type Classify

type Classify struct {
	Values *vbtkey.Tree
	// contains filtered or unexported fields
}

分类

func New

func New() *Classify

func NewWithMode added in v1.0.3

func NewWithMode(mode string, handlers ...CategoryHandler) *Classify

func (*Classify) AddCategory

func (clsfy *Classify) AddCategory(name string, handler CategoryHandler) *Classify

func (*Classify) Build added in v1.0.0

func (clsfy *Classify) Build(mode string, handlers ...CategoryHandler)

func (*Classify) Categorys

func (clsfy *Classify) Categorys() string

func (*Classify) Collect

func (clsfy *Classify) Collect()

func (*Classify) CollectCategory

func (clsfy *Classify) CollectCategory(handler CategoryHandler)

func (*Classify) Get

func (clsfy *Classify) Get(out interface{}, vPaths ...interface{})

func (*Classify) Keys

func (clsfy *Classify) Keys(paths ...interface{}) (result []interface{})

func (*Classify) Put

func (clsfy *Classify) Put(v interface{})

func (*Classify) PutSlice added in v1.0.3

func (clsfy *Classify) PutSlice(items interface{})

type CountHandler added in v1.1.0

type CountHandler func(counted interface{}, item interface{})

type CreateCountedHandler added in v1.1.0

type CreateCountedHandler func(item interface{}) interface{}

type Streamer added in v1.1.0

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

Streamer 流计算

func NewStreamer added in v1.1.0

func NewStreamer(mode string, handlers ...CategoryHandler) *Streamer

NewStreamer CreateCountedHandler CountHandler Add 都必须要使用地址传入

func (*Streamer) Add added in v1.1.0

func (stream *Streamer) Add(item interface{})

func (*Streamer) AddCategory added in v1.1.0

func (stream *Streamer) AddCategory(handler CategoryHandler) *Streamer

func (*Streamer) Build added in v1.1.0

func (stream *Streamer) Build(mode string, handlers ...CategoryHandler)

func (*Streamer) RangeItems added in v1.1.0

func (stream *Streamer) RangeItems(do func(item interface{}) bool)

func (*Streamer) SetCountHandler added in v1.1.0

func (stream *Streamer) SetCountHandler(countHandler CountHandler) *Streamer

func (*Streamer) SetCreateCountedHandler added in v1.1.0

func (stream *Streamer) SetCreateCountedHandler(createHandler CreateCountedHandler) *Streamer

Jump to

Keyboard shortcuts

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