models

package
v0.0.0-...-c6ffc77 Latest Latest
Warning

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

Go to latest
Published: May 12, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Customer

type Customer struct {
	ID       primitive.ObjectID `json:"id,omitempty"`
	Name     string             `json:"name" validate:"required"`
	Lastname string             `json:"lastname" validate:"required"`
	Age      int32              `json:"age" validate:"required"`
	Email    string             `json:"email" validate:"email"`
	Gender   string             `json:"gender,omitempty"`
}

type Error

type Error struct {
	Code    string `json:"code"`
	Message string `json:"message"`
	Source  string `json:"source"`
}

type Validator

type Validator struct {
	Validator *validator.Validate
}

Validator struct

func (*Validator) Validate

func (v *Validator) Validate(i interface{}) error

Validate func is used for validate structs

Jump to

Keyboard shortcuts

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