dao

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2023 License: MIT Imports: 8 Imported by: 6 modules, 21 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	PropFormatEmpty = ""
	PropFormatTime  = "epoch_second"
)

Variables

This section is empty.

Functions

func Format

func Format(inter interface{}, f func(i interface{}) map[string]interface{}) (interface{}, int)

func GetObjectID

func GetObjectID(id interface{}) (primitive.ObjectID, error)

func NewEsIndex added in v0.9.0

func NewEsIndex() *index

Types

type CacheMapObj added in v1.4.2

type CacheMapObj interface {
	GetKey() string
	EncodeMap() (map[string]string, error)
	DecodeMap(map[string]string) error
}

type CacheObj added in v1.0.0

type CacheObj interface {
	GetKey() string
	Encode() ([]byte, error)
	SetStringCmd(sc *redis.StringCmd)
	Decode([]byte) error
	DecodePipe() error
	GetError() error
	HasError() bool
}

type Collection added in v1.5.0

type Collection interface {
	GetC() string
}

type ComCacheObj added in v1.0.0

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

func (*ComCacheObj) Decode added in v1.0.0

func (t *ComCacheObj) Decode(data []byte, i interface{}) error

func (*ComCacheObj) DecodePipe added in v1.0.0

func (t *ComCacheObj) DecodePipe(obj CacheObj) error

func (*ComCacheObj) Encode added in v1.0.0

func (t *ComCacheObj) Encode(i interface{}) ([]byte, error)

func (*ComCacheObj) GetError added in v1.0.0

func (s *ComCacheObj) GetError() error

func (*ComCacheObj) GetStringCmd added in v1.0.0

func (s *ComCacheObj) GetStringCmd() (*redis.StringCmd, error)

func (*ComCacheObj) HasError added in v1.0.0

func (s *ComCacheObj) HasError() bool

func (*ComCacheObj) SetStringCmd added in v1.0.0

func (s *ComCacheObj) SetStringCmd(sc *redis.StringCmd)

type CommonDoc

type CommonDoc struct {
	Records []*Record
}

func (*CommonDoc) AddRecord

func (c *CommonDoc) AddRecord(u LogUser, msg string) []*Record

func (*CommonDoc) GetC

func (u *CommonDoc) GetC() string

func (*CommonDoc) SetCreator

func (c *CommonDoc) SetCreator(lu LogUser)

type DocInter

type DocInter interface {
	Collection
	GetDoc() interface{}
	GetID() interface{}
	SetCreator(u LogUser)
	AddRecord(u LogUser, msg string) []*Record
	GetIndexes() []mongo.IndexModel
}

type ESDao added in v0.9.0

type ESDao interface {
	GetType() string
	GetJsonBody() (string, error)
	GetID() string
	GetMapping() string
}

type ListDoc

type ListDoc interface {
	GetID() string
	GetC() string
	GetList(slice interface{}) []ListDoc
	BeforeSave() error
}

type LogUser

type LogUser interface {
	GetName() string
	GetAccount() string
}

type Record added in v0.6.9

type Record struct {
	Datetime time.Time
	Summary  string
	Account  string
	Name     string
}

func NewRecord added in v0.6.8

func NewRecord(date time.Time, acc, name, msg string) *Record

type SearchDaoList added in v0.9.0

type SearchDaoList []ESDao

func (SearchDaoList) Add added in v0.9.0

func (sdl SearchDaoList) Add(sd ESDao) error

Jump to

Keyboard shortcuts

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