models

package
v0.0.0-...-3da7468 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Message string `json:"message"`
}

type JWT

type JWT struct {
	Token string `json:"token"`
}

type NullBool

type NullBool struct {
	sql.NullBool
}

Nullable Bool that overrides sql.NullBool

func (NullBool) MarshalJSON

func (nb NullBool) MarshalJSON() ([]byte, error)

func (*NullBool) UnmarshalJSON

func (nb *NullBool) UnmarshalJSON(data []byte) error

type NullFloat64

type NullFloat64 struct {
	sql.NullFloat64
}

Nullable Float64 that overrides sql.NullFloat64

func (NullFloat64) MarshalJSON

func (nf NullFloat64) MarshalJSON() ([]byte, error)

func (*NullFloat64) UnmarshalJSON

func (nf *NullFloat64) UnmarshalJSON(data []byte) error

type NullInt64

type NullInt64 struct {
	sql.NullInt64
}

Nullable Int64 that overrides sql.NullInt64

func (NullInt64) MarshalJSON

func (ni NullInt64) MarshalJSON() ([]byte, error)

func (*NullInt64) UnmarshalJSON

func (ni *NullInt64) UnmarshalJSON(data []byte) error

type NullString

type NullString struct {
	sql.NullString
}

Nullable String that overrides sql.NullString

func (NullString) MarshalJSON

func (ns NullString) MarshalJSON() ([]byte, error)

func (*NullString) UnmarshalJSON

func (ns *NullString) UnmarshalJSON(data []byte) error

type User

type User struct {
	ID       string     `json:"id"`
	Email    string     `json:"email"`
	Password string     `json:"password,omitempty"`
	Name     string     `json:"name,omitempty"`
	Age      NullInt64  `json:"age,omitempty"`
	Gender   NullString `json:"gender,omitempty"`
}

func (User) MarshalJSON

func (u User) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

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