domain

package
v0.0.0-...-33ecd2b Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2015 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

*

  • Copyright 2014 @ z3q.net.
  • name : delivery
  • author : jarryliu
  • date : 2014-10-06 14:21 :
  • description :
  • history :

*

  • Copyright 2014 @ z3q.net.
  • name :
  • author : jarryliu
  • date : 2014-02-05 21:53
  • description :
  • history :

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CartCookieFmt

func CartCookieFmt(s string) string

传唤客户端的购物车cookie为服务端的方式.

func ChkPwdRight

func ChkPwdRight(pwd string) (bool, error)

func GenerateCartKey

func GenerateCartKey(unix int64, nano int) string

生成16位唯一的md5购物车码

func GenerateInvitationCode

func GenerateInvitationCode() string

创建邀请码(6位)

func GenerateRandomPwd

func GenerateRandomPwd(len int) string

创建随机密码

func GetAreaName

func GetAreaName(addr string) (string, error)

获取地区名称

func GetCityName

func GetCityName(addr string) (string, error)

获取城市名称

func Md5Pwd

func Md5Pwd(pwd, offset string) string

密码Md5加密

func MemberSha1Pwd

func MemberSha1Pwd(pwd string) string

加密会员密码,因为可能会使用手机号码登陆, 所以密码不能依据用户名作为生成凭据

func NewApiId

func NewApiId(id int) string

创建API编号(10位)

func NewOrderNo

func NewOrderNo(partnerId int) string

新订单号

func NewSecret

func NewSecret(hex int) string

创建密钥(16位)

func NewTradeNo

func NewTradeNo(partnerId int) string

新交易号(12位)

func PartnerSha1Pwd

func PartnerSha1Pwd(usr, pwd string) string

加密合作商密码

func ShaPwd

func ShaPwd(pwd, offset string) string

密码SHA1加密

Types

type DomainError

type DomainError struct {
	Key          string
	DefaultError string
}

func NewDomainError

func NewDomainError(key string, msg string) *DomainError

func (*DomainError) Error

func (this *DomainError) Error() string

Directories

Path Synopsis
* * Copyright 2015 @ z3q.net.
* * Copyright 2015 @ z3q.net.

Jump to

Keyboard shortcuts

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