Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrValidationSlice ¶
func InitCustomValidation ¶
func InitCustomValidation()
Types ¶
type Company ¶
type Company struct { ID string `json:"id,omitempty" bson:"_id"` Name string `json:"name" bson:"company_name" binding:"required,min=3,max=15"` Description string `json:"description,omitempty" bson:"description" binding:"max=3000"` EmpCount uint16 `json:"total_employees" bson:"total_employees" binding:"required"` IsRegistered bool `json:"registered" bson:"registered" binding:"required"` Type CompanyType `json:"type" bson:"type" binding:"required,companyType"` }
type CompanyType ¶
type CompanyType string
const ( Corporation CompanyType = "Corporations" NonProfit CompanyType = "NonProfit" Cooperative CompanyType = "Cooperative" SoleProprietorship CompanyType = "Sole Proprietorship" )
func (CompanyType) IsValid ¶
func (ct CompanyType) IsValid() bool
type CompanyUpdate ¶
type CompanyUpdate struct { Name *string `json:"name,omitempty" binding:"omitempty,min=3,max=15"` Description *string `json:"description,omitempty" binding:"omitempty,max=3000"` EmpCount *uint16 `json:"total_employees,omitempty"` IsRegistered *bool `json:"registered,omitempty"` Type *CompanyType `json:"type,omitempty" binding:"omitempty,companyType"` }
Click to show internal directories.
Click to hide internal directories.