utils

package
v1.2.8 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UNKNOWN = iota - 1
	FEMALE
	MALE
)

Variables

View Source
var GenderMap = map[int]string{
	UNKNOWN: "未知",
	FEMALE:  "女",
	MALE:    "男",
}

Functions

func Get

func Get(url string) (string, error)

func GetLocalIp

func GetLocalIp() string

func GetUUID

func GetUUID() string

func JsonToMSS

func JsonToMSS(s string) map[string]string

func Post

func Post(url string) (string, error)

func StrToMSS

func StrToMSS(s string) map[string]string

Types

type AuthUserGender

type AuthUserGender struct {
	Code int    `json:"code"`
	Desc string `json:"desc"`
}

func GetRealGender

func GetRealGender(originalGender string) *AuthUserGender

func GetWechatRealGender

func GetWechatRealGender(originalGender string) *AuthUserGender

for wechat real gender

type RegisterSource

type RegisterSource int32

注册来源

const (
	RegisterSourceHand   RegisterSource = 9999 //手动添加
	RegisterSourceMobile RegisterSource = 1001 //手机一键登录
	RegisterSourceSms    RegisterSource = 1002 //手机短信
	RegisterSourceWxMini RegisterSource = 2101 //微信小程序
	RegisterSourceWechat RegisterSource = 2102 //微信登录(APP通过微信登录)
	RegisterSourceQQ     RegisterSource = 2103 //QQ登录
	RegisterSourceAlipay RegisterSource = 2201 //支付宝登录
	RegisterSourceDouYin RegisterSource = 2301 //抖音登录
	RegisterSourceWeibo  RegisterSource = 2401 //微博登录
)

type UrlBuilder

type UrlBuilder struct {
	// contains filtered or unexported fields
}

build url with param

func NewUrlBuilder

func NewUrlBuilder(baseUrl string) *UrlBuilder

func (*UrlBuilder) AddParam

func (this *UrlBuilder) AddParam(key string, value interface{}) *UrlBuilder

func (*UrlBuilder) Build

func (this *UrlBuilder) Build() string

Jump to

Keyboard shortcuts

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