request

package
v0.2.0-beta Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Api

type Api interface {
	Req(ctx context.Context, method string, url string, param any, body any, headers map[string]string, response any) *fazz.Error
}

Api interface build for DI and testing.

type ApiImplement

type ApiImplement struct {
	ApiKey    string
	SecretKey string
}

func NewAPI

func NewAPI(apiKey, secretKey string) *ApiImplement

func (*ApiImplement) Req

func (c *ApiImplement) Req(ctx context.Context, method string, url string, param any, body any, headers map[string]string, response any) *fazz.Error

Req is an http request made specifically to hit the Fazz endpoint. If the HTTP status code return is not 2xx, response error will be returned

Jump to

Keyboard shortcuts

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