model

package
v0.0.0-...-1e2a79c Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2023 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 Author

type Author struct {
	ID       uint64 `json:"id" validate:"-" db:"id"`
	Name     string `json:"name" validate:"required,min=3,max=255" db:"name"`
	Email    string `json:"email" validate:"required,email,max=255" db:"email"`
	Password string `json:"password" validate:"required,min=8,max=255" db:"password"`
}

func (*Author) DecodeAndValidate

func (a *Author) DecodeAndValidate(r io.Reader, exceptions ...string) error

type Todo

type Todo struct {
	ID       uint64 `json:"id" validate:"-" db:"id"`
	AuthorID uint64 `json:"author_id" validate:"-" db:"author_id"`
	Title    string `json:"title" validate:"required,max=16" db:"title"`
	Body     string `json:"body" validate:"max=1024" db:"body"`
}

func (*Todo) DecodeAndValidate

func (t *Todo) DecodeAndValidate(r io.Reader, exceptions ...string) error

Jump to

Keyboard shortcuts

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