types

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSONLabels

type JSONLabels map[string]string

JSONLabels is a wrapper type to support JSONB database operations. Add a JSONLabels type to a class field and use it with a JSONB column

func (*JSONLabels) Scan

func (l *JSONLabels) Scan(src interface{}) error

Scan stores the src in *j. No validation is done.

func (*JSONLabels) Unmarshal

func (l *JSONLabels) Unmarshal(v interface{}) error

Unmarshal unmarshal's the json in j to v, as in json.Unmarshal.

func (JSONLabels) Value

func (l JSONLabels) Value() (driver.Value, error)

Value returns j as a value. This does a validating unmarshal into another RawMessage. If j is invalid json, it returns an error. Note that nil values will return "{}" - empty JSON.

Jump to

Keyboard shortcuts

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