requests

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	HttpString = func(httpCode int) string {
		return fmt.Sprintf("%d: %s", httpCode, http.StatusText(httpCode))
	}
)

Functions

func ClientId

func ClientId(ctx context.Context) string

func ClientIdEC

func ClientIdEC(ec echo.Context) string

func GenerateUUIDV4

func GenerateUUIDV4() string

func Id

func Id(ctx context.Context) string

func IdEC

func IdEC(ec echo.Context) string

func IdECWithFlag

func IdECWithFlag(ec echo.Context, parse bool) string

func IdECWithFlagAndSuffix

func IdECWithFlagAndSuffix(ec echo.Context, parse bool, suffix string) string

func IdWithFlag

func IdWithFlag(ctx context.Context, parse bool) string

func IdWithFlagAndSuffix

func IdWithFlagAndSuffix(ctx context.Context, parse bool, suffix string) string

func IsHttp1xx

func IsHttp1xx(httpCode int) bool

func IsHttp2xx

func IsHttp2xx(httpCode int) bool

func IsHttp3xx

func IsHttp3xx(httpCode int) bool

func IsHttp4xx

func IsHttp4xx(httpCode int) bool

func IsHttp5xx

func IsHttp5xx(httpCode int) bool

func IsHttpError

func IsHttpError(httpCode int) bool

Types

type Header string
const (
	HeaderRestApiKey         Header = "X-REST-API-KEY"
	HeaderRestClientId       Header = "X-REST-CLIENT-ID"
	HeaderRestSignature      Header = "X-REST-SIGNATURE"
	HeaderRestIdempotencyKey Header = "X-REST-IDEMPOTENCY-KEY"
)

type RequestContext

type RequestContext string
const (
	ContextClientId RequestContext = "client_id"
	ContextId       RequestContext = "req_id"
)

func (RequestContext) String

func (t RequestContext) String() string

Jump to

Keyboard shortcuts

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