source

package
v0.4.6 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Detector

type Detector func(customer *dbschema.OfficialCustomer, sourceId string) bool

Detector 确认逻辑 如果sourceId为空白字符串,则代表不限制具体资源 例如 BoughtDetector(customer, “) 则代表判断是否购买过任一产品

type Info

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

Info 资源信息

func NewInfo

func NewInfo() *Info

func (*Info) AgentDetector

func (s *Info) AgentDetector() Detector

func (*Info) BoughtDetector

func (s *Info) BoughtDetector() Detector

func (*Info) InfoGetter

func (s *Info) InfoGetter() InfoGetter

func (*Info) InfoMapGetter

func (s *Info) InfoMapGetter() InfoMapGetter

func (*Info) SelectPage

func (s *Info) SelectPage() func(echo.Context) error

func (*Info) SetAgentDetector

func (s *Info) SetAgentDetector(fn Detector) *Info

func (*Info) SetBoughtDetector

func (s *Info) SetBoughtDetector(fn Detector) *Info

func (*Info) SetInfoGetter

func (s *Info) SetInfoGetter(fn InfoGetter) *Info

func (*Info) SetInfoMapGetter

func (s *Info) SetInfoMapGetter(fn InfoMapGetter) *Info

func (*Info) SetSelectPageHandler

func (s *Info) SetSelectPageHandler(h func(echo.Context) error) *Info

func (*Info) SetTagsGetter

func (s *Info) SetTagsGetter(fn TagsGetter) *Info

func (*Info) TagsGetter

func (s *Info) TagsGetter() TagsGetter

type InfoGetter

type InfoGetter func(ctx echo.Context, sourceId string) (echo.KV, error)

InfoGetter 查询单个数据

type InfoMapGetter

type InfoMapGetter func(ctx echo.Context, sourceId ...string) (map[string]echo.KV, error)

InfoMapGetter 查询多个数据

type Infor

type Infor interface {
	BoughtDetector() Detector
	AgentDetector() Detector
	InfoGetter() InfoGetter
	TagsGetter() TagsGetter
	SelectPage() func(echo.Context) error
}

Infor 数据接口

type Source

type Source struct {
	*echo.KVData
}

func New

func New() *Source

func (*Source) GetAgentDetector

func (s *Source) GetAgentDetector(sourceTable string) Detector

func (*Source) GetBoughtDetector

func (s *Source) GetBoughtDetector(sourceTable string) Detector

func (*Source) GetInfoGetter

func (s *Source) GetInfoGetter(sourceTable string) InfoGetter

func (*Source) GetInfoMapGetter

func (s *Source) GetInfoMapGetter(sourceTable string) InfoMapGetter

func (*Source) GetSelectPageHandler

func (s *Source) GetSelectPageHandler(sourceTable string) func(echo.Context) error

func (*Source) GetTagsGetter

func (s *Source) GetTagsGetter(sourceTable string) TagsGetter

type TagsGetter

type TagsGetter func(ctx echo.Context, sourceId interface{}) ([]echo.H, error)

TagsGetter 查询标签

Jump to

Keyboard shortcuts

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