Versions in this module Expand all Collapse all v1 v1.2.0 Jul 2, 2023 v1.0.0 Sep 4, 2022 Changes in this version + const DefaultFTPPort + const DefaultFTPSPort + const DefaultSFTPPort + func AddTime(yourTime time.Time, addedTime int64, timeType string) (resultTime time.Time, err error) + func CheckFamily(redisSession *redis.Client, username, oldUuid string) (isUsed bool, err error) + func CheckToken(redisSession *redis.Client, username, uuid string) (isExistAccess, isExistRefresh bool, err error) + func DeleteAllSession(redisSession *redis.Client, username string, uuid string) (err error) + func GeneratePassword(password Passwords, passwordCost int8) (hash *string, err error) + func GenerateRandString(strSize int, randType string) string + func GetAllSessions(redisSession *redis.Client, username string) ([]interface{}, error) + func GetCurrentUser(redisSession *redis.Client, uuidIdentifier string) (interface{}, error) + func GetCurrentUserRefresh(redisSession *redis.Client, uuidIdentifier string) (interface{}, error) + func InArray(haystack []T, needle T) (bool, int, error) + func InArrayComplex(haystack []any, needle any) (bool, int, error) + func RemoveRedisSession(redisSession *redis.Client, username, uuid string) (totalLogin int64, err error) + func SetFamily(redisSession *redis.Client, username, oldUuid, newUuid string, ...) (err error) + func SetupLoginSession(redisSession *redis.Client, username string, data SessionData) (totalLogin int64, err error) + type ArrayType interface + type FamilyCheck struct + NewUuid string + OldUuid string + Username string + type FtpCredential struct + FtpHost string + FtpPassword string + FtpPort string + FtpUser string + SshKeyFile string + SshPassword string + SshUser string + type HelperFtp struct + FtpCredential FtpCredential + func BaseHelperFtp(isTest bool) *HelperFtp + func (helper *HelperFtp) SendFile(file interface{}) error + func (helper *HelperFtp) SetCredential(ftpCredential FtpCredential) *HelperFtp + func (helper *HelperFtp) SetFtpFile(targetFileLocation string, filename string) *HelperFtp + type KeyRedisSessionData struct + KeyAccess string + KeyFamily string + KeyRefresh string + KeyTotalAccess string + KeyTotalRefresh string + type Passwords struct + Email string + Password string + Username string + type SessionData struct + Authorization bool + SessionDetails SessionDetails + Token SessionToken + type SessionDetails struct + DeviceDetails interface{} + UserDetails interface{} + type SessionToken struct + AccessExpiredAt int64 + RefreshExpiredAt int64 + Uuid string