grpc_gateway_util

package
v0.8.6 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0, BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(val string) (bool, error)

Bool converts the given string representation of a boolean value into bool.

func Bytes

func Bytes(val string) ([]byte, error)

Bytes converts the given string representation of a byte sequence into a slice of bytes A bytes sequence is encoded in URL-safe base64 without padding

func Duration

func Duration(val string) (*duration.Duration, error)

Duration converts the given string into a timestamp.Duration.

func Float32

func Float32(val string) (float32, error)

Float32 converts the given string representation of a floating point number into float32.

func Float64

func Float64(val string) (float64, error)

Float64 converts the given string representation into representation of a floating point number into float64.

func Int32

func Int32(val string) (int32, error)

Int32 converts the given string representation of an integer into int32.

func Int64

func Int64(val string) (int64, error)

Int64 converts the given string representation of an integer into int64.

func PopulateFieldFromPath

func PopulateFieldFromPath(msg proto.Message, fieldPathString string, value string) error

PopulateFieldFromPath sets a value in a nested Protobuf structure. It instantiates missing protobuf fields as it goes.

func PopulateQueryParameters

func PopulateQueryParameters(msg proto.Message, values url.Values) error

PopulateQueryParameters populates "values" into "msg".

func PopulateQueryParametersEx

func PopulateQueryParametersEx(msg proto.Message, values url.Values, ignoreUnknownParam bool) error

PopulateQueryParametersEx populates "values" into "msg".

func String

func String(val string) (string, error)

String just returns the given string. It is just for compatibility to other types.

func Timestamp

func Timestamp(val string) (*timestamp.Timestamp, error)

Timestamp converts the given RFC3339 formatted string into a timestamp.Timestamp.

func Uint32

func Uint32(val string) (uint32, error)

Uint32 converts the given string representation of an integer into uint32.

func Uint64

func Uint64(val string) (uint64, error)

Uint64 converts the given string representation of an integer into uint64.

Types

This section is empty.

Jump to

Keyboard shortcuts

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