dbsaver

package
v4.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2022 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Default = func(fileM *modelFile.File, result *uploadClient.Result, reader io.Reader) error {
		err := fileM.Add(reader)
		if err != nil {
			return err
		}
		result.FileID = fileM.Id
		return err
	}
)

Functions

func Register

func Register(key string, dbsaver DBSaver)

Register 注册数据保存处理函数 key table.field

func Unregister

func Unregister(keys ...string)

Types

type DBSaver

type DBSaver func(fileM *modelFile.File, result *uploadClient.Result, reader io.Reader) error

func Get

func Get(key string, defaults ...string) DBSaver

Jump to

Keyboard shortcuts

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