Documentation
¶
Index ¶
- type AppMemberInfo
- type AppService
- func (s *AppService) CreateAppQRCode(ctx context.Context, biz *CreateAppQRCodeBiz, opts ...ValueOptions) (*CreateAppQRCodeResp, error)
- func (s *AppService) CreateMember(ctx context.Context, biz *CreateAppMemberBiz, opts ...ValueOptions) error
- func (s *AppService) DeleteMember(ctx context.Context, biz *DeleteMemberBiz, opts ...ValueOptions) error
- func (s *AppService) QueryAppMembers(ctx context.Context, biz *QueryAppMembersBiz, opts ...ValueOptions) (*QueryAppMembersResp, error)
- type ApplyVersionAuditBiz
- type BaseInfo
- type BindQrCodeBiz
- type BindQrCodeResp
- type CancelExperienceBiz
- type CancelGrayVersionBiz
- type CancelVersionAuditBiz
- type CancelVersionAuditedBiz
- type CertifyIndividualBusinessBiz
- type CertifyIndividualBusinessResp
- type Client
- func (c *Client) CheckResponse(r *http.Response) error
- func (c *Client) Do(ctx context.Context, req *http.Request, v interface{}) (*Response, error)
- func (c *Client) NewRequest(method string, bizContent interface{}, setters ...ValueOptions) (*http.Request, error)
- func (c *Client) Sign(values url.Values) (string, error)
- func (c *Client) VerifySign(content []byte, sign string) error
- type CreateAppMemberBiz
- type CreateAppQRCodeBiz
- type CreateAppQRCodeResp
- type CreateExperienceBiz
- type CreateSafeDomainBiz
- type DeleteMemberBiz
- type DeleteVersionBiz
- type DetectRiskContentBiz
- type DetectRiskContentResp
- type ErrorResponse
- type ExperienceStatus
- type File
- type MiniAppCategory
- type MiniAppCategoryInfo
- type MiniPackageInfo
- type MiniService
- func (s *MiniService) ApplyVersionAudit(ctx context.Context, biz *ApplyVersionAuditBiz, opts ...ValueOptions) error
- func (s *MiniService) BindQrCode(ctx context.Context, biz *BindQrCodeBiz, opts ...ValueOptions) (*BindQrCodeResp, error)
- func (s *MiniService) CancelExperience(ctx context.Context, biz *CancelExperienceBiz, opts ...ValueOptions) error
- func (s *MiniService) CancelGrayVersion(ctx context.Context, biz *CancelGrayVersionBiz, opts ...ValueOptions) error
- func (s *MiniService) CancelVersionAudit(ctx context.Context, biz *CancelVersionAuditBiz, opts ...ValueOptions) error
- func (s *MiniService) CancelVersionAudited(ctx context.Context, biz *CancelVersionAuditedBiz, opts ...ValueOptions) error
- func (s *MiniService) CertifyIndividualBusiness(ctx context.Context, biz *CertifyIndividualBusinessBiz, opts ...ValueOptions) (*CertifyIndividualBusinessResp, error)
- func (s *MiniService) CreateExperience(ctx context.Context, biz *CreateExperienceBiz, opts ...ValueOptions) error
- func (s *MiniService) CreateSafeDomain(ctx context.Context, biz *CreateSafeDomainBiz, opts ...ValueOptions) error
- func (s *MiniService) DeleteVersion(ctx context.Context, biz *DeleteVersionBiz, opts ...ValueOptions) error
- func (s *MiniService) DetectRiskContent(ctx context.Context, biz *DetectRiskContentBiz, opts ...ValueOptions) (*DetectRiskContentResp, error)
- func (s *MiniService) ModifyBaseInfo(ctx context.Context, biz *ModifyBaseInfoBiz, opts ...ValueOptions) error
- func (s *MiniService) OfflineVersion(ctx context.Context, biz *OfflineVersionBiz, opts ...ValueOptions) error
- func (s *MiniService) OnlineGrayVersion(ctx context.Context, biz *OnlineGrayVersionBiz, opts ...ValueOptions) error
- func (s *MiniService) OnlineVersion(ctx context.Context, biz *OnlineVersionBiz, opts ...ValueOptions) error
- func (s *MiniService) QueryBaseInfo(ctx context.Context, opts ...ValueOptions) (*BaseInfo, error)
- func (s *MiniService) QueryCategory(ctx context.Context, biz *QueryCategoryBiz, opts ...ValueOptions) (*QueryCategoryResp, error)
- func (s *MiniService) QueryExperience(ctx context.Context, biz *QueryExperienceBiz, opts ...ValueOptions) (*ExperienceStatus, error)
- func (s *MiniService) QueryTemplateUsage(ctx context.Context, biz *QueryTemplateUsageBiz, opts ...ValueOptions) (*QueryTemplateUsageResp, error)
- func (s *MiniService) QueryTinyAppExist(ctx context.Context, biz *QueryTinyAppExistBiz, opts ...ValueOptions) (*QueryTinyAppExistResp, error)
- func (s *MiniService) QueryVersionBuild(ctx context.Context, biz *QueryVersionBuildBiz, opts ...ValueOptions) (*QueryVersionBuildResp, error)
- func (s *MiniService) QueryVersionDetail(ctx context.Context, biz *QueryVersionDetailBiz, opts ...ValueOptions) (*VersionDetail, error)
- func (s *MiniService) QueryVersionList(ctx context.Context, opts ...ValueOptions) (*QueryVersionListResp, error)
- func (s *MiniService) RollbackVersion(ctx context.Context, biz *RollbackVersionBiz, opts ...ValueOptions) error
- func (s *MiniService) SyncContent(ctx context.Context, biz *SyncContentBiz, opts ...ValueOptions) (*SyncContentResp, error)
- func (s *MiniService) UnbindQrCode(ctx context.Context, biz *UnbindQrCodeBiz, opts ...ValueOptions) error
- func (s *MiniService) UploadVersion(ctx context.Context, biz *UploadVersionBiz, opts ...ValueOptions) error
- type ModifyBaseInfoBiz
- type MultiRender
- type OfflineVersionBiz
- type OnlineGrayVersionBiz
- type OnlineVersionBiz
- type Option
- type Options
- type QueryAppMembersBiz
- type QueryAppMembersResp
- type QueryCategoryBiz
- type QueryCategoryResp
- type QueryExperienceBiz
- type QueryTemplateUsageBiz
- type QueryTemplateUsageResp
- type QueryTinyAppExistBiz
- type QueryTinyAppExistResp
- type QueryVersionBuildBiz
- type QueryVersionBuildResp
- type QueryVersionDetailBiz
- type QueryVersionListResp
- type RegionInfo
- type Response
- type RollbackVersionBiz
- type SyncContentBiz
- type SyncContentResp
- type TemplateUsageInfo
- type UnbindQrCodeBiz
- type UploadVersionBiz
- type ValueOptions
- type VersionDetail
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppMemberInfo ¶
type AppMemberInfo struct { UserID string `json:"user_id"` NickName string `json:"nick_name"` Portrait string `json:"portrait"` Status string `json:"status"` GmtJoin string `json:"gmt_join"` LogonID string `json:"logon_id"` GmtInvite string `json:"gmt_invite"` Role string `json:"role"` }
AppMemberInfo 小程序成员模型
type AppService ¶
type AppService service
AppService 应用服务 Docs: https://opendocs.alipay.com/apis/api_49
func (*AppService) CreateAppQRCode ¶ added in v0.2.0
func (s *AppService) CreateAppQRCode(ctx context.Context, biz *CreateAppQRCodeBiz, opts ...ValueOptions) (*CreateAppQRCodeResp, error)
CreateAppQRCode 生成小程序推广二维码
func (*AppService) CreateMember ¶
func (s *AppService) CreateMember(ctx context.Context, biz *CreateAppMemberBiz, opts ...ValueOptions) error
CreateMember 应用添加成员,目前只支持小程序类型的应用使用
func (*AppService) DeleteMember ¶
func (s *AppService) DeleteMember(ctx context.Context, biz *DeleteMemberBiz, opts ...ValueOptions) error
DeleteMember 应用删除成员,目前只支持小程序类型的应用使用
func (*AppService) QueryAppMembers ¶
func (s *AppService) QueryAppMembers(ctx context.Context, biz *QueryAppMembersBiz, opts ...ValueOptions) (*QueryAppMembersResp, error)
QueryAppMembers 应用查询成员列表,目前只支持小程序类型的应用
type ApplyVersionAuditBiz ¶
type ApplyVersionAuditBiz struct { LicenseName string `json:"license_name,omitempty"` FirstLicensePic *File `json:"first_license_pic,omitempty"` SecondLicensePic *File `json:"second_license_pic,omitempty"` ThirdLicensePic *File `json:"third_license_pic,omitempty"` FourthLicensePic *File `json:"fourth_license_pic,omitempty"` FifthLicensePic *File `json:"fifth_license_pic,omitempty"` LicenseValidDate string `json:"license_valid_date,omitempty"` OutDoorPic *File `json:"out_door_pic,omitempty"` AppVersion string `json:"app_version"` AppName string `json:"app_name,omitempty"` AppEnglishName string `json:"app_english_name,omitempty"` AppSlogan string `json:"app_slogan,omitempty"` AppLogo *File `json:"app_logo,omitempty"` AppCategoryIDs string `json:"app_category_ids,omitempty"` AppDesc string `json:"app_desc,omitempty"` ServicePhone string `json:"service_phone,omitempty"` ServiceEmail string `json:"service_email,omitempty"` VersionDesc string `json:"version_desc"` Memo string `json:"memo,omitempty"` RegionType string `json:"region_type"` ServiceRegionInfo []*RegionInfo `json:"service_region_info,omitempty"` FirstScreenShot *File `json:"first_screen_shot,omitempty"` SecondScreenShot *File `json:"second_screen_shot,omitempty"` ThirdScreenShot *File `json:"third_screen_shot,omitempty"` FourthScreenShot *File `json:"fourth_screen_shot,omitempty"` FifthScreenShot *File `json:"fifth_screen_shot,omitempty"` LicenseNo string `json:"license_no,omitempty"` MiniCategoryIDs string `json:"mini_category_ids,omitempty"` FirstSpecialLicensePic *File `json:"first_special_license_pic,omitempty"` SecondSpecialLicensePic *File `json:"second_special_license_pic,omitempty"` ThirdSpecialLicensePic *File `json:"third_special_license_pic,omitempty"` TestAccount string `json:"test_accout,omitempty"` // 官方拼写错误 TestPassword string `json:"test_password,omitempty"` TestFileName *File `json:"test_file_name,omitempty"` BundleID string `json:"bundle_id,omitempty"` }
ApplyVersionAuditBiz 小程序提交审核
func (ApplyVersionAuditBiz) MultipartParams ¶ added in v0.4.0
func (a ApplyVersionAuditBiz) MultipartParams() map[string]io.Reader
func (ApplyVersionAuditBiz) Params ¶ added in v0.4.0
func (a ApplyVersionAuditBiz) Params() map[string]string
type BaseInfo ¶ added in v0.2.0
type BaseInfo struct { AppName string `json:"app_name"` AppEnglishName string `json:"app_english_name"` AppSlogan string `json:"app_slogan"` AppLogo string `json:"app_logo"` CategoryNames string `json:"category_names"` AppDesc string `json:"app_desc"` ServicePhone string `json:"service_phone"` ServiceEmail string `json:"service_email"` SafeDomains []string `json:"safe_domains,omitempty"` PackageNames []string `json:"package_names,omitempty"` }
BaseInfo 小程序基础信息
type BindQrCodeBiz ¶ added in v0.3.0
type BindQrCodeBiz struct { RouteURL string `json:"route_url"` // 二维码域名,须通过ICP备案验证,支持http、https、ftp开头的链接 //匹配规则,仅支持EXACT(精确匹配)、FUZZY(模糊匹配)两个值。 //精确匹配:根据填写的二维码地址精确匹配,地址完全一致时才能唤起小程序(如:配置二维码地址为https://www.alipay.com/my?id=123,当用户扫这个地址的二维码可唤起小程序)。 //模糊匹配:根据填写的二维码地址模糊匹配,只要地址前缀匹配即可唤起小程序(如:配置二维码地址为https://www.alipay.com/my/,当用户扫的二维码地址为https://www.alipay.com/my/id=123,可唤起小程序)。 Mode string `json:"mode"` PageRedirection string `json:"page_redirection"` // 小程序功能页,配置扫描二维码后打开的小程序功能页面路径 }
BindQrCodeBiz 关联普通二维码biz
type BindQrCodeResp ¶ added in v0.3.0
type BindQrCodeResp struct {
RouteGroup string `json:"route_group"` // 路由规则组,用于唯一标记一条路由规则
}
BindQrCodeResp 关联普通二维码resp
type CancelExperienceBiz ¶
type CancelExperienceBiz struct { AppVersion string `json:"app_version"` //小程序版本号 // 小程序客户端类型,默认为支付宝端。 // 支付宝端:com.alipay.alipaywallet, // DINGDING端:com.alibaba.android.rimet, // 高德端:com.amap.app, // 天猫精灵端:com.alibaba.ailabs.genie.webapps, // 支付宝IOT:com.alipay.iot.xpaas BundleID string `json:"bundle_id"` }
CancelExperienceBiz 小程序取消体验版
type CancelGrayVersionBiz ¶
type CancelGrayVersionBiz struct { AppVersion string `json:"app_version"` //小程序版本号, 必选 BundleID string `json:"bundle_id"` //端参数,可不选,默认支付宝端 }
CancelGrayVersionBiz 小程序结束灰度
type CancelVersionAuditBiz ¶
type CancelVersionAuditBiz struct { AppVersion string `json:"app_version"` //小程序版本号, 可不选, 默认撤消正在审核中的版本 BundleID string `json:"bundle_id"` //端参数,可不选,默认支付宝端(com.alipay.alipaywallet:支付宝端) }
CancelVersionAuditBiz 小程序撤销审核
type CancelVersionAuditedBiz ¶
type CancelVersionAuditedBiz struct { AppVersion string `json:"app_version"` //小程序版本号 BundleID string `json:"bundle_id"` //小程序投放的端参数,例如投放到支付宝钱包是支付宝端。该参数可选,默认支付宝端,目前仅支持支付宝端,枚举列举:com.alipay.alipaywallet:支付宝端 }
CancelVersionAuditedBiz 小程序退回开发
type CertifyIndividualBusinessBiz ¶ added in v0.3.0
type CertifyIndividualBusinessBiz struct { LiceseNo string `json:"license_no"` // 营业执照 LicesePic string `json:"license_pic"` // 营业执照图片的Base64编码字符串,图片大小不能超过2M }
CertifyIndividualBusinessBiz 个人账户升级为个体工商户
type CertifyIndividualBusinessResp ¶ added in v0.3.0
type CertifyIndividualBusinessResp struct {
CertifyResult bool `json:"certify_result"` // 个体工商户认证结果,true代表认证成功,false代表认证失败
}
CertifyIndividualBusinessResp 个人账户升级为个体工商户resp
type Client ¶
type Client struct { // Base URL for API requests. Defaults to the public Alipay API, but can be // set to a domain endpoint to use with GitHub Enterprise. BaseURL should // always be specified with a trailing slash. BaseURL *url.URL PrivateKey *rsa.PrivateKey PublicKey *rsa.PublicKey // User agent used when communicating with the Alipay API. UserAgent string App *AppService Mini *MiniService // contains filtered or unexported fields }
A Client manages communication with the Alipay API.
func NewClient ¶
func NewClient(httpClient *http.Client, privateKey *rsa.PrivateKey, publicKey *rsa.PublicKey, setters ...Option) *Client
NewClient returns a new Alipay API client. If a nil httpClient is provided, a new http.Client will be used. To use API methods which require authentication, provide an http.Client that will perform the authentication for you (such as that provided by the golang.org/x/oauth2 library).
func (*Client) CheckResponse ¶
CheckResponse 检查返回内容
func (*Client) Do ¶
Do sends an API request and returns the API response. The API response is JSON decoded and stored in the value pointed to by v, or returned as an error if an API error has occurred. If v implements the io.Writer interface, the raw response body will be written to v, without attempting to first decode it. If rate limit is exceeded and reset time is in the future, Do returns *RateLimitError immediately without making a network API call.
The provided ctx must be non-nil, if it is nil an error is returned. If it is canceled or times out, ctx.Err() will be returned.
func (*Client) NewRequest ¶
func (c *Client) NewRequest(method string, bizContent interface{}, setters ...ValueOptions) (*http.Request, error)
NewRequest creates an API request. A relative URL can be provided in urlStr, in which case it is resolved relative to the BaseURL of the Client. Relative URLs should always be specified without a preceding slash. If specified, the value pointed to by body is JSON encoded and included as the request body.
type CreateAppMemberBiz ¶
type CreateAppMemberBiz struct { LogonID string `json:"logon_id"` // 支付宝登录账号ID Role string `json:"role"` //成员的角色类型,DEVELOPER-开发者,EXPERIENCER-体验者 }
CreateAppMemberBiz 应用添加成员
type CreateAppQRCodeBiz ¶ added in v0.2.0
type CreateAppQRCodeBiz struct { URLParam string `json:"url_param"` //小程序中能访问到的页面路径。 QueryParam string `json:"query_param"` //小程序的启动参数,打开小程序的query,在小程序onLaunch的方法中获取。 Describe string `json:"describe"` //对应的二维码描述。 }
CreateAppQRCodeBiz 生成小程序推广二维码
type CreateAppQRCodeResp ¶ added in v0.2.0
type CreateAppQRCodeResp struct {
QRCodeURL string `json:"qr_code_url"`
}
CreateAppQRCodeResp 生成小程序推广二维码返回值
type CreateExperienceBiz ¶
type CreateExperienceBiz struct { AppVersion string `json:"app_version"` //小程序版本号 // 小程序客户端类型,默认为支付宝端。 // 支付宝端:com.alipay.alipaywallet, // DINGDING端:com.alibaba.android.rimet, // 高德端:com.amap.app, // 天猫精灵端:com.alibaba.ailabs.genie.webapps, // 支付宝IOT:com.alipay.iot.xpaas BundleID string `json:"bundle_id"` }
CreateExperienceBiz 小程序生成体验版
type CreateSafeDomainBiz ¶ added in v0.3.0
type CreateSafeDomainBiz struct {
SafeDomain string `json:"safe_domain"` // httpRequest域白名单 示例值:example.com 一次只支持设置一个域名
}
CreateSafeDomainBiz 小程序添加域白名单
type DeleteMemberBiz ¶
type DeleteMemberBiz struct { UserID string `json:"user_id"` // 蚂蚁统一会员ID Role string `json:"role"` //成员的角色类型,DEVELOPER-开发者,EXPERIENCER-体验者 }
DeleteMemberBiz 应用删除成员
type DeleteVersionBiz ¶
type DeleteVersionBiz struct { AppVersion string `json:"app_version"` //小程序版本号 BundleID string `json:"bundle_id"` //小程序投放的端参数,例如投放到支付宝钱包是支付宝端。该参数可选,默认支付宝端,目前仅支持支付宝端,枚举列举:com.alipay.alipaywallet:支付宝端 }
DeleteVersionBiz 小程序删除版本
type DetectRiskContentBiz ¶ added in v0.3.0
type DetectRiskContentBiz struct {
Content string `json:"content"` // 最大长度2000 需要识别的文本,不要包含特殊字符以及双引号等可能引起json格式化错误问题的字符.
}
DetectRiskContentBiz 小程序风险内容检测服务biz
type DetectRiskContentResp ¶ added in v0.3.0
type DetectRiskContentResp struct { Action string `json:"action"` //表示处理结果,REJECTED表示拦截,PASSED表示放过。 Keywords []string `json:"keywords"` // 命中的关键字 UniqueID string `json:"unique_id"` // 业务唯一识别码,可用来对应异步识别结果 }
DetectRiskContentResp 小程序风险内容检测服务resp
type ErrorResponse ¶
type ErrorResponse struct { *http.Response Code string `json:"code"` Msg string `json:"msg"` SubCode string `json:"sub_code,omitempty"` SubMsg string `json:"sub_msg,omitempty"` }
ErrorResponse is common error response.
func (*ErrorResponse) Error ¶
func (r *ErrorResponse) Error() string
type ExperienceStatus ¶
type ExperienceStatus struct { Status string `json:"status,omitempty"` // 体验版打包状态,expVersionPackaged-体验版打包成功,expVersionPackaging-体验版打包中,notExpVersion-非体验版 ExpQrCodeURL string `json:"exp_qr_code_url,omitempty"` // 小程序体验版二维码地址 }
ExperienceStatus 体验版状态
type MiniAppCategory ¶ added in v0.3.0
type MiniAppCategory struct { CategoryID string `json:"category_id"` CategoryName string `json:"category_name"` ParentCategoryID string `json:"parent_category_id"` HasChild bool `json:"has_child"` NeedLicense bool `json:"need_license"` NeedOutDoorPic bool `json:"need_out_door_pic"` NeedSpecialLicense bool `json:"need_special_license"` }
MiniAppCategory 小程序类别
type MiniAppCategoryInfo ¶
type MiniAppCategoryInfo struct { FirstCategoryID string `json:"first_category_id"` FirstCategoryName string `json:"first_category_name"` SecondCategoryID string `json:"second_category_id"` SecondCategoryName string `json:"second_category_name"` }
MiniAppCategoryInfo 小程序类目
type MiniPackageInfo ¶
type MiniPackageInfo struct { PackageName string `json:"package_name"` PackageDesc string `json:"package_desc"` DocURL string `json:"doc_url"` Status string `json:"status"` PackageOpenType string `json:"package_open_type"` }
MiniPackageInfo 小程序功能包
type MiniService ¶
type MiniService service
MiniService 小程序服务
Docs: https://opendocs.alipay.com/apis/api_49
func (*MiniService) ApplyVersionAudit ¶
func (s *MiniService) ApplyVersionAudit(ctx context.Context, biz *ApplyVersionAuditBiz, opts ...ValueOptions) error
ApplyVersionAudit 小程序提交审核
func (*MiniService) BindQrCode ¶ added in v0.3.0
func (s *MiniService) BindQrCode(ctx context.Context, biz *BindQrCodeBiz, opts ...ValueOptions) (*BindQrCodeResp, error)
BindQrCode 关联普通二维码
func (*MiniService) CancelExperience ¶
func (s *MiniService) CancelExperience(ctx context.Context, biz *CancelExperienceBiz, opts ...ValueOptions) error
CancelExperience 小程序取消体验版
func (*MiniService) CancelGrayVersion ¶
func (s *MiniService) CancelGrayVersion(ctx context.Context, biz *CancelGrayVersionBiz, opts ...ValueOptions) error
CancelGrayVersion 小程序灰度上架
func (*MiniService) CancelVersionAudit ¶
func (s *MiniService) CancelVersionAudit(ctx context.Context, biz *CancelVersionAuditBiz, opts ...ValueOptions) error
CancelVersionAudit 小程序撤销审核
func (*MiniService) CancelVersionAudited ¶
func (s *MiniService) CancelVersionAudited(ctx context.Context, biz *CancelVersionAuditedBiz, opts ...ValueOptions) error
CancelVersionAudited 小程序退回开发
func (*MiniService) CertifyIndividualBusiness ¶ added in v0.3.0
func (s *MiniService) CertifyIndividualBusiness(ctx context.Context, biz *CertifyIndividualBusinessBiz, opts ...ValueOptions) (*CertifyIndividualBusinessResp, error)
CertifyIndividualBusiness 个人账户升级为个体工商户
func (*MiniService) CreateExperience ¶
func (s *MiniService) CreateExperience(ctx context.Context, biz *CreateExperienceBiz, opts ...ValueOptions) error
CreateExperience 小程序生成体验版
func (*MiniService) CreateSafeDomain ¶ added in v0.3.0
func (s *MiniService) CreateSafeDomain(ctx context.Context, biz *CreateSafeDomainBiz, opts ...ValueOptions) error
CreateSafeDomain 小程序添加域白名单
func (*MiniService) DeleteVersion ¶
func (s *MiniService) DeleteVersion(ctx context.Context, biz *DeleteVersionBiz, opts ...ValueOptions) error
DeleteVersion 小程序删除版本
func (*MiniService) DetectRiskContent ¶ added in v0.3.0
func (s *MiniService) DetectRiskContent(ctx context.Context, biz *DetectRiskContentBiz, opts ...ValueOptions) (*DetectRiskContentResp, error)
DetectRiskContent 小程序风险内容检测服务
func (*MiniService) ModifyBaseInfo ¶ added in v0.3.0
func (s *MiniService) ModifyBaseInfo(ctx context.Context, biz *ModifyBaseInfoBiz, opts ...ValueOptions) error
ModifyBaseInfo 小程序修改基础信息
func (*MiniService) OfflineVersion ¶
func (s *MiniService) OfflineVersion(ctx context.Context, biz *OfflineVersionBiz, opts ...ValueOptions) error
OfflineVersion 小程序下架
func (*MiniService) OnlineGrayVersion ¶
func (s *MiniService) OnlineGrayVersion(ctx context.Context, biz *OnlineGrayVersionBiz, opts ...ValueOptions) error
OnlineGrayVersion 小程序灰度上架
func (*MiniService) OnlineVersion ¶
func (s *MiniService) OnlineVersion(ctx context.Context, biz *OnlineVersionBiz, opts ...ValueOptions) error
OnlineVersion 小程序上架
func (*MiniService) QueryBaseInfo ¶ added in v0.3.0
func (s *MiniService) QueryBaseInfo(ctx context.Context, opts ...ValueOptions) (*BaseInfo, error)
QueryBaseInfo 查询小程序基础信息
func (*MiniService) QueryCategory ¶ added in v0.3.0
func (s *MiniService) QueryCategory(ctx context.Context, biz *QueryCategoryBiz, opts ...ValueOptions) (*QueryCategoryResp, error)
QueryCategory 小程序类目树查询
func (*MiniService) QueryExperience ¶
func (s *MiniService) QueryExperience(ctx context.Context, biz *QueryExperienceBiz, opts ...ValueOptions) (*ExperienceStatus, error)
QueryExperience 小程序体验版状态查询
func (*MiniService) QueryTemplateUsage ¶ added in v0.3.0
func (s *MiniService) QueryTemplateUsage(ctx context.Context, biz *QueryTemplateUsageBiz, opts ...ValueOptions) (*QueryTemplateUsageResp, error)
QueryTemplateUsage 查询使用模板的小程序列表
func (*MiniService) QueryTinyAppExist ¶ added in v0.3.0
func (s *MiniService) QueryTinyAppExist(ctx context.Context, biz *QueryTinyAppExistBiz, opts ...ValueOptions) (*QueryTinyAppExistResp, error)
QueryTinyAppExist 查询是否创建过小程序
func (*MiniService) QueryVersionBuild ¶ added in v0.3.0
func (s *MiniService) QueryVersionBuild(ctx context.Context, biz *QueryVersionBuildBiz, opts ...ValueOptions) (*QueryVersionBuildResp, error)
QueryVersionBuild 小程序查询版本构建状态
func (*MiniService) QueryVersionDetail ¶
func (s *MiniService) QueryVersionDetail(ctx context.Context, biz *QueryVersionDetailBiz, opts ...ValueOptions) (*VersionDetail, error)
QueryVersionDetail 小程序版本详情查询
func (*MiniService) QueryVersionList ¶ added in v0.3.0
func (s *MiniService) QueryVersionList(ctx context.Context, opts ...ValueOptions) (*QueryVersionListResp, error)
QueryVersionList 查询小程序列表
func (*MiniService) RollbackVersion ¶
func (s *MiniService) RollbackVersion(ctx context.Context, biz *RollbackVersionBiz, opts ...ValueOptions) error
RollbackVersion 小程序回滚
func (*MiniService) SyncContent ¶ added in v0.3.0
func (s *MiniService) SyncContent(ctx context.Context, biz *SyncContentBiz, opts ...ValueOptions) (*SyncContentResp, error)
SyncContent 小程序内容接入
func (*MiniService) UnbindQrCode ¶ added in v0.3.0
func (s *MiniService) UnbindQrCode(ctx context.Context, biz *UnbindQrCodeBiz, opts ...ValueOptions) error
UnbindQrCode 删除已关联普通二维码
func (*MiniService) UploadVersion ¶
func (s *MiniService) UploadVersion(ctx context.Context, biz *UploadVersionBiz, opts ...ValueOptions) error
UploadVersion 小程序基于模板上传版本
type ModifyBaseInfoBiz ¶ added in v0.3.0
type ModifyBaseInfoBiz struct { AppName string `json:"app_name,omitempty"` // 小程序应用名称 AppEnglishName string `json:"app_english_name,omitempty"` // 小程序应用英文名称 AppSlogan string `json:"app_slogan,omitempty"` // 小程序应用简介,一句话描述小程序功能 AppLogo *File `json:"app_logo,omitempty"` // 小程序应用logo图标,图片格式必须为:png、jpeg、jpg,建议上传像素为180*180 AppCategoryIDs string `json:"app_category_ids,omitempty"` // 11_12;12_13。小程序类目,格式为 第一个一级类目_第一个二级类目;第二个一级类目_第二个二级类目,详细类目可以参考https://docs.alipay.com/isv/10325 AppDesc string `json:"app_desc,omitempty"` // 小程序应用描述,20-200个字 ServicePhone string `json:"service_phone,omitempty"` // 小程序客服电话 ServiceEmail string `json:"service_email,omitempty"` // 小程序客服邮箱 MiniCategoryIDs string `json:"mini_category_ids,omitempty"` // 新小程序前台类目,一级与二级、三级用下划线隔开,最多可以选四个类目,类目之间;隔开。使用后不再读取app_category_ids值,老前台类目将废弃 }
ModifyBaseInfoBiz 小程序修改基础信息
func (*ModifyBaseInfoBiz) MultipartParams ¶ added in v0.4.0
func (b *ModifyBaseInfoBiz) MultipartParams() map[string]io.Reader
func (*ModifyBaseInfoBiz) Params ¶ added in v0.4.0
func (b *ModifyBaseInfoBiz) Params() map[string]string
type MultiRender ¶ added in v0.4.0
type OfflineVersionBiz ¶
type OfflineVersionBiz struct { AppVersion string `json:"app_version"` //小程序版本号, 必选 BundleID string `json:"bundle_id"` //端参数,可不选,默认支付宝端 }
OfflineVersionBiz 小程序下架
type OnlineGrayVersionBiz ¶
type OnlineGrayVersionBiz struct { AppVersion string `json:"app_version"` //小程序版本号, 必选 GrayStrategy string `json:"gray_strategy"` //小程序灰度策略值,支持p10,p30,p50, 代表百分之多少的用户 BundleID string `json:"bundle_id"` //端参数,可不选,默认支付宝端 }
OnlineGrayVersionBiz 小程序灰度上架
type OnlineVersionBiz ¶
type OnlineVersionBiz struct { AppVersion string `json:"app_version"` //小程序版本号, 必选 BundleID string `json:"bundle_id"` //端参数,可不选,默认支付宝端 }
OnlineVersionBiz 小程序上架
type Options ¶
type Options struct { AppID string // 支付宝分配给开发者的应用ID Format string // 仅支持JSON Charset string // 请求使用的编码格式,如utf-8,gbk,gb2312等 SignType string // 商户生成签名字符串所使用的签名算法类型,目前支持RSA2和RSA,推荐使用RSA2 Version string // 调用的接口版本,固定为:1.0 BizContent string // 请求参数的集合 }
Options 公共请求参数
type QueryAppMembersBiz ¶
type QueryAppMembersBiz struct {
Role string `json:"role"` //成员的角色类型,DEVELOPER-开发者,EXPERIENCER-体验者
}
QueryAppMembersBiz 应用查询成员列表
type QueryAppMembersResp ¶
type QueryAppMembersResp struct {
AppMemberInfoList []*AppMemberInfo `json:"app_member_info_list"`
}
QueryAppMembersResp 成员列表
type QueryCategoryBiz ¶ added in v0.3.0
type QueryCategoryBiz struct {
IsFilter bool `json:"is_filter,omitempty"` // 是否需要过滤不可用类目
}
QueryCategoryBiz 小程序类目树查询
type QueryCategoryResp ¶ added in v0.3.0
type QueryCategoryResp struct { MiniCategoryList []*MiniAppCategory `json:"mini_category_list"` CategoryList []*MiniAppCategory `json:"category_list"` }
QueryCategoryResp 小程序类目树查询resp
type QueryExperienceBiz ¶
type QueryExperienceBiz struct { AppVersion string `json:"app_version"` //小程序版本号 // 小程序客户端类型,默认为支付宝端。 // 支付宝端:com.alipay.alipaywallet, // DINGDING端:com.alibaba.android.rimet, // 高德端:com.amap.app, // 天猫精灵端:com.alibaba.ailabs.genie.webapps, // 支付宝IOT:com.alipay.iot.xpaas BundleID string `json:"bundle_id"` }
QueryExperienceBiz 小程序体验版状态查询
type QueryTemplateUsageBiz ¶ added in v0.3.0
type QueryTemplateUsageBiz struct { TemplateID string `json:"template_id"` // 模板id PageNum int `json:"page_num,omitempty"` // 查询的页数,默认第一页 PageSize int `json:"page_size,omitempty"` // 每页的数量,最多查询50个,默认查询10个 TemplateVersion string `json:"template_version,omitempty"` // 模板小程序的版本号 // 小程序客户端类型,默认为支付宝端。 // 支付宝端:com.alipay.alipaywallet, // DINGDING端:com.alibaba.android.rimet, // 高德端:com.amap.app, // 天猫精灵端:com.alibaba.ailabs.genie.webapps, // 支付宝IOT:com.alipay.iot.xpaas BundleID string `json:"bundle_id,omitempty"` }
QueryTemplateUsageBiz 查询使用模板的小程序列表
type QueryTemplateUsageResp ¶ added in v0.3.0
type QueryTemplateUsageResp struct {
TemplateUsageInfoList []*TemplateUsageInfo `json:"template_usage_info_list"` // 模板使用信息
}
QueryTemplateUsageResp 查询使用模板的小程序列表resp
type QueryTinyAppExistBiz ¶ added in v0.3.0
type QueryTinyAppExistBiz struct {
PID string `json:"pid"` //支付宝账号ID
}
QueryTinyAppExistBiz 查询是否创建过小程序biz
type QueryTinyAppExistResp ¶ added in v0.3.0
type QueryTinyAppExistResp struct {
ExistMini string `json:"exist_mini"` // 是否是小程序开发者
}
QueryTinyAppExistResp 查询是否创建过小程序resp
type QueryVersionBuildBiz ¶ added in v0.3.0
type QueryVersionBuildBiz struct { AppVersion string `json:"app_version"` //小程序版本号, 必选 BundleID string `json:"bundle_id"` //端参数,可不选,默认支付宝端 }
QueryVersionBuildBiz 小程序查询版本构建状态
type QueryVersionBuildResp ¶ added in v0.3.0
type QueryVersionBuildResp struct { NeedRotation string `json:"need_rotation"` // 是否需要轮询 CreateStatus string `json:"create_status"` // 创建版本的状态,0-构建排队中;1-正在构建;2-构建成功;3-构建失败;5-构建超时;6-版本创建成功 }
QueryVersionBuildResp 小程序查询版本构建状态resp
type QueryVersionDetailBiz ¶
type QueryVersionDetailBiz struct { AppVersion string `json:"app_version"` //小程序版本号, 必选 BundleID string `json:"bundle_id"` //端参数,可不选,默认支付宝端 }
QueryVersionDetailBiz 小程序版本详情查询
type QueryVersionListResp ¶ added in v0.3.0
type QueryVersionListResp struct {
AppVersions []string `json:"app_versions"`
}
QueryVersionListResp 查询小程序列表返回值
type RegionInfo ¶
type RegionInfo struct { ProvinceCode string `json:"province_code"` ProvinceName string `json:"province_name"` CityCode string `json:"city_code"` CityName string `json:"city_name"` AreaCode string `json:"area_code"` AreaName string `json:"area_name"` }
RegionInfo 省市区信息,当区域类型为LOCATION时,不能为空
type RollbackVersionBiz ¶
type RollbackVersionBiz struct { AppVersion string `json:"app_version"` //小程序版本号, 必选 BundleID string `json:"bundle_id"` //端参数,可不选,默认支付宝端 }
RollbackVersionBiz 小程序回滚
type SyncContentBiz ¶ added in v0.3.0
type SyncContentBiz struct { ContentType string `json:"content_type"` // 内容类型,例如门店、商品等 Operation string `json:"operation"` // 内容类型下的具体操作,比如门店类型下,小程序批量绑定门店。可参考具体内容接入文档中的详细说明。 ContentData string `json:"content_data"` // 具体的内容数据,采用json格式,不同类型不同操作数据不同。可参考具体内容接入文档中的详细说明。 ExtendInfo string `json:"extend_info"` // 扩展信息,json格式。可参考具体内容接入文档中的详细说明。 }
SyncContentBiz 小程序内容接入biz
type SyncContentResp ¶ added in v0.3.0
type SyncContentResp struct {
ResultData string `json:"result_data"` // 结果数据,json格式,可参考具体内容接入文档中的详细说明。
}
SyncContentResp 小程序内容接入resp
type TemplateUsageInfo ¶ added in v0.3.0
type TemplateUsageInfo struct { MiniAppID string `json:"mini_app_id"` // 商家小程序appId AppVersion string `json:"app_version"` // 商家小程序版本号 }
TemplateUsageInfo 小程序信息
type UnbindQrCodeBiz ¶ added in v0.3.0
type UnbindQrCodeBiz struct {
RouteGroup string `json:"route_group"` // 路由规则组,用于唯一标记一条路由规则
}
UnbindQrCodeBiz 删除已关联普通二维码biz
type UploadVersionBiz ¶
type UploadVersionBiz struct { AppVersion string `json:"app_version"` //小程序版本号, 必选 BundleID string `json:"bundle_id"` //端参数,可不选,默认支付宝端 TemplateID string `json:"template_id"` //模板id Ext string `json:"ext"` //模板的配置参数 TemplateVersion string `json:"template_version"` //模板版本号,版本号必须满足 x.y.z, 且均为数字。不传默认使用最新在架模板版本。 }
UploadVersionBiz 小程序基于模板上传版本
type ValueOptions ¶
ValueOptions 可选配置参数
func AuthToken ¶
func AuthToken(authToken string) ValueOptions
AuthToken 针对用户授权接口,获取用户相关数据时,用于标识用户授权关系
func NotifyURL ¶
func NotifyURL(notifyURL string) ValueOptions
NotifyURL 支付宝服务器主动通知商户服务器里指定的页面http/https路径
type VersionDetail ¶
type VersionDetail struct { AppVersion string `json:"app_version"` AppName string `json:"app_name"` AppEnglishName string `json:"app_english_name"` AppLogo string `json:"app_logo"` VersionDesc string `json:"version_desc"` GrayStrategy string `json:"gray_strategy"` Status string `json:"status"` RejectReason string `json:"reject_reason"` ScanResult string `json:"scan_result"` GmtCreate string `json:"gmt_create"` GmtApplyAudit string `json:"gmt_apply_audit"` GmtOnline string `json:"gmt_online"` GmtOffline string `json:"gmt_offline"` GmtAuditEnd string `json:"gmt_audit_end"` AppDesc string `json:"app_desc"` ServiceRegionType string `json:"service_region_type"` ServiceRegionInfo []*RegionInfo `json:"service_region_info"` ScreenShotList []string `json:"screen_shot_list"` AppSlogan string `json:"app_slogan"` Memo string `json:"memo"` ServicePhone string `json:"service_phone"` ServiceEmail string `json:"service_email"` MiniAppCategoryInfoList []*MiniAppCategoryInfo `json:"mini_app_category_info_list"` PackageInfoList []*MiniPackageInfo `json:"package_info_list"` }
VersionDetail 小程序版本详情