site

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const SITE_KEY = "allSitesInfo" // 所有站点的信息

Variables

View Source
var MsgTypeList map[string]string = map[string]string{
	"1":  "order_create",
	"2":  "order_created_notify",
	"3":  "order_refund",
	"4":  "order_refunded_notify",
	"5":  "order_pay",
	"6":  "order_payed_notify",
	"7":  "order_cancel",
	"8":  "order_canceled_notify",
	"9":  "order_receive",
	"10": "order_received_notify",
	"11": "order_finished_notify",
	"12": "send_sms",
	"13": "order_delivered_notify",
	"14": "order_autocanceled_notify",
	"15": "order_askforrefund_notify",
	"16": "order_pay_by_master",
}

* 串货接口,请求及通知订单状态

View Source
var USER_TOKEN_KEY = "i3d6o32wo8fvs1fvdpwens"

用户TOKEN加密转换key

Functions

func EncryptedUserToken

func EncryptedUserToken(token string, key ...string) string

func GetAll

func GetAll() ([]map[string]string, error)

func GetConfigRedisKey

func GetConfigRedisKey(site_id string) string

func GetDbName

func GetDbName(master, host string) (string, error)

*

  • 取完整数据库名
  • 2020/06/15
  • gz

func GetDomain

func GetDomain(req *http.Request) string

*

  • 取域名

func GetHost

func GetHost(req *http.Request) string

*

  • 取访问主机名

func GetMsgTypeKey

func GetMsgTypeKey(text string) (key string)

func GetMsgTypeText

func GetMsgTypeText(key string) (text string)

func GetSiteFromMaster

func GetSiteFromMaster(master, host string) (map[string]string, error)

*

  • 从总站获取分站数据库及ID信息
  • 2020/06/06
  • gz

func GetSiteFromRedis

func GetSiteFromRedis(host string) (map[string]string, error)

*

  • 从redis获取分站数据库及ID信息
  • 2020/06/08
  • gz

func GetSiteId

func GetSiteId(master, domain string) (string, error)

*

  • 取站点ID
  • 2020/06/15
  • gz

func GetSiteInfo

func GetSiteInfo(master, host string) (map[string]string, error)

func GetSiteInfoFromReq

func GetSiteInfoFromReq(master string, req *http.Request) (map[string]string, error)

func SetHeader

func SetHeader(w http.ResponseWriter, resp *http.Request)

func SetToRedis

func SetToRedis(host string, site map[string]string) error

*

  • 分站数据库及ID信息保存及redis
  • 2020/06/08
  • gz

Types

This section is empty.

Jump to

Keyboard shortcuts

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