utils

package
v8.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultContainerWaitTimeout = 2 * time.Minute
View Source
const DefaultTestTimeout = 5 * time.Second
View Source
const DefaultTestTimeoutInMs = int64(DefaultTestTimeout / time.Millisecond)

Variables

This section is empty.

Functions

func MapMapMarshal

func MapMapMarshal(value reflect.Value, tag string, omitempty, omitminus bool) map[string]interface{}

func MapMarshal

func MapMarshal(iface interface{}, tag string, omitempty, omitminus bool) map[string]interface{}

func MapStructMarshal

func MapStructMarshal(value reflect.Value, tag string, omitempty, omitminus bool) map[string]interface{}

func MapValueMarshal

func MapValueMarshal(value reflect.Value, tag string, omitempty, omitminus, dostrconv bool) (iface interface{})

Types

type JSONStringSerializer

type JSONStringSerializer struct {
	// contains filtered or unexported fields
}

func (*JSONStringSerializer) AsJSON

func (validator *JSONStringSerializer) AsJSON(name string, value interface{}, ignoreOmitempty bool) (string, error)

func (*JSONStringSerializer) Validate

func (validator *JSONStringSerializer) Validate(name string, value string) error

type RPCTestMsg

type RPCTestMsg struct {
	Msg proto.Message
}

RPCTestMsg implements the gomock.Matcher interface

func (*RPCTestMsg) Matches

func (r *RPCTestMsg) Matches(msg interface{}) bool

func (*RPCTestMsg) String

func (r *RPCTestMsg) String() string

type SerializerMixin

type SerializerMixin interface {
	Validate(string, string) error
	AsJSON(string, interface{}, bool) (string, error)
}

func NewJSONStringSerializer

func NewJSONStringSerializer() SerializerMixin

Jump to

Keyboard shortcuts

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