model

package
v0.0.0-...-9ede961 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2020 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Health

type Health struct {
	Status   string `json:"status"`
	Database string `json:"database"`
}

Type Health for use health checks endpoint Ex: status: "UP"

type User

type User struct {
	Id   int    `json:"id"`
	Name string `json:"name"`
	Age  int    `json:"age"`
}

User type for use CAD

func (User) FindAll

func (_ User) FindAll() []User

find all users in a repository

func (User) FindById

func (_ User) FindById(id int) *User

find user by id

func (User) Remove

func (user User) Remove() error

delete user in a repository

func (*User) Save

func (user *User) Save() error

save new user in a repository

func (*User) Update

func (user *User) Update(id int) error

update user in a repository

Jump to

Keyboard shortcuts

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