package k8s_manager type AppModel struct { Id int AppName string UserName string Image string Command string Env string SvcName string } func (AppModel) TableName() string { return "app" } func GetApps(username string) []AppModel { db := DB() ans := make([]AppModel, 0) db.Where("user_name = ?", username).Find(&ans) return ans }