models

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: May 31, 2021 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIGeneralResult added in v1.0.4

type APIGeneralResult struct {
	Code    int         `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"data"`
}
 ============================================
	Created by andy pangaribuan on 2021/05/03
	Copyright andypangaribuan. All rights reserved.
   ============================================

type DbTxError added in v1.0.4

type DbTxError struct {
	Err error
	Msg string
}

type DbUnsafeSelectError added in v1.0.4

type DbUnsafeSelectError struct {
	LogType    string
	SqlQuery   string
	SqlPars    []interface{}
	LogMessage *string
	LogTrace   *string
}

type DirScan added in v1.0.4

type DirScan struct {
	IsDirectory              bool
	FileName                 string // e.g: file-x.yz
	FileExtension            string // e.g: yz
	FilePath                 string // e.g: /dir-a/dir-b/file-x.yz
	FileNameWithoutExtension string // e.g: file-x
	FileSize                 int64  // in bytes
	DirName                  string // e.g: dir-b
	DirPath                  string // e.g: /dir-a/dir-b
}

type IDbMaster added in v1.0.4

type IDbMaster interface {
	Ping() error
	Exec(sqlQuery string, sqlPars ...interface{}) error
	Transaction() (IDbTransaction, error)
}
 ============================================
	Created by andy pangaribuan on 2021/05/19
	Copyright andypangaribuan. All rights reserved.
   ============================================

type IDbSlave added in v1.0.4

type IDbSlave interface {
	Ping() error
	Count(sqlQuery string, sqlPars ...interface{}) (int, error)
	Select(out interface{}, sqlQuery string, sqlPars ...interface{}) (*DbUnsafeSelectError, error)
}

type IDbTransaction added in v1.0.4

type IDbTransaction interface {
	SqlQueries() []string
	SqlPars() [][]interface{}
	Exec(sqlQuery string, sqlPars ...interface{})
	Commit() *DbTxError
}

type NonBlockConcurrentProcessHolder added in v1.0.4

type NonBlockConcurrentProcessHolder struct {
	Done func()
}

Jump to

Keyboard shortcuts

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