Documentation ¶
Overview ¶
Package models extends the schema package for model management
Index ¶
- Variables
- func StartUp() (err error)
- type EmailExampleData
- type Person
- func GetPersonByEmail(email string) (person *Person, err error)
- func GetPersonByID(id uint64) (person *Person, err error)
- func GetPersons() (persons []Person, err error)
- func NewPerson() *Person
- func NewPersonUsingSchema(person schema.Person) *Person
- func NewPersonsUsingSchema(personSlice schema.PersonSlice) []Person
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // PersonCreateColumns columns only allowed in create PersonCreateColumns = boil.Greylist( schema.PersonColumns.Email, schema.PersonColumns.FirstName, schema.PersonColumns.LastName, schema.PersonColumns.MiddleName, ) // PersonUpdateColumns columns only allowed in update PersonUpdateColumns = boil.Whitelist( schema.PersonColumns.Email, schema.PersonColumns.FirstName, schema.PersonColumns.LastName, schema.PersonColumns.MiddleName, ) // PersonDeleteColumns columns only allowed in delete PersonDeleteColumns = boil.Whitelist( schema.PersonColumns.IsDeleted, ) // PersonAllFields all fields that can be displayed PersonAllFields = []string{ schema.PersonColumns.CreatedAt, schema.PersonColumns.Email, schema.PersonColumns.FirstName, schema.PersonColumns.ID, schema.PersonColumns.LastName, schema.PersonColumns.MiddleName, schema.PersonColumns.ModifiedAt, } )
Functions ¶
Types ¶
type EmailExampleData ¶ added in v0.0.3
EmailExampleData is the email struct for the data
type Person ¶
Person extends the schema model
func GetPersonByEmail ¶
GetPersonByEmail gets a person by email address
func GetPersonByID ¶
GetPersonByID gets a person by ID
func GetPersons ¶
GetPersons gets an array of person //todo: temporary for now
func NewPersonUsingSchema ¶
NewPersonUsingSchema creates a person model using a schema
func NewPersonsUsingSchema ¶
func NewPersonsUsingSchema(personSlice schema.PersonSlice) []Person
NewPersonsUsingSchema creates a new model using a schema
func (*Person) BeforeValidate ¶
func (p *Person) BeforeValidate()
BeforeValidate runs before validate (sanitizing, formatting, default values)
func (*Person) SendExampleEmail ¶ added in v0.0.3
SendExampleEmail sends an example email
Click to show internal directories.
Click to hide internal directories.