package orm import ( "net/http" "github.com/jinzhu/gorm" ) type Group struct { gorm.Model Name string } func GetGroupsAll(args map[string]string) (interface{}, error) { var groups []*Group if err := DB().Order("name").Find(&groups).Error; err != nil { return nil, err } return groups, nil } func GetGroupAll(args map[string]string) (interface{}, error) { return nil, nil } func GetGroupForUpdate(args map[string]string) (interface{}, error) { return nil, nil } func GetGroupForAdd(args map[string]string) (interface{}, error) { return nil, nil } func GetGroup(args map[string]string) (interface{}, error) { return nil, nil } func UpdateGroup(args map[string]string, r *http.Request) (IDer, error) { return nil, nil } func DeleteGroup(args map[string]string, r *http.Request) (IDer, error) { return nil, nil } func AddGroup(args map[string]string, r *http.Request) (IDer, error) { return nil, nil }