Documentation
¶
Overview ¶
Package validations adds an internal framework API to validate structures without tag annotations. Despite the fact it also has support for tag annotations in order to skip validation for specific structure members.
The main usage for this API is to validate a service main structure, usually the place where its main API are implemented (RPCs and subscription handlers), in an automatic way to avoid using uninitialized members inside the service.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureStructIsServiceCompatible ¶
func EnsureStructIsServiceCompatible(v interface{}) error
EnsureStructIsServiceCompatible validates if v corresponds to a structure that can be used by the framework as the service handler.
func EnsureValuesAreInitialized ¶
func EnsureValuesAreInitialized(v interface{}) error
EnsureValuesAreInitialized certifies that all members of a struct v have some valid value. It requires a struct object to be passed as argument, and it considers a pointer member with nil value as uninitialized.
Types ¶
This section is empty.