Documentation ¶
Index ¶
- Constants
- func Address(host string, port int) string
- func BannerTitle(name, version string, size int) string
- func BinarySearch(arr []string, target string) int
- func Contains(v interface{}, vals ...interface{}) bool
- func DecryptoAES(value string) (string, error)
- func Dijkstra(graph [][]int, start int) []int
- func DivInt(a, b int64) int64
- func DivNum(a, b float64) float64
- func Encrypt(value string, cryptoType CryptoType) (string, error)
- func ExtractMencion(str string) []string
- func GenId(id string) string
- func GenKey(id string) string
- func GeneratePortNumber() int
- func GetCodeVerify(length int) string
- func GoMod(atrib string) (string, error)
- func InInt(val string, in []string) bool
- func InStr(val string, in []string) bool
- func MinDistance(dist []int, visited []bool) int
- func More(tag string, expiration time.Duration) int64
- func NewId() string
- func Now() string
- func ParamQuote(str string, args ...any) string
- func Params(str string, args ...any) string
- func PasswordHash(password string) (string, error)
- func PasswordMatch(hashPassword string, password string) bool
- func QuickSort(arr []int) []int
- func Quote(val interface{}) any
- func TimeDifference(dateInt, dateEnd any) time.Duration
- func UUID() string
- func UUIndex(tag string) int64
- func ValidCode(val string) bool
- func ValidEmail(val string) bool
- func ValidId(val string) bool
- func ValidIn(val string, min int, in []string) bool
- func ValidInt(val int, notIn []int) bool
- func ValidKey(val string) bool
- func ValidName(val string) bool
- func ValidNum(val float64, notIn []float64) bool
- func ValidPhone(val string) bool
- func ValidStr(val string, min int, notIn []string) bool
- func ValidUUID(val string) bool
- type CryptoType
- type Num
Constants ¶
const ACTIVE = "0"
const AFTER_DELETE = "AFTER_DELETE"
const AFTER_INSERT = "AFTER_INSERT"
const AFTER_STATE = "AFTER_STATE"
const AFTER_UPDATE = "AFTER_UPDATE"
const APPROVAL = "5"
const ARCHIVED = "1"
const BEFORE_DELETE = "BEFORE_DELETE"
const BEFORE_INSERT = "BEFORE_INSERT"
const BEFORE_STATE = "BEFORE_STATE"
const BEFORE_UPDATE = "BEFORE_UPDATE"
const CACHE_TIME = 60 * 60 * 24 * 1
const CANCELLED = "2"
const DAY_SECOND = 60 * 60 * 24 * 1
const DELETE = "DELETE"
const FOR_DELETE = "-2"
const FOUND = "Found"
const (
HASH_COST = 5
)
const INSERT = "INSERT"
const IN_PROCESS = "3"
const NOT_FOUND = "Not found"
const OF_SYSTEM = "-1"
const PENDING_APPROVAL = "4"
const REFUSED = "6"
const ROWS = 30
const SELECt = "SELECT"
const STOP = "Stop"
const UPDATE = "UPDATE"
const VALUE_NOT_BOOL = "Value is not bolean"
Variables ¶
This section is empty.
Functions ¶
func Address ¶
* * Address return a string with the host and port * @param host string * @param port int * @return string *
func BannerTitle ¶
* * BannerTitle return a string with the banner title * @param name string * @param version string * @param size int * @return string *
func BinarySearch ¶
func Contains ¶
func Contains(v interface{}, vals ...interface{}) bool
* * Contains return true if the value is in the list * @param v interface{} * @param vals ...interface{} * @return bool *
func DecryptoAES ¶
func ExtractMencion ¶
* * ExtractMencion return the mentions in a string * @param str string * @return []string *
func GeneratePortNumber ¶
func GeneratePortNumber() int
* * GeneratePortNumber return a random port number * @return int *
func GetCodeVerify ¶
* * GetCodeVerify return a code verify * @param length int * @return string *
func GoMod ¶
* * GoMod return the value of a go.mod attribute * @param atrib string * @return string * @return error *
func InInt ¶
* * InInt return true if the value is in the list * @param val string * @param in []string * @return bool *
func InStr ¶
* * InStr return true if the value is in the list * @param val string * @param in []string * @return bool *
func MinDistance ¶
func More ¶ added in v0.0.3
* * More return the next value of a serie * @param tag string * @return int *
func ParamQuote ¶
* * ParamQuote return a string with the values replaced * @param str string * @param args ...any * @return string *
func Params ¶
* * Params return a string with the values replaced * @param str string * @param args ...any * @return string *
func PasswordHash ¶
func PasswordMatch ¶
func Quote ¶
func Quote(val interface{}) any
* * QUote return a quoted value * @param val interface{} * @return any *
func TimeDifference ¶
* * TimeDifference return the difference between two dates * @param dateInt any * @param dateEnd any * @return time.Duration *
func UUIndex ¶ added in v0.0.3
* * UUIndex return the next value of a serie * @param tag string * @return int64 *
func ValidEmail ¶
func ValidPhone ¶
Types ¶
type CryptoType ¶
type CryptoType int
const ( MD5 CryptoType = iota SHA1 SHA256 SHA512 AES )
func GetCryptoType ¶
func GetCryptoType(value string) CryptoType
Type return a crypto type from a string