interfaces

package
v1.3.7 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MongoDb

type MongoDb interface {
	TB(name string) MongoTb
}

type MongoTb

type MongoTb interface {
	Insert(data interface{}) error
	Delete(condi interface{}) error
	Update(replacement, condi interface{}) error
	Upsert(replacement, condi interface{}) error
	FindOne(result interface{}, filter interface{}) error
	FindALL(result interface{}, filter interface{}) error
}

type RedisDb

type RedisDb interface {
	Subscribe(topic string, msgFn func(channel, pattern, payload string))
	Publish(topic, msg string) (count int64, err error)
}

type SQLDb

type SQLDb interface {
	CreateTB(models ...interface{}) error
	TB(name string) SQLTb
}

type SQLTb

type SQLTb interface {
	Exec(queryFn func(tx *gorm.DB) *gorm.DB) error                        //执行
	ExecToSQL(queryFn func(tx *gorm.DB) *gorm.DB) (sql string, err error) //先执行后生成SQL
	ToSQLExec(queryFn func(tx *gorm.DB) *gorm.DB) (sql string, err error) //先产生SQL后执行
}

type SeaweedFS

type SeaweedFS interface {
	List(dirpath ...string) ([]SeaweedFile, error)
	Download(path string) ([]byte, error)
	Upload(path string, content []byte) error
	Delete(path string) error
	Info(path string) (SeaweedFile, error)
}

type SeaweedFile

type SeaweedFile interface {
	Path() string
	Name() string
	IsDir() bool
}

type WithConfig

type WithConfig interface {
	GetConfigMap() map[string]string
}

Jump to

Keyboard shortcuts

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