// GetAppGroups handle GET /apps-groups
GetAppGroups handle GET /apps-groups
// GetAppGroups handle GET / apps - groups
func GetAppGroups(c *routing.Context) error {
	nameFilter := ""
	if c.QueryArgs().Has("name") {
		nameFilter = string(c.QueryArgs().Peek("name"))
	}
	page, err := http.ParsePageParam(c)
	if err != nil {
		return http.Error(c, err.Error(), 400, ServiceDiscoveryServiceName())
	}
	appGroupService, err := getAppGroupService(c)
	if err != nil {
		return http.Error(c, err.Error(), 400, ServiceDiscoveryServiceName())
	}
	appGroups := appGroupService.GetApplicationGroups(page, nameFilter)
	if len(appGroups) == 0 {
		return http.Ok(c, `[]`, constants.SERVICE_NAME)
	}
	appGroupsString, _ := json.Marshal(appGroups)
	return http.Ok(c, string(appGroupsString), constants.SERVICE_NAME)
}
func GetAppGroups ( c * routing . Context ) error { nameFilter := " " if c . QueryArgs ( ) . Has ( " " ) { nameFilter = string ( c . QueryArgs ( ) . Peek ( " " ) ) } page , err := http . ParsePageParam ( c ) if err != nil { return http . Error ( c , err . Error ( ) , 400 , ServiceDiscoveryServiceName ( ) ) } appGroupService , err := getAppGroupService ( c ) if err != nil { return http . Error ( c , err . Error ( ) , 400 , ServiceDiscoveryServiceName ( ) ) } appGroups := appGroupService . GetApplicationGroups ( page , nameFilter ) if len ( appGroups ) == 0 { return http . Ok ( c , `[]` , constants . SERVICE_NAME ) } appGroupsString , _ := json . Marshal ( appGroups ) return http . Ok ( c , string ( appGroupsString ) , constants . SERVICE_NAME ) }
GetAppGroups handle GET /apps-groups
GetAppGroups handle GET / apps - groups
// Get page // Get application group service