restauth

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BaseURL = "https://api.bitfinex.com"
)

Functions

This section is empty.

Types

type BitfinexAuthClient

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

func NewBitfinexClient

func NewBitfinexClient(cfg *BitfinexClientCfg) (*BitfinexAuthClient, error)

func (*BitfinexAuthClient) GenHeaders

func (b *BitfinexAuthClient) GenHeaders(req utils.HTTPRequest) (map[string]string, error)

func (*BitfinexAuthClient) GetBaseURL

func (b *BitfinexAuthClient) GetBaseURL() string

func (*BitfinexAuthClient) GetDebug

func (b *BitfinexAuthClient) GetDebug() bool

func (*BitfinexAuthClient) SendHTTPRequest

func (b *BitfinexAuthClient) SendHTTPRequest(ctx context.Context, req utils.HTTPRequest) (*utils.ApiResponse, error)

type BitfinexClientCfg

type BitfinexClientCfg struct {
	Debug bool
	// Logger
	Logger *slog.Logger

	BaseURL    string `validate:"required"`
	Key        string `validate:"required"`
	Secret     string `validate:"required"`
	RecvWindow int
}

type HTTPRequest

type HTTPRequest struct {
	BaseURL string
	Path    string
	Method  string
	Headers map[string]string
	Query   any
	Body    any
}

type RestAuthClient

type RestAuthClient struct {
	*BitfinexAuthClient
	// contains filtered or unexported fields
}

func NewRestAuthClient

func NewRestAuthClient(cfg *BitfinexClientCfg) (*RestAuthClient, error)

func (*RestAuthClient) GetWallets

func (r *RestAuthClient) GetWallets(ctx context.Context) error

Jump to

Keyboard shortcuts

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