interfaces

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2022 License: MIT Imports: 2 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 {
	Insert(data interface{}) (sql string, err error)
	Delete(query interface{}, args ...interface{}) (sql string, err error)
	Update(replacement interface{}, query interface{}, args ...interface{}) (sql string, err error)
	Upsert(replacement interface{}, query interface{}, args ...interface{}) (sql string, err error)
	FindOne(result interface{}, query interface{}, args ...interface{}) (sql string, err error)
	FindALL(result interface{}, query interface{}, args ...interface{}) (sql string, err error)

	Count(query interface{}, args ...interface{}) (count int64, err error)
	Exist(query interface{}, args ...interface{}) (has bool, err error)
	UseGorm(queryFn func(tx *gorm.DB) error) error
	UseXorm(queryFn func(tx *xorm.Engine) error) error
}

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