secret_api

package
v1.0.24 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: BSD-2-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckToken

func CheckToken(c *gin.Context, getSecret func(appId string) (secret string, err error)) error

验证数据

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(domain, appId, appSecret string) *Client

func (*Client) Delete

func (this *Client) Delete(url string, data interface{}, resPtr interface{})

func (*Client) Get

func (this *Client) Get(url string, resPtr interface{})

func (*Client) MakeResponseHead

func (this *Client) MakeResponseHead(c *gin.Context)

生成返回header头

func (*Client) Post

func (this *Client) Post(url string, data interface{}, resPtr interface{})

func (*Client) Put

func (this *Client) Put(url string, data interface{}, resPtr interface{})

func (*Client) SetCheckResultCode

func (this *Client) SetCheckResultCode(fn func(int64, map[string]interface{}))

func (*Client) SetCheckResultHead

func (this *Client) SetCheckResultHead(b bool)

设置验证header头

func (*Client) SetHead

func (this *Client) SetHead(key string, val interface{})

func (*Client) SetNoticeTitle

func (this *Client) SetNoticeTitle(title string)

设置错误提示标题

func (*Client) SetProxyMode

func (this *Client) SetProxyMode(b bool)

设置为代理模式,不自动验证code

func (*Client) SetTimeout

func (this *Client) SetTimeout(t time.Duration)

超时时间,单位秒

Jump to

Keyboard shortcuts

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