Documentation ¶
Index ¶
- Variables
- func CheckSignature(i gorpmapper.Canonicaller, sig []byte) (bool, error)
- func ConfigureKeys(signatureKeys, encryptionKeys *[]keyloader.KeyConfig) error
- func Delete(db gorp.SqlExecutor, i interface{}) error
- func Get(ctx context.Context, db gorp.SqlExecutor, q Query, i interface{}, ...) (bool, error)
- func GetAll(ctx context.Context, db gorp.SqlExecutor, q Query, i interface{}, ...) error
- func GetInt(db gorp.SqlExecutor, q Query) (int64, error)
- func IDStringsToQueryString(ids []string) string
- func IDsToQueryString(ids []int64) string
- func Insert(db gorp.SqlExecutor, i interface{}) error
- func InsertAndSign(ctx context.Context, db gorpmapper.SqlExecutorWithTx, ...) error
- func JSONNullString(s sql.NullString, holder interface{}) error
- func JSONToNullString(i interface{}) (sql.NullString, error)
- func New(target interface{}, name string, autoIncrement bool, keys ...string) gorpmapper.TableMapping
- func Register(ms ...gorpmapper.TableMapping)
- func Update(db gorp.SqlExecutor, i interface{}) error
- func UpdateAndSign(ctx context.Context, db gorpmapper.SqlExecutorWithTx, ...) error
- func UpdateColumns(db gorp.SqlExecutor, i interface{}, columnFilter gorp.ColumnFilter) error
- func UpdateColumnsAndSign(ctx context.Context, db gorpmapper.SqlExecutorWithTx, ...) error
- type GetOptionFunc
- type Query
Constants ¶
This section is empty.
Variables ¶
View Source
var GetOptions = gorpmapper.GetOptions
View Source
var Mapper *gorpmapper.Mapper
Functions ¶
func CheckSignature ¶
func CheckSignature(i gorpmapper.Canonicaller, sig []byte) (bool, error)
func ConfigureKeys ¶
func Get ¶
func Get(ctx context.Context, db gorp.SqlExecutor, q Query, i interface{}, opts ...GetOptionFunc) (bool, error)
Get a value from database.
func GetAll ¶
func GetAll(ctx context.Context, db gorp.SqlExecutor, q Query, i interface{}, opts ...GetOptionFunc) error
GetAll values from database.
func GetInt ¶
func GetInt(db gorp.SqlExecutor, q Query) (int64, error)
GetInt a value from database.
func IDStringsToQueryString ¶
IDStringsToQueryString returns a comma separated list of given string ids.
func IDsToQueryString ¶
IDsToQueryString returns a comma separated list of given ids.
func InsertAndSign ¶
func InsertAndSign(ctx context.Context, db gorpmapper.SqlExecutorWithTx, i gorpmapper.Canonicaller) error
InsertAndSign a data in database, given data should implement canonicaller interface.
func JSONNullString ¶
func JSONNullString(s sql.NullString, holder interface{}) error
JSONNullString sets the holder with unmarshalled sql.NullString
func JSONToNullString ¶
func JSONToNullString(i interface{}) (sql.NullString, error)
JSONToNullString returns a valid sql.NullString with json-marshalled i
func New ¶
func New(target interface{}, name string, autoIncrement bool, keys ...string) gorpmapper.TableMapping
func Register ¶
func Register(ms ...gorpmapper.TableMapping)
func UpdateAndSign ¶
func UpdateAndSign(ctx context.Context, db gorpmapper.SqlExecutorWithTx, i gorpmapper.Canonicaller) error
UpdateAndSign a data in database, given data should implement canonicaller interface.
func UpdateColumns ¶
func UpdateColumns(db gorp.SqlExecutor, i interface{}, columnFilter gorp.ColumnFilter) error
func UpdateColumnsAndSign ¶
func UpdateColumnsAndSign(ctx context.Context, db gorpmapper.SqlExecutorWithTx, i gorpmapper.Canonicaller, colFilter gorp.ColumnFilter) error
UpdateColumnsAndSign a data in database, given data should implement canonicaller interface.
Types ¶
type GetOptionFunc ¶
type GetOptionFunc = gorpmapper.GetOptionFunc
Click to show internal directories.
Click to hide internal directories.