utils

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2023 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileExists

func FileExists(name string) bool

FileExists check if file exists

func FromSQLInt32OrZero

func FromSQLInt32OrZero(sqlData sql.NullInt32) int32

FromSQLInt32OrZero returns int from sql.NullInt32

func FromSQLStr

func FromSQLStr(sqlStr sql.NullString) string

FromSQLStr returns string from sql.NullString

func MakeFileName

func MakeFileName(ID, fileName string) string

MakeFileName prepares a file for file keeper

func MakeValidateFileName

func MakeValidateFileName(ID, fileName string) (string, error)

MakeValidateFileName prepares/sanitizes a file for file keeper and validates

func NewErrNonRestorableUsage

func NewErrNonRestorableUsage(err error) error

NewErrNonRestorableUsage creates new error

func ParamTrue

func ParamTrue(prm string) bool

ParamTrue - returns true if string param indicates true value

func RunPerfEndpoint

func RunPerfEndpoint()

func SupportAudioExt

func SupportAudioExt(ext string) bool

SupportAudioExt checks if audio ext is supported

func ToSQLInt32

func ToSQLInt32(i int32) sql.NullInt32

ToSQLInt32 creates new sql int instance

func ToSQLStr

func ToSQLStr(s string) sql.NullString

ToSQLStr creates new sql str instance

func WriteFile

func WriteFile(name string, data []byte) error

WriteFile write file to disk

Types

type ErrNonRestorableUsage

type ErrNonRestorableUsage struct {
	// contains filtered or unexported fields
}

ErrNonRestorableUsage indicates non restoreable usage error on any error system tries to restore users usage counter but on this error it does not

func (*ErrNonRestorableUsage) Error

func (e *ErrNonRestorableUsage) Error() string

func (*ErrNonRestorableUsage) Unwrap

func (e *ErrNonRestorableUsage) Unwrap() error

type GueLogAdapter

type GueLogAdapter struct {
	// contains filtered or unexported fields
}

GueLogAdapter implementation

func NewGueLoggerAdapter

func NewGueLoggerAdapter() *GueLogAdapter

NewGueLoggerAdapter creates new instance

func (*GueLogAdapter) Debug

func (l *GueLogAdapter) Debug(msg string, fields ...adapter.Field)

Debug implements adapter.Logger

func (*GueLogAdapter) Error

func (l *GueLogAdapter) Error(msg string, fields ...adapter.Field)

Error implements adapter.Logger

func (*GueLogAdapter) Info

func (l *GueLogAdapter) Info(msg string, fields ...adapter.Field)

Info implements adapter.Logger

func (*GueLogAdapter) With

func (l *GueLogAdapter) With(fields ...adapter.Field) adapter.Logger

With implements adapter.Logger

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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