mylib

package module
v1.2.24 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2023 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Base64DecStd

func Base64DecStd(data string) string

func Base64DecUrl

func Base64DecUrl(data string) string

func Base64EncStd

func Base64EncStd(data string) string

func Base64EncUrl

func Base64EncUrl(data string) string

func BytesToString

func BytesToString(data []byte) string

func Concat

func Concat(args ...string) string

func ContainsInt added in v1.2.12

func ContainsInt(i []int, e int) bool

func ContainsStr added in v1.2.12

func ContainsStr(s []string, e string) bool

func Copy added in v1.2.15

func Copy(srcFolder string, destFolder string) bool

func CounterZeroNumber

func CounterZeroNumber(length int) string

func Get

func Get(client *http.Client, log Logging, contentType string, url string) (string, string, error)

func GetDate

func GetDate(dateFormat string) string

func GetDateAdd added in v1.2.13

func GetDateAdd(format string, day int, month int, year int) string

func GetDateTimeAdd added in v1.2.19

func GetDateTimeAdd(init string, add int, dateFormat string) string

func GetFormatTime

func GetFormatTime(layout string) string

func GetLogId

func GetLogId() string

func GetMD5 added in v1.2.7

func GetMD5(s string) string

func GetTomorrow

func GetTomorrow(day time.Duration) string

func GetTomorrowWithFormat added in v1.2.17

func GetTomorrowWithFormat(day time.Duration, formatDate string) string

func GetUniqId

func GetUniqId() string

func GetYesterday

func GetYesterday(day time.Duration) string

func GetYesterdayWithFormat added in v1.2.18

func GetYesterdayWithFormat(day time.Duration, formatDate string) string

func HttpClient

func HttpClient(timeout time.Duration, keepAlive time.Duration, useKeepAlive bool) *http.Client

func HttpDial

func HttpDial(url string, log Logging) error

func InlinePrintingXML

func InlinePrintingXML(xmlString string) string

func Post

func Post(client *http.Client, log Logging, headers map[string]string, url string, bodyRequest []byte) (string, string, error)

func RNG

func RNG(min int, max int) int

func ReadASingleValueInFile added in v1.2.11

func ReadASingleValueInFile(filename string, keyword string) string

func ReadGzFile added in v1.2.14

func ReadGzFile(filename string) ([]byte, error)

func ReadOnFile

func ReadOnFile(file string) string

func ReduceWords

func ReduceWords(words string, start int, length int) string

func RemoveTabAndEnter

func RemoveTabAndEnter(str string) string

func Shellout added in v1.2.21

func Shellout(command string) (string, string, error)

func Throw

func Throw(up Exception)

func WriteOnFile

func WriteOnFile(data string, file string, append bool, mode os.FileMode)

WriteOnFile function Args: 1. data = @string 2. file = @string 3. append = @boolean 4. mod = @string

Types

type Block

type Block struct {
	Try     func()
	Catch   func(Exception)
	Finally func()
}

func (Block) Do

func (tcf Block) Do()

type Exception

type Exception interface{}

type Logging

type Logging struct {
	LogPath             string
	LogLevel            int
	LogDefault          string
	AccessLogName       string
	AccessErrorLogName  string
	AccessLogFormat     string
	AccessLogTimeFormat string
	AccessLogTimeZone   string
	BroadcastLogName    string
	CmpProcessorLogName string
	MoReceiverLogName   string
	MoProcessorLogName  string
	MtProcessorLogName  string
	DrReceiverLogName   string
	DrProcessorLogName  string
	ChargingLogName     string
	RetryLogName        string
	PortalLogName       string
	TrxLogName          string
	LogThread           string
	LogFileName         string
	LogFileErr          string
	LogBehaviour        bool
}

func (*Logging) GetStringPathLog

func (l *Logging) GetStringPathLog(logName string) string

Used to define a full path of a log

func (*Logging) SetUpLog

func (l *Logging) SetUpLog(appname string, threadlog string, logname string, logerr string)

func (*Logging) Write

func (l *Logging) Write(logLevel string, behaviour bool, logMsg string)

Jump to

Keyboard shortcuts

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