func (lgc *Logic) AddIndexSet(is *graylog.IndexSet) (int, error) {
	// Class org.graylog2.indexer.rotation.strategies.MessageCountRotationStrategy not subtype of [simple type, class org.graylog2.plugin.indexer.rotation.RotationStrategyConfig] (through reference chain: org.graylog2.rest.resources.system.indexer.responses.IndexSetSummary["rotation_strategy"])
	if is == nil {
		return 400, fmt.Errorf("index set is nil")
	}
	// indexPrefix unique check
	ok, err := lgc.store.IsConflictIndexPrefix(is.ID, is.IndexPrefix)
	if err != nil {
		return 500, err
	}
	if ok {
		return 400, fmt.Errorf(
			`index prefix "%s" would conflict with an existing index set`,
			is.IndexPrefix)
	}
	is.SetCreateDefaultValues()
	if err := validator.CreateValidator.Struct(is); err != nil {
		return 400, err
	}
	is.Default = false
	if err := lgc.store.AddIndexSet(is); err != nil {
		return 500, err
	}
	return 200, nil
}
// AddIndexSet adds an index set to the Mock Server.
AddIndexSet adds an index set to the Mock Server.
// AddIndexSet adds an index set to the Mock Server .
func (lgc *Logic) AddIndexSet(is *graylog.IndexSet) (int, error) {
	if is == nil {
		return 400, fmt.Errorf("index set is nil")
	}
	ok, err := lgc.store.IsConflictIndexPrefix(is.ID, is.IndexPrefix)
	if err != nil {
		return 500, err
	}
	if ok {
		return 400, fmt.Errorf(
			`index prefix "%s" would conflict with an existing index set`,
			is.IndexPrefix)
	}
	is.SetCreateDefaultValues()
	if err := validator.CreateValidator.Struct(is); err != nil {
		return 400, err
	}
	is.Default = false
	if err := lgc.store.AddIndexSet(is); err != nil {
		return 500, err
	}
	return 200, nil
}
func ( lgc * Logic ) AddIndexSet ( is * graylog . IndexSet ) ( int , error ) { if is == nil { return 400 , fmt . Errorf ( " " ) } ok , err := lgc . store . IsConflictIndexPrefix ( is . ID , is . IndexPrefix ) if err != nil { return 500 , err } if ok { return 400 , fmt . Errorf ( `index prefix "%s" would conflict with an existing index set` , is . IndexPrefix ) } is . SetCreateDefaultValues ( ) if err := validator . CreateValidator . Struct ( is ) ; err != nil { return 400 , err } is . Default = false if err := lgc . store . AddIndexSet ( is ) ; err != nil { return 500 , err } return 200 , nil }
AddIndexSet adds an index set to the Mock Server.
AddIndexSet adds an index set to the Mock Server .
// Class org.graylog2.indexer.rotation.strategies.MessageCountRotationStrategy not subtype of [simple type, class org.graylog2.plugin.indexer.rotation.RotationStrategyConfig] (through reference chain: org.graylog2.rest.resources.system.indexer.responses.IndexSetSummary["rotation_strategy"]) // indexPrefix unique check