Documentation ¶
Overview ¶
*
- Copyright 2014 @ 56x.net.
- name : delivery
- author : jarryliu
- date : 2014-10-06 14:21 :
- description :
- history :
*
- Copyright 2015 @ 56x.net.
- name : download.go
- author : jarryliu
- date : 2015-12-31 12:23
- description :
- history :
*
- Copyright 2014 @ 56x.net.
- name :
- author : jarryliu
- date : 2014-02-05 21:53
- description :
- history :
*
- Copyright 2015 @ 56x.net.
- name : option.go
- author : jarryliu
- date : 2016-04-18 13:48
- description :
- history :
Index ¶
- Constants
- Variables
- func AndPayMethod(payFlag int, method int) bool
- func BuildOptionsForm(v *[]Option) string
- func ChkPwdRight(pwd string) (bool, error)
- func DownloadToLocal(url string, savePath string, ext string) string
- func GenerateCartCode(unix int64, nano int) string
- func GenerateRandomIntPwd(n int) string
- func GetAreaName(addr string) (string, error)
- func GetCityName(addr string) (string, error)
- func GrantFlag(field, flag int) (int, error)
- func HandleError(err error, src string) error
- func MathPaymentMethodFlag(methods []int) int
- func Md5(pwd string) string
- func Md5Pwd(pwd, str string) string
- func MemberSha1Pwd(pwd string, salt string) string
- func MerchantSha1Pwd(pwd string, salt string) string
- func NewApiId(id int) string
- func NewCheckCode() string
- func NewSecret(hex int) string
- func NewTradeNo(business int, userId int) string
- func ParseCartCheckedMap(data string) (m map[int64][]int64)
- func Sha1(s string) string
- func Sha1Pwd(pwd string, salt string) string
- func ShaPwd(pwd, p string) string
- func TestFlag(field, flag int) bool
- func TradePassword(pwd string, salt string) string
- type DomainError
- type IOptionStore
- type Option
- type OptionStoreWrapper
- func (this *OptionStoreWrapper) All() (keys []string, values []*Option)
- func (this *OptionStoreWrapper) Destroy() error
- func (this *OptionStoreWrapper) Flush() (err error)
- func (this *OptionStoreWrapper) Get(key string) *Option
- func (this *OptionStoreWrapper) Indent() string
- func (this *OptionStoreWrapper) Set(key string, v *Option)
- func (this *OptionStoreWrapper) Stat() error
- type OptionType
Constants ¶
View Source
const ( OptionTypeInt int = iota OptionTypeString OptionTypeBoolean )
Variables ¶
View Source
var (
Sha1OffSet = ""
)
Functions ¶
func BuildOptionsForm ¶
func ChkPwdRight ¶
func DownloadToLocal ¶
下载远程资源并返回本地地址
func MemberSha1Pwd ¶
加密会员密码,因为可能会使用手机号码登录, 所以密码不能依据用户名作为生成凭据
func ParseCartCheckedMap ¶
转换勾选字典,数据如:{"1":["10","11"],"2":["20","21"]}
Types ¶
type DomainError ¶
func NewError ¶
func NewError(key string, msg string) *DomainError
func (*DomainError) Error ¶
func (this *DomainError) Error() string
func (*DomainError) Set ¶
func (this *DomainError) Set(msg string)
type IOptionStore ¶
type IOptionStore interface { // the indent of option store Indent() string // check state Stat() error // get all options All() (keys []string, values []*Option) // get option by key Get(key string) (value *Option) // after set,call flush() Set(key string, value *Option) // flush to file Flush() error // destroy and delete file Destroy() error }
func NewOptionStoreWrapper ¶
func NewOptionStoreWrapper(indent string) IOptionStore
type OptionStoreWrapper ¶
type OptionStoreWrapper struct {
// contains filtered or unexported fields
}
func (*OptionStoreWrapper) All ¶
func (this *OptionStoreWrapper) All() (keys []string, values []*Option)
get all options
func (*OptionStoreWrapper) Destroy ¶
func (this *OptionStoreWrapper) Destroy() error
destroy and delete file
func (*OptionStoreWrapper) Flush ¶
func (this *OptionStoreWrapper) Flush() (err error)
flush to file
func (*OptionStoreWrapper) Get ¶
func (this *OptionStoreWrapper) Get(key string) *Option
get option by key
func (*OptionStoreWrapper) Indent ¶
func (this *OptionStoreWrapper) Indent() string
the indent of option store
func (*OptionStoreWrapper) Set ¶
func (this *OptionStoreWrapper) Set(key string, v *Option)
after set,call flush()
func (*OptionStoreWrapper) Stat ¶
func (this *OptionStoreWrapper) Stat() error
type OptionType ¶
type OptionType int
Source Files ¶
Click to show internal directories.
Click to hide internal directories.