models

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Contact

type Contact struct {
	Id          uint64   `json:"id"`
	Name        string   `json:"name"`
	Phones      []string `json:"phones"`
	Description string   `json:"description,omitempty"`
}

func (*Contact) IsValid

func (c *Contact) IsValid() bool

func (*Contact) Update

func (newContact *Contact) Update(oldContact *Contact)

type Migrate

type Migrate string
const (
	Up   Migrate = "up"
	Down Migrate = "down"
)

type User

type User struct {
	Id        uint64    `json:"Id"`
	Email     string    `json:"email"`
	Password  string    `json:"password,omitempty"`
	Contacts  []Contact `json:"contacts,omitempty"`
	CreatedAt string    `json:"created_at"`
}

func (User) Marshal

func (c User) Marshal() *User

Jump to

Keyboard shortcuts

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