models

package
v0.0.0-...-0665d9d Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetUserRequest

type GetUserRequest struct {
	Id int64 `form:"id" binding:"required"`
}

type HealthCheckResponse

type HealthCheckResponse struct {
	Status         string `json:"status"`
	DbConnectionOk bool   `json:"db_conn_ok"`
}

type JsonBirthDate

type JsonBirthDate time.Time

func (JsonBirthDate) ConvertValue

func (j JsonBirthDate) ConvertValue(v interface{}) (driver.Value, error)

func (JsonBirthDate) Format

func (j JsonBirthDate) Format(s string) string

Maybe a Format function for printing your date

func (JsonBirthDate) MarshalJSON

func (j JsonBirthDate) MarshalJSON() ([]byte, error)

func (JsonBirthDate) Time

func (j JsonBirthDate) Time() (time.Time, error)

func (*JsonBirthDate) UnmarshalJSON

func (j *JsonBirthDate) UnmarshalJSON(b []byte) error

func (JsonBirthDate) Value

func (j JsonBirthDate) Value() (driver.Value, error)

type ListUserRequest

type ListUserRequest struct {
	Offset int `form:"offset"`
	Limit  int `form:"limit" binding:"required"`
}

type User

type User struct {
	Id        int64         `json:"id" db:"id"`
	Name      string        `json:"name" db:"name" binding:"required"`
	Birthday  JsonBirthDate `json:"birthday" db:"birthday" binding:"required"`
	CreatedAt *time.Time    `json:"created_at" db:"created_at"`
	UpdatedAt *time.Time    `json:"updated_at" db:"updated_at"`
}

type ValidationError

type ValidationError struct {
	Message string `json:"message" binding:"required"`
}

Jump to

Keyboard shortcuts

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