internal

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2022 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 HTTPHandler

type HTTPHandler struct {
	APIKey     string
	BaseURL    string
	HTTPClient http.Client
}

func (*HTTPHandler) GetRequest

func (h *HTTPHandler) GetRequest(
	ctx context.Context,
	respResource interface{},
	reqPath string,
	queryParams map[string]string,
) (respDetails models.ResponseDetails, err error)

func (*HTTPHandler) PostJSONReq added in v1.1.0

func (h *HTTPHandler) PostJSONReq(
	ctx context.Context,
	postResource models.Validatable,
	respResource interface{},
	reqPath string,
) (respDetails models.ResponseDetails, err error)

func (*HTTPHandler) PostMultipartReq added in v1.1.0

func (h *HTTPHandler) PostMultipartReq(
	ctx context.Context,
	postResource models.MultipartValidatable,
	respResource interface{},
	reqPath string,
) (respDetails models.ResponseDetails, err error)

func (*HTTPHandler) PutJSONReq added in v1.2.0

func (h *HTTPHandler) PutJSONReq(
	ctx context.Context,
	putResource models.Validatable,
	respResource interface{},
	reqPath string,
	queryParams map[string]string,
) (respDetails models.ResponseDetails, err error)

Jump to

Keyboard shortcuts

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