Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Contact ¶
type Contact struct { ID int `gorm:"AUTO_INCREMENT;column:contact_id"` Name string `gorm:"type:text;not_null"` Email string `gorm:"type:text;not_null"` BirthDate time.Time `gorm:"type:TIMESTAMP;not null;"` }
func (Contact) GetBirthDate ¶
type ContactRepository ¶
type ContactRepository interface { FindAll() ([]Contact, error) Get(id int) (Contact, error) Create(contact Contact) (int, error) Update(contact Contact) error Delete(id int) error FindByEmail(email string) (Contact, error) }
func NewContactSqlRepository ¶
func NewContactSqlRepository(conn string) (ContactRepository, error)
Click to show internal directories.
Click to hide internal directories.