Documentation ¶ Index ¶ func Db() *gorm.DB type Response type Senator func (s Senator) GetAll() ([]Senator, error) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Db ¶ func Db() *gorm.DB Types ¶ type Response ¶ type Response struct { Status int `json:"status,omitempty"` Message string `json:"message,omitempty"` Error string `json:"error,omitempty"` Data interface{} `json:"data,omitempty"` } type Senator ¶ type Senator struct { FullName string State string District string PhoneNumber string // contains filtered or unexported fields } func (Senator) GetAll ¶ func (s Senator) GetAll() ([]Senator, error) GetAll - returns an array containing all the senators Source Files ¶ View all Source files db.go models.go senators.go Click to show internal directories. Click to hide internal directories.