common

package
v0.0.0-...-65ceb22 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2025 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RSASign

func RSASign(src []byte, priKey []byte, hash crypto.Hash) ([]byte, error)

Types

type BnRestClient

type BnRestClient struct {
	ApiKey       string
	ApiSecretKey string
	BaseUrl      string
	HttpClient   http.Client
	Signer       *Signer
	SignType     string
}

func (*BnRestClient) DoGet

func (p *BnRestClient) DoGet(signature bool, uri string, params map[string]string) (string, error)

func (*BnRestClient) DoPost

func (p *BnRestClient) DoPost(signature bool, uri string, params map[string]string) (string, error)

func (*BnRestClient) Init

func (p *BnRestClient) Init(config *config.BnConfig, intType string) *BnRestClient

type Signer

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

func (*Signer) Init

func (p *Signer) Init(key string) *Signer

func (*Signer) Sign

func (p *Signer) Sign(method string, requestPath string, body string, timesStamp string) string

func (*Signer) SignByRSA

func (p *Signer) SignByRSA(method string, requestPath string, body string, timesStamp string) string

Jump to

Keyboard shortcuts

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