func (lgc *Logic) GetInput(id string) (*graylog.Input, int, error) {
	if id == "" {
		return nil, 400, fmt.Errorf("input id is empty")
	}
	if err := ValidateObjectID(id); err != nil {
		// unfortunately graylog returns not 400 but 404.
		return nil, 404, err
	}
	input, err := lgc.store.GetInput(id)
	if err != nil {
		return input, 500, err
	}
	if input == nil {
		return nil, 404, fmt.Errorf("no input with id <%s> is found", id)
	}
	return input, 200, nil
}
// GetInput returns an input.
// If an input is not found, returns an error.
GetInput returns an input.
If an input is not found, returns an error.
// GetInput returns an input . // If an input is not found returns an error .
func (lgc *Logic) GetInput(id string) (*graylog.Input, int, error) {
	if id == "" {
		return nil, 400, fmt.Errorf("input id is empty")
	}
	if err := ValidateObjectID(id); err != nil {
		return nil, 404, err
	}
	input, err := lgc.store.GetInput(id)
	if err != nil {
		return input, 500, err
	}
	if input == nil {
		return nil, 404, fmt.Errorf("no input with id <%s> is found", id)
	}
	return input, 200, nil
}
func ( lgc * Logic ) GetInput ( id string ) ( * graylog . Input , int , error ) { if id == " " { return nil , 400 , fmt . Errorf ( " " ) } if err := ValidateObjectID ( id ) ; err != nil { return nil , 404 , err } input , err := lgc . store . GetInput ( id ) if err != nil { return input , 500 , err } if input == nil { return nil , 404 , fmt . Errorf ( " " , id ) } return input , 200 , nil }
GetInput returns an input.
GetInput returns an input .
// unfortunately graylog returns not 400 but 404.