config

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	AppID     string
	AppSecret string
	Host      string // 主机,不包含协议和端口
}

Config 微信的基本配置内容

func New

func New(appid, appsecret, host string) (*Config, error)

New 声明一个 Config 实例。

Host 表示的微信的接口域名,留空,会选择通用的域名: api.weixin.qq.com

详细说明在: https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1465199793_BqlKA&token=&lang=zh_CN

func (*Config) URL

func (c *Config) URL(urlpath string, queries map[string]string) string

URL 生成调用 api 的地址。根据 c.Host 不同,生成不同的地址。

Jump to

Keyboard shortcuts

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