contacts

package
v0.0.0-...-6bd3384 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2019 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(router *gin.RouterGroup)

func SaveOne

func SaveOne(data interface{}) error

Types

type Contact

type Contact struct {
	ID        int64     `json:"id" binding:"-" validate:"-"`
	Firstname string    `gorm:"type:varchar(64);not null" json:"firstname" form:"firstname" validate:"required,max=64"`
	Lastname  string    `gorm:"type:varchar(64);not null" json:"lastname" form:"lastname" validate:"required,max=64"`
	Email     string    `gorm:"type:varchar(64);not null" json:"email" form:"email" validate:"required,max=64,email"`
	Phone     string    `gorm:"type:varchar(32);not null" json:"phone" form:"phone" validate:"required,max=32,phone"`
	CreatedAt time.Time `json:"created_at" binding:"-" validate:"-"`
	UpdatedAt time.Time `json:"updated_at" binding:"-" validate:"-"`
}

func FindMany

func FindMany() ([]Contact, int, error)

func FindOne

func FindOne(condition interface{}) (Contact, error)

func (*Contact) Delete

func (c *Contact) Delete() error

func (*Contact) Fullname

func (c *Contact) Fullname() string

func (*Contact) Update

func (c *Contact) Update(data interface{}) error

Jump to

Keyboard shortcuts

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