Documentation ¶ Index ¶ Variables func Connector() *gorm.DB type Answer type Question type User Constants ¶ This section is empty. Variables ¶ View Source var DB *gorm.DB DB connection Functions ¶ func Connector ¶ func Connector() *gorm.DB Connector DB Types ¶ type Answer ¶ type Answer struct { gorm.Model TextAnswer string UserRef uint QuestionRef uint } Answer DB table type Question ¶ type Question struct { gorm.Model TextQuestion string UserRefer uint } Question DB table type User ¶ type User struct { gorm.Model Username string `json:"username" gorm:"size=255"` Age int `json:"age"` Questions []Question `json:"questions" gorm:"foreignkey=UserID"` } User DB table Source Files ¶ View all Source files answer.go question.go user.go utilities.go Click to show internal directories. Click to hide internal directories.