config

package
v0.2.38 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Sign

func Sign(partnerKey, baseString string) string

Sign

Types

type Config

type Config struct {
	BaseURL     string `json:"baseURL"`
	Version     string `json:"version"`
	PartnerID   int64  `json:"partner_id"`
	PartnerKey  string `json:"partner_key"`
	RedirectURL string `json:"redirect_url"`
	// contains filtered or unexported fields
}

Config

func New

func New(apiURL, version string, partnerID int64, partnerKey string, redirectURL string) *Config

New

func (*Config) GetApiPath

func (c *Config) GetApiPath(apiPath string) string

GetApiPath

func (*Config) GetApiURL

func (c *Config) GetApiURL(apiPath string) string

GetApiURL

func (*Config) GetCommonParam

func (c *Config) GetCommonParam(method string) string

GetCommonParam

func (*Config) Http

func (c *Config) Http(requestMethod, method string, data interface{}, out interface{}) error

Http 请求

func (*Config) HttpGet

func (c *Config) HttpGet(method string, data interface{}, out interface{}) error

HttpGet

func (*Config) HttpPost

func (c *Config) HttpPost(method string, data interface{}, out interface{}) error

HttpPost

func (*Config) HttpPostFile added in v0.0.42

func (c *Config) HttpPostFile(method string, data interface{}, out interface{}) error

HttpPostFile

func (*Config) SetShopInfo

func (c *Config) SetShopInfo(shopInfo *commonentity.ShopInfo) *Config

SetShopInfo

func (*Config) String

func (c *Config) String() string

String

Jump to

Keyboard shortcuts

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