func (lgc *Logic) SetDefaultIndexSet(id string) (*graylog.IndexSet, int, error) {
	is, sc, err := lgc.GetIndexSet(id)
	if err != nil {
		return nil, sc, err
	}
	if is == nil {
		return nil, 404, fmt.Errorf("no indexSet found with id <%s>", id)
	}
	if !is.Writable {
		return nil, 409, fmt.Errorf("default index set must be writable")
	}
	if err := lgc.store.SetDefaultIndexSetID(id); err != nil {
		return nil, 500, err
	}
	is.Default = true
	return is, 200, nil
}
// SetDefaultIndexSet sets a default index set
SetDefaultIndexSet sets a default index set
// SetDefaultIndexSet sets a default index set
func (lgc *Logic) SetDefaultIndexSet(id string) (*graylog.IndexSet, int, error) {
	is, sc, err := lgc.GetIndexSet(id)
	if err != nil {
		return nil, sc, err
	}
	if is == nil {
		return nil, 404, fmt.Errorf("no indexSet found with id <%s>", id)
	}
	if !is.Writable {
		return nil, 409, fmt.Errorf("default index set must be writable")
	}
	if err := lgc.store.SetDefaultIndexSetID(id); err != nil {
		return nil, 500, err
	}
	is.Default = true
	return is, 200, nil
}
func ( lgc * Logic ) SetDefaultIndexSet ( id string ) ( * graylog . IndexSet , int , error ) { is , sc , err := lgc . GetIndexSet ( id ) if err != nil { return nil , sc , err } if is == nil { return nil , 404 , fmt . Errorf ( " " , id ) } if ! is . Writable { return nil , 409 , fmt . Errorf ( " " ) } if err := lgc . store . SetDefaultIndexSetID ( id ) ; err != nil { return nil , 500 , err } is . Default = true return is , 200 , nil }
SetDefaultIndexSet sets a default index set
SetDefaultIndexSet sets a default index set