component

package
v6.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ApiKey = "API_KEY"
	Aes    = "AES"
	Rsa    = "RSA"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Authenticator

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

func NewAuthenticator

func NewAuthenticator(apikey, apiSecret string, kind string) *Authenticator

func (*Authenticator) Sign

func (au *Authenticator) Sign(r *http.Request) (map[string]string, error)

type Config

type Config struct {
	UserAgent string
	Domain    string
	Timeout   int64
	MaxRetry  int
	Proxy     string
}

type HttpSender

type HttpSender struct {
	Config
	// contains filtered or unexported fields
}

func NewHttpSender

func NewHttpSender(config Config, auth *Authenticator) *HttpSender

func (*HttpSender) Do

func (c *HttpSender) Do(request *http.Request, data interface{}) error

type RateLimit

type RateLimit struct {
	Reset     int64 `json:"reset"`
	Limit     int   `json:"limit"`
	Remaining int   `json:"remaining"`
}

Jump to

Keyboard shortcuts

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