Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PreDefinedIndustries ¶
func PreDefinedIndustries() error
Types ¶
type API ¶
API holds all related api handlers
func (*API) GetContact ¶
GetContact handles get request to return existing contact
func (*API) PostContact ¶
PostContact handles post request to create new contact
type Contact ¶
type Contact struct { gorm.Model FirstName string `gorm:"first_name" json:"first_name,omitempty"` LastName string `gorm:"last_name" json:"last_name,omitempty"` Image string `gorm:"image" json:"image,omitempty"` Email string `gorm:"email" json:"email,omitempty"` Phone string `gorm:"phone" json:"phone,omitempty"` CompanyID uint `gorm:"company_id" json:"company_id,omitempty"` }
Contact holds api(s)
type Contactinfo ¶
type Contactinfo struct { FirstName string `json:"first_name,omitempty" valid:"alphanum,length(2|100),required"` LastName string `json:"last_name,omitempty" valid:"alphanum,length(2|100),required"` Email string `json:"email,omitempty" valid:"email,length(6|255),required"` Phone string `json:"phone,omitempty" valid:"number,length(10|12),required"` }
Contactinfo struct to hold post request for contact
Click to show internal directories.
Click to hide internal directories.