safeheron

package
v0.0.0-...-5f625e7 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiConfig

type ApiConfig struct {
	BaseUrl               string `comment:"Safeheron Request Base URL"`
	ApiKey                string `comment:"api key, you can get from safeheron web console"`
	RsaPrivateKey         string `comment:"Your RSA private key"`
	SafeheronRsaPublicKey string `comment:"Api key's platform public key, you can get from safeheron web console"`
}

type Client

type Client struct {
	Config ApiConfig
}

func (Client) Post

func (c Client) Post(params map[string]string, path string) ([]byte, error)

func (Client) SendRequest

func (c Client) SendRequest(request any, response any, path string) error

type SafeheronResponse

type SafeheronResponse struct {
	Code       int64  `form:"code" json:"code"`
	Message    string `form:"message" json:"message"`
	Sig        string `form:"sig" json:"sig"`
	Key        string `form:"key" json:"key"`
	BizContent string `form:"bizContent" json:"bizContent"`
	Timestamp  string `form:"timestamp" json:"timestamp"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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