models

package
v0.0.0-...-efea637 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2020 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 Animal

type Animal struct {
	ID        string    `jsonapi:"primary,animals"`
	Name      string    `jsonapi:"attr,name"`
	CreatedAt time.Time `jsonapi:"attr,created_at"`
	UpdatedAt time.Time `jsonapi:"attr,updated_at"`
}

func NewAnimal

func NewAnimal(id, name string, createdAt, updatedAt time.Time) *Animal

type User

type User struct {
	ID        string    `jsonapi:"primary,users"`
	Username  string    `jsonapi:"attr,username"`
	FullName  string    `jsonapi:"attr,full_name"`
	Email     string    `jsonapi:"attr,email"`
	Phone     string    `jsonapi:"attr,phone"`
	CreatedAt time.Time `jsonapi:"attr,created_at"`
	UpdatedAt time.Time `jsonapi:"attr,updated_at"`
}

func NewUser

func NewUser(username, fullName, email, phone string) *User

Jump to

Keyboard shortcuts

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