Documentation ¶
Index ¶
- Constants
- Variables
- func ConvertBoolToStr(v bool, associated map[bool]string) string
- func ConvertToInt(data interface{}) (int, error)
- func ConvertToString(data interface{}) (res string)
- func Exists(name string) (bool, error)
- func GetRefreshToken(r *http.Request) (string, error)
- func InterfaceSlice(slice interface{}) []interface{}
- func IsDigitsOnly(s string) bool
- func PhoneConverter(phone string) string
- type RefreshToken
Constants ¶
View Source
const ( REFRESH_TOKEN_KEY = "refresh_token" PASSWORD_MIN_LENGTH = 8 PASSWORD_MAX_LENGTH = 20 ContextUserKey ctxKey = "user" )
Variables ¶
View Source
var (
PhoneRegexp = regexp.MustCompile(`[a-zA-Z\s-\(\)\,\:]`)
)
Functions ¶
func ConvertToInt ¶
ConvertToInt конвертируем интерфейс в int
func ConvertToString ¶
func ConvertToString(data interface{}) (res string)
ConvertToString конвертируем interface{} в строку
func InterfaceSlice ¶
func InterfaceSlice(slice interface{}) []interface{}
func IsDigitsOnly ¶
func PhoneConverter ¶
Types ¶
type RefreshToken ¶
type RefreshToken struct {
RefreshToken string `json:"refreshToken" serializer:"required"`
}
Click to show internal directories.
Click to hide internal directories.