internal

package
v0.0.1-beta.5 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeJSONRequest

func MakeJSONRequest[T any](
	ctx context.Context,
	params RequestParameters,
	config *glair.Config,
) (T, error)

MakeJSONRequest creates and sends application/json request to a specified GLAIR Vision service endpoint.

func MakeMultipartRequest

func MakeMultipartRequest[T any](
	ctx context.Context,
	params RequestParameters,
	config *glair.Config,
) (T, error)

MakeMultipartRequest creates and sends multipart/formdata request to a specified GLAIR Vision service endpoint.

func ReadFile

func ReadFile(file interface{}) (*os.File, error)

ReadFile reads file from a string representation or an actual file

Types

type RequestParameters

type RequestParameters struct {
	Url       string
	RequestID string
	Body      map[string]interface{}
}

type RequestPayload

type RequestPayload struct {
	RequestParameters
	Header map[string]string
	Body   io.Reader
}

Jump to

Keyboard shortcuts

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