converter

package
v0.0.0-...-692e367 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MetadataPrefix       = "router-"
	MetadataHeaderPrefix = "Router-Metadata-"
)

Variables

This section is empty.

Functions

func BoolToString

func BoolToString(str string) (bool, error)

func DecodeBase64

func DecodeBase64(s string) string

func EncodeBase64

func EncodeBase64(s string) string

func EnforcePtr

func EnforcePtr(obj interface{}) (reflect.Value, error)

func HumanizeTimeDuration

func HumanizeTimeDuration(duration time.Duration) string

func Int64ToInt

func Int64ToInt(i int64) int

func IntToString

func IntToString(i int) string

func NewReader

func NewReader(r io.Reader) (io.Reader, error)

func ParseRequestQueryParametersToProto

func ParseRequestQueryParametersToProto(message proto.Message, values url.Values) error

func ParseRequestUrlParametersToProto

func ParseRequestUrlParametersToProto(r *http.Request, message proto.Message, param string) error

func PrepareHeaderFromRequest

func PrepareHeaderFromRequest(req *http.Request) (map[string]string, error)

func SetRawBodyToProto

func SetRawBodyToProto(r *http.Request, message proto.Message, param string) error

func StringToBool

func StringToBool(s string) bool

func StringToFloat

func StringToFloat(s string) float64

func StringToInt

func StringToInt(s string) int

func StringToInt64

func StringToInt64(s string) int64

func StringToUint

func StringToUint(s string) uint

func ToBoolPointer

func ToBoolPointer(v bool) *bool

func ToDurationPointer

func ToDurationPointer(v time.Duration) *time.Duration

func ToInt64Pointer

func ToInt64Pointer(v int64) *int64

func ToIntPointer

func ToIntPointer(v int) *int

func ToStringPointer

func ToStringPointer(v string) *string

func ToTrimRegexFromQueryParameter

func ToTrimRegexFromQueryParameter(v string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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