Documentation
¶
Index ¶
- Constants
- Variables
- func AddFileToZip(zipWriter *zip.Writer, filename string) error
- func Backup(path, name, texto string)
- func CSVGZExport(StructCsv [][]string, nomeArquivo string) error
- func CSVRead(pathFile string) [][]string
- func CheckIfIdIfNotZero(objetoId int) interface{}
- func ConectionSQS() *sqs.SQS
- func ConnectAws() *session.Session
- func ConnectionBDFirebird() *sql.DB
- func ConnectionBDMySQL() *sql.DB
- func ConnectionBDPostgreSQL(applicationName string) *sql.DB
- func ConnectionBDPostgreSQLORM() (DB *gorm.DB)
- func ConnectionBDPostgreSQLRead(applicationName string) *sql.DB
- func ConnectionBDPostgreSQLWithSSL() *sql.DB
- func ConnectionMongoDB() *mongo.Database
- func ContainsInt(a []int, x int) bool
- func ContainsToStringInArray(a []string, x string) int
- func ContainsToStringInArrayReturnBool(a []string, x string) bool
- func ConverTimeToStrinLayoutYYYYMMDD(data time.Time) string
- func ConverTimeToStrinLayoutYYYY_MM_DD(data time.Time) string
- func ConvertFloat64ToString(value float64) string
- func ConvertFloat64ToString4Decimal(value float64) string
- func ConvertFloatToBrMoneyString(value float64) string
- func ConvertFloatToFloatScale2(valor float64) float64
- func ConvertIntToString(value int) string
- func ConvertPassword(password string) string
- func ConvertStringDD_MM_YYYY(date string) time.Time
- func ConvertStringToBool(value string) bool
- func ConvertStringToFloat64(value string) float64
- func ConvertStringToFloatScale2(value string) float64
- func ConvertStringToFloatScale2Comma(value string) float64
- func ConvertStringToFloatScale2FormatNumber(value string) float64
- func ConvertStringToInt(value string) int
- func ConvertStringToInt5Digits(value string) int
- func ConvertStringToTimeLayoutDDMMYYYY(value string) time.Time
- func ConvertStringToTimeLayoutDDMMYYYYHHMMSS(d time.Time, h time.Time) time.Time
- func ConvertStringToTimeLayoutDD_MM_YYYY(value string) time.Time
- func ConvertStringToTimeLayoutDD_MM_YYYY_HH_MM_SS(value string) time.Time
- func ConvertStringToTimeLayoutHHMMSS(value string) time.Time
- func ConvertStringToTimeLayoutHH_MM_SS(value string) time.Time
- func ConvertStringToTimeLayoutYYMMDDHHMMSS(value string) time.Time
- func ConvertStringToTimeLayoutYYYYMMDD(value string) time.Time
- func ConvertStringToTimeLayoutYYYYMMDDHHMMSS(value string) time.Time
- func ConvertStringToTimeLayoutYYYYMMDDTHHMMSS(value string) time.Time
- func ConvertStringToTimeLayoutYYYYMMDDTHHMMSSZONE(value string) time.Time
- func ConvertStringToTimeLayoutYYYY_MM_DD(value string) time.Time
- func ConvertStringToTimeLayoutYYYY_MM_DDTHH_MM_SS(value string) time.Time
- func ConvertStringToTimeLayoutYYYY_MM_DDTHH_MM_SS_000(value string) time.Time
- func ConvertStringToTimeLayoutYYYY_MM_DDTHH_MM_SS_000Z(value string) time.Time
- func ConvertStringToTimeLayout_YYYY_MM_DD_HH_MM_SS(date time.Time) string
- func ConvertTimeToStringLayoutDDMMYYYY(date time.Time) string
- func ConvertTimeToStringLayoutDD_MM_YYYY(date time.Time) string
- func ConvertTimeToStringLayoutMM_DD_YYYY_HH_MM(date time.Time) string
- func ConvertTimeToStringLayoutYYYY_MM_DDTHH_MM_SS_000(date time.Time) string
- func ConvertTimeToStringLayout_YYYY_MM_DD(date time.Time) string
- func ConvertToTimeLayout_YYYY_MM_DD_HH_MM_SS(value string) time.Time
- func ConvertkeepZeroToFloat64(value KeepZero) float64
- func ConvertkeepZeroToFloat64To4Decimal(value KeepZero) float64
- func CreateArchiveNodirectory(nomeDoArquivo string, conteudo string) error
- func CreateDirectory(directory string) bool
- func CreateFileDay(message Message)
- func DatePlusTime(date, timeOfDay time.Time) (time.Time, error)
- func DecodeBase64ToString(value string) string
- func EncodeStringToBase64(value string) string
- func EncodeToString(max int) string
- func ExecuteService(serviceConfig *service.Config)
- func ExpiryDate(valor string) (string, string)
- func GeneratePassword(passwordLength, minNum, minUpperCase int) string
- func GeneratePasswordCurrent() string
- func GeneratorFilesGen(payload []interface{}, f func([][]string) [][]string, nomeArq string) error
- func GetHostKey(host string, isProduction bool) ssh.PublicKey
- func Godotenv(key string) string
- func IsError(err error) bool
- func ListFolderFiles(path string) []os.FileInfo
- func ListOfAvailableFilesNoFTP(remote string, port string, user string, pass string) (*ftp.ServerConn, error, []string)
- func MaskCard(cardString string) string
- func MaskCard6Initials(cardString string) string
- func MaskLastDigits(card string) string
- func ParseBinToHex(s string) string
- func RandSeq(n int) string
- func RangeDate(end, start time.Time) func() time.Time
- func ReadingFiles(path string, fileName string) string
- func RemoveCNPJMask(cnpj string) string
- func RemoveCharacters(value string) string
- func RemoveFilesOfPath(path string)
- func RemoveHeadHyphen(s string) string
- func RemoveSpaceString(value string) string
- func RemoveSpecialCharacters(value string) string
- func RemoveZerosInLeft(value string) string
- func ReturnsTheRows(text string) []string
- func StandardizesMasksByCard(numeroCartao string) string
- func StringTrim(value string) string
- func Subtract(valo1, valor2 float64) float64
- func Throw(up Exception)
- func ToComparePassword(password1, password2 string) error
- func TokenGeneratorMessageId() string
- func TokenGeneratorNLength(length int) string
- func TokenGeneratorOrderReferenceId() string
- func UpdloadInS3(file multipart.File, path, fileName string) string
- func UpdloadInS3ArqTxt(texto string, path, fileName string) string
- func UpdloadInS3Base64(b64 string, path, fileName string) string
- func UpdloadInS3Base64Byte(b64 []byte, path, fileName string) string
- func UpdloadInS3NotTime(file multipart.File, path, fileName string) string
- func ValidateIfNotEmptyDate(data string) string
- func ValidateIfNotEmptyNumber(valor string) string
- func ValidateTelephone(telefone string) string
- func ValidationCNPJ(cnpj string) error
- func ValidationCPF(cpf string) error
- func WeekEndDate(date time.Time) time.Time
- func WeekStartDate(date time.Time) time.Time
- func ZipFiles(filename string, files []string) error
- type Block
- type Exception
- type KeepZero
- type Message
Constants ¶
const ( DEFAULT_DATE = "0001-01-01" LAYOUT_DDMMYYYY = "02012006" LAYOUT_DD_MM_YYYY = "02/01/2006" LAYOUT_DD_MM_YYYY_HH_MM_SS = "02/01/2006 15:04:05" LAYOUT_YYYY_MM_DD_HH_MM_SS = "2006-01-02 15:04:05" LAYOUT_MM_DD_YYYY_HH_MM = "01-02-2006 15:04" LAYOUT_YYYYMMDD = "20060102" LAYOUT_YYMMDDHHMMSS = "060102150405" LAYOUT_YYYYMMDDHHMMSS = "20060102150405" LAYOUT_YYYYMM = "200601" LAYOUT_YYYY_MM_DD = "2006-01-02" LAYOUT_YYMMDD = "060102" LAYOUT_HHMMSS = "150405" LAYOUT_HH = "15" LAYOUT_HH_MM_SS = "15:04:05" LAYOUT_YYYY_MM_DDTHH_MM_SS_000Z = "2006-01-02T15:04:05.000Z" LAYOUT_YYYY_MM_DDTHH_MM_SS = "2006-01-02 15:04:05" LAYOUT_YYYY_MM_DDTHH_MM_SS_000 = "2006-01-02T15:04:05.000" LAYOUTYYYYMMDDTHHMMSS = "2006-01-02T15:04:05" LAYOUTYYYYMMDDTHHMMSSZONE = "2006-01-02T15:04:05-07:00" )
Variables ¶
var AccessKeyID string
var MyRegion string
var SecretAccessKey string
Functions ¶
func CSVGZExport ¶
CSVGZExport o antigo nome era: CsvGzExport
func CheckIfIdIfNotZero ¶
func CheckIfIdIfNotZero(objetoId int) interface{}
CheckIfIdIfNotZero o antigo nome era: ChecaSeIdSeNaoEstaZero
func ConnectAws ¶
func ConnectionBDFirebird ¶
func ConnectionBDMySQL ¶
ConnectionBDMySQL o antigo nome era: ConexaoBDMySQL
func ConnectionBDPostgreSQL ¶
Esse método retorna uma conexão que possa dar INSERT, UPDATE e DELETE. Podendo passar na variável host vários hosts, isso é muito bom para quando tem replicações, tipo assim:
host = "localhost;127.0.0.1"
func ConnectionBDPostgreSQLORM ¶
ConnectionBDPostgreSQLORM o antigo nome era: ConexaoBDORM
func ConnectionMongoDB ¶
func ContainsToStringInArray ¶
ContainsToStringInArray o antigo nome era: Contains
func ContainsToStringInArrayReturnBool ¶
ContainsToStringInArrayReturnBool o antigo nome era: ContainsReturnBool
func ConverTimeToStrinLayoutYYYYMMDD ¶
ConverTimeToStrinLayoutYYYYMMDD
func ConverTimeToStrinLayoutYYYY_MM_DD ¶
ConverTimeToStrinLayoutYYYY_MM_DD
func ConvertFloat64ToString ¶
ConvertFloat64ToString
func ConvertFloat64ToString4Decimal ¶
ConvertFloat64ToString4Decimal
func ConvertFloatToBrMoneyString ¶
ConvertFloatToBrMoneyString
func ConvertFloatToFloatScale2 ¶
ConvertFloatToFloatScale2
func ConvertPassword ¶
Hashing the password with the default cost of 10
func ConvertStringDD_MM_YYYY ¶
ConvertStringDD_MM_YYYY
func ConvertStringToBool ¶
func ConvertStringToFloat64 ¶
ConvertStringToFloat64
func ConvertStringToFloatScale2 ¶
ConvertStringToFloatScale2
func ConvertStringToFloatScale2Comma ¶
ConvertStringToFloatScale2Comma o antigo nome era: ConvertStringToFloatScale2Virgula
func ConvertStringToFloatScale2FormatNumber ¶
ConvertStringToFloatScale2Format o antigo nome era: ConvertStringToFloatScale2
func ConvertStringToInt5Digits ¶
ConvertStringToInt5Digits
func ConvertStringToTimeLayoutDDMMYYYY ¶
ConvertStringToTimeLayoutDDMMYYYY
func ConvertStringToTimeLayoutDDMMYYYYHHMMSS ¶
ConvertStringToTimeLayoutDDMMYYYYHHMMSS
func ConvertStringToTimeLayoutDD_MM_YYYY ¶
ConvertStringToTimeLayoutDD_MM_YYYY
func ConvertStringToTimeLayoutDD_MM_YYYY_HH_MM_SS ¶
ConvertStringToTimeLayoutDD_MM_YYYY_HH_MM_SS
func ConvertStringToTimeLayoutHHMMSS ¶
ConvertStringToTimeLayoutHHMMSS
func ConvertStringToTimeLayoutHH_MM_SS ¶
ConvertStringToTimeLayoutHH_MM_SS
func ConvertStringToTimeLayoutYYMMDDHHMMSS ¶
ConvertStringToTimeLayoutYYMMDDHHMMSS
func ConvertStringToTimeLayoutYYYYMMDD ¶
ConvertStringToTimeLayoutYYYYMMDD
func ConvertStringToTimeLayoutYYYYMMDDHHMMSS ¶
ConvertStringToTimeLayoutYYYYMMDDHHMMSS
func ConvertStringToTimeLayoutYYYYMMDDTHHMMSS ¶
ConvertStringToTimeLayoutYYYYMMDDTHHMMSS
func ConvertStringToTimeLayoutYYYY_MM_DD ¶
ConvertStringToTimeLayoutYYYY_MM_DD
func ConvertStringToTimeLayoutYYYY_MM_DDTHH_MM_SS ¶
ConvertStringToTimeLayoutYYYY_MM_DDTHH_MM_SS
func ConvertStringToTimeLayoutYYYY_MM_DDTHH_MM_SS_000 ¶
ConvertStringToTimeLayoutYYYY_MM_DDTHH_MM_SS_000
func ConvertStringToTimeLayoutYYYY_MM_DDTHH_MM_SS_000Z ¶
ConvertStringToTimeLayoutYYYY_MM_DDTHH_MM_SS_000Z
func ConvertStringToTimeLayout_YYYY_MM_DD_HH_MM_SS ¶
ConvertStringToTimeLayout_YYYY_MM_DD_HH_MM_SS o antigo nome era: ConvertStringToTimeLAYOUT_YYYY_MM_DD_HH_MM_SS
func ConvertTimeToStringLayoutDD_MM_YYYY ¶
ConvertTimeToStringLayoutDD_MM_YYYY
func ConvertTimeToStringLayoutYYYY_MM_DDTHH_MM_SS_000 ¶
ConvertTimeToStringLayoutYYYY_MM_DDTHH_MM_SS_000
func ConvertTimeToStringLayout_YYYY_MM_DD ¶
ConvertStringToTimeLayout_YYYY_MM_DD o antigo nome era: ConvertStringToTimeLAYOUT_YYYY_MM_DD
func ConvertkeepZeroToFloat64 ¶
ConvertkeepZeroToFloat64
func CreateArchiveNodirectory ¶
CreateArchiveNodirectory o antigo nome era: CreateArchiveNodirectory
func CreateDirectory ¶
CreateDirectory o antigo nome era: CriaDiretorio
func CreateFileDay ¶
func CreateFileDay(message Message)
func EncodeToString ¶
func ExecuteService ¶
func ExpiryDate ¶
ExpiryDate o antigo nome era: ValidadeCartao
func GeneratorFilesGen ¶
GeneratorFilesGen o antigo nome era: GeradorArquivosGen
func GetHostKey ¶
GetHostKey: parse OpenSSH known_hosts file ssh or use ssh-keyscan to get initial key
func ListFolderFiles ¶
ListFolderFiles o antigo nome era: ListarArquivosDaPasta
func ListOfAvailableFilesNoFTP ¶
func ListOfAvailableFilesNoFTP(remote string, port string, user string, pass string) (*ftp.ServerConn, error, []string)
ListOfAvailableFilesNoFTP o antigo nome era: ListaDeArquivosDisponiveisNoFTP
func MaskCard6Initials ¶
MaskCard6Initials o antigo nome era: MaskCard6DigitosIniciais
func MaskLastDigits ¶
MaskLastDigits o antigo nome era: MaskUltimosDigitos
func RangeDate ¶
RangeDate returns a date range function over start date to end date inclusive. After the end of the range, the range function returns a zero date, date.IsZero() is true.
func ReadingFiles ¶
ReadingFiles o antigo nome era: LeituraDosArquivos
func RemoveCNPJMask ¶
RemoveCNPJMask o antigo nome era: RemoveMascaraCNPJ
func RemoveCharacters ¶
RemoveCharacters o antigo nome era: RemoveCaracteres
func RemoveFilesOfPath ¶
func RemoveFilesOfPath(path string)
RemoveFilesOfPath o antigo nome era: RemoveFile
func RemoveHeadHyphen ¶
RemoveHeadHyphen o antigo nome era: RetiraPontoHifen
func RemoveSpaceString ¶
RemoveSpaceString o antigo nome era: TirarEspacoString
func RemoveSpecialCharacters ¶
RemoveSpecialCharacters
func ReturnsTheRows ¶
ReturnsTheRows o antigo nome era: RetornaAsLinhas
func StandardizesMasksByCard ¶
StandardizesMasksByCard o antigo nome era: PadronizaMascarasDeCartao
func ToComparePassword ¶
Comparing the password with the hash
func TokenGeneratorMessageId ¶
func TokenGeneratorMessageId() string
TokenGeneratorMessageId get token do Message.
func TokenGeneratorNLength ¶
TokenGeneratorNLength o antigo nome era: RandToken
func TokenGeneratorOrderReferenceId ¶
func TokenGeneratorOrderReferenceId() string
TokenGeneratorOrderReferenceId
func UpdloadInS3ArqTxt ¶
func UpdloadInS3Base64 ¶
func UpdloadInS3Base64Byte ¶
func UpdloadInS3NotTime ¶
func ValidateIfNotEmptyDate ¶
ValidateIfNotEmptyDate o antigo nome era: ValidaData
func ValidateIfNotEmptyNumber ¶
ValidateIfNotEmptyNumber o antigo nome era: ValidaDecimal
func ValidateTelephone ¶
ValidateTelephone o antigo nome era: ValidarTelefone
func ValidationCNPJ ¶
ValidationCNPJ o antigo nome era: ValidaCNPJ
func ValidationCPF ¶
ValidationCPF o antigo nome era: ValidaCPF
func WeekEndDate ¶
Qual é o dia da Sexta-feira da data que passou
func WeekStartDate ¶
Qual é o dia da Segunda-feira da data que passou
Types ¶
Source Files
¶
- array.go
- aws.go
- aws_s3.go
- aws_sqs.go
- base64.go
- bcrypt.go
- bool.go
- connection_firebird.go
- connection_mongodb.go
- connection_mysql.go
- connection_psql.go
- cpf_cnpj.go
- csv.go
- datetime.go
- environment.go
- file.go
- float.go
- ftp.go
- integer.go
- keep_zero.go
- logger_file.go
- password.go
- random.go
- service.go
- string.go
- struct.go
- try_catch.go
- validations.go
- zip.go