Versions in this module Expand all Collapse all v1 v1.0.1 Mar 4, 2022 v1.0.0 Mar 3, 2022 Changes in this version + const APP_BU + const APP_NAME + const DEBUG + const ENV + const FILE_VERSION + const PGDATABASE + const PGHOST + const PGLIFETIME + const PGMAXCONN + const PGMAXIDLE + const PGPASSWORD + const PGPORT + const PGUSER + const SENTRY_DSN + const SENTRY_ENV + func Debug(v ...interface{}) + func DebugNewline() + func Debugf(format string, v ...interface{}) + func Debugv(v ...interface{}) + func DisableOutput() + func Error(v ...interface{}) + func ErrorHandler(c *fiber.Ctx, code int, err error) error + func ErrorHandlerThrow(c *fiber.Ctx, code int, err error) error + func ErrorThrow(errMsg string) + func ErrorThrowf(format string, v ...interface{}) + func Errorf(format string, v ...interface{}) + func Estimated(start time.Time) int + func EstimatedPrint(start time.Time, name string, ctx ...*fiber.Ctx) + func Fatal(v ...interface{}) + func Fatalf(format string, v ...interface{}) + func Info(v ...interface{}) + func Infof(format string, v ...interface{}) + func Initialize(appName string) (appTitle string, appVersion string, appIsProduction bool) + func IsRollback(err error, stx *PGTx) bool + func IsRollbackThrow(err error, stx *PGTx) bool + func Round(n float64, m float64) float64 + func ToSize(size int) string + func Warn(v ...interface{}) + func Warnf(format string, v ...interface{}) + type CSV struct + func (file *CSV) AddHeader(data ...string) error + func (file *CSV) Appendln(data ...string) error + func (file *CSV) GetColumns() string + func (file *CSV) GetDelimiter() string + func (file *CSV) GetFilePath() string + func (file *CSV) Remove() error + func (file *CSV) Save() error + type Courier struct + ID string + Paging struct{ ... } + type DataStore struct + AppID string + BuAPIMap map[string]bool + CourierMap map[string]*Courier + TokenSet SubSet + func PrepareDataStore(pgx *PGClient, ctx *context.Context, appTitle string, appName string) *DataStore + func (d *DataStore) BUCodeVerifyAPI(buCode string) error + func (d *DataStore) GetCourierConfig(courierId string) *Courier + func (d *DataStore) GetCourierId(auth string) string + func (d *DataStore) SetConfigBUAllow(stx *PGTx) error + func (d *DataStore) SetConfigCourierToken(stx *PGTx) error + type HTTP struct + Code int + Error *string + func HttpErrorPrint(code int, format string, v ...interface{}) *HTTP + func HttpErrorPrintf(code int, v ...interface{}) *HTTP + func HttpErrorf(code int, err error) *HTTP + func (e *HTTP) ErrorHandlerThrow(c *fiber.Ctx) error + type HTTPRequest struct + func CreateClient(config *HTTPTransport) (*HTTPRequest, error) + func (e *HTTPRequest) HeaderAdd(name string, value string) + func (e *HTTPRequest) HeaderClear() + func (e *HTTPRequest) Send(reqMethod string, reqUrl string, reqBuffer []byte) ([]byte, int, time.Duration, error) + type HTTPTransport struct + AllowRedirects bool + AppName string + AppVersion string + CACert string + ClientCert string + ClientKey string + DisableCompression bool + DisableKeepAlive bool + SkipVerify bool + Timeout int + UseHTTP2 bool + type PGClient struct + DB *sql.DB + func (pg *PGClient) Begin() (*PGTx, error) + func (pg *PGClient) Close() error + func (pg *PGClient) Connect(c *context.Context, appTitle string) + func (pg *PGClient) CreateChannel(appTitle string) (*PGNotify, error) + type PGNotify struct + func (pg *PGNotify) Close() error + func (pg *PGNotify) Listen(channelName string, eventCallback func(e *pq.Notification)) error + func (pg *PGNotify) Ping() error + type PGRecord []PGRow + func (row PGRecord) Find(columnName string, compareValue string) bool + type PGRow map[string]string + func (pg PGRow) ToBoolean(name string) bool + func (pg PGRow) ToByte(name string) []byte + func (pg PGRow) ToFloat64(name string) float64 + func (pg PGRow) ToInt64(name string) int64 + func (pg PGRow) ToTime(name string) time.Time + type PGTx struct + Closed bool + func (stx *PGTx) Commit() error + func (stx *PGTx) Execute(query string, args ...interface{}) error + func (stx *PGTx) ExecutePrint(query string, args ...interface{}) error + func (stx *PGTx) FetchAll(rows *sql.Rows) (PGRecord, error) + func (stx *PGTx) FetchOneColumn(rows *sql.Rows, columnName string) (SubSet, error) + func (stx *PGTx) FetchRow(rows *sql.Rows) (PGRow, error) + func (stx *PGTx) Query(query string, args ...interface{}) (*sql.Rows, error) + func (stx *PGTx) QueryOne(query string, args ...interface{}) (PGRow, error) + func (stx *PGTx) QueryOnePrint(query string, args ...interface{}) (PGRow, error) + func (stx *PGTx) QueryPrint(query string, args ...interface{}) (*sql.Rows, error) + func (stx *PGTx) Rollback() error + type SubSet []string + func (s *SubSet) Find(val string) int + func (s *SubSet) ToParam() string