Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PointerToStringStruct ¶
Validates that the input is a pointer to a struct where all fields are strings.
func StructFromJSON ¶
Finds any fields from the struct which are zero-valued. `value` must be a `struct` or its pointer. Accepted tags:
`json:"nameInJson"` -> maps JSON to struct fields when deserialising JSON `optional:"true"` -> for JSONField only, allows field to not be set `nullable:"true"` -> for JSONField only, allows field to be set to null `zeroable:"true"` -> for JSONField only, allows field to be set to zero-value
Used to validate the deserialisation of a JSON document.
func UniqueList ¶
func UniqueList[K comparable](list []K) bool
Types ¶
type JSONField ¶
Type wrapper used to validate the struct which a JSON document is unmarshaled to. Accepted tags:
`json:"nameInJson"` -> maps JSON to struct fields when deserialising JSON `optional:"true"` -> allows field to not be set `nullable:"true"` -> allows field to be set to null `zeroable:"true"` -> allows field to be set to zero-value
Click to show internal directories.
Click to hide internal directories.