Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountData ¶
type AccountData struct { ID string `json:"" gorm:"primary_key"` Name string `json:"name"` Events []AccountEvent `json:"events" gorm:"ForeignKey:AccountID"` }
func (*AccountData) BeforeCreate ¶
func (ad *AccountData) BeforeCreate() (err error)
Before creating, we append a CREATED event
func (*AccountData) BeforeUpdate ¶
func (ad *AccountData) BeforeUpdate(scope *gorm.Scope) (err error)
BeforeUpdate uses the SetColumn method to append a UPDATED event
type AccountEvent ¶
type AccountEvent struct { ID string `json:"" gorm:"primary_key"` AccountID string `json:"-" gorm:"index"` // Don't serialize + index which is very important for performance. EventName string `json:"eventName"` Created string `json:"created"` }
AccountEvent defines a single event on an Account. Uses GORM.
type AccountImage ¶
type AccountImage struct { ID string `json:"id" gorm:"primary_key"` URL string `json:"url"` ServedBy string `json:"servedBy"` }
AccountImage with GORM ID
type EmailAddress ¶
type EmailAddress string
EmailAddress is just a little experiment with go types.
Click to show internal directories.
Click to hide internal directories.