dao

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Authorize

func Authorize(key, secret, method, bucket, file string, expire int64) (authorization string)

Authorize authorize returns authorization for upload file to bfs

func ConcatCondition

func ConcatCondition(conditions ...Condition) (conditionStr string, args []interface{}, hasOperator bool)

ConcatCondition concat conditions

func Upload

func Upload(c context.Context, fileName, fileType string, expire int64, body io.Reader, bfsConf *conf.Bfs) (location string, err error)

Upload upload picture or log file to bfs

Types

type Condition

type Condition struct {
	Before   string
	Key      string
	Operator string
	Value    interface{}
	After    string
	// contains filtered or unexported fields
}

Condition 生成的condition为 [before] [key] [operator] ? [after] 如

[(]		[id] 	[=] 		? 	[and]
		[ctime] 	[>] 	? 	[)]
		[order by] [time] 	nil []  //如果value是nil,不会设置placeholder ?

func AndCondition

func AndCondition(conditions ...Condition) (result []Condition)

AndCondition and condition

func OrCondition

func OrCondition(conditions ...Condition) (result []Condition)

OrCondition or condition

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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