common

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HttpGet

func HttpGet(address string, v interface{}) ([]byte, error)

func InitZapLogger

func InitZapLogger()

func Sign

func Sign(params map[string]string, appSecret string) string

Types

type Config

type Config struct {
	Version     string `url:"v"`
	Method      string `url:"method"`
	AccessToken string `url:"access_token,omitempty"`
	AppKey      string `url:"app_key"`
	Format      string `url:"format"`
	Timestamp   string `url:"timestamp"`
	Sign        string `url:"sign"`
	ParamJson   string `url:"360buy_param_json"`
}

type Request

type Request interface {
	JsonParams() (string, error)
	ResponseName() string
	GetMethodName() string
	GetResultFieldName() string
}

type Result

type Result struct {
	Code       int32       `json:"code"`
	Message    string      `json:"message"`
	RequestId  string      `json:"requestId"`
	TotalCount int64       `json:"totalCount"`
	Data       interface{} `json:"data"`
}

Jump to

Keyboard shortcuts

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