func (client *Client) CreateInputContext(
	ctx context.Context, input *graylog.Input,
) (ei *ErrorInfo, err error) {
	if input == nil {
		return nil, fmt.Errorf("input is nil")
	}
	if input.ID != "" {
		return nil, fmt.Errorf("input id should be empty")
	}
	// change attributes to configuration
	// https://github.com/Graylog2/graylog2-server/issues/3480
	d := map[string]interface{}{
		"title":         input.Title,
		"type":          input.Type(),
		"configuration": input.Attrs,
		"global":        input.Global,
	}
	if input.Node != "" {
		d["node"] = input.Node
	}

	return client.callPost(ctx, client.Endpoints().Inputs(), &d, input)
}
// CreateInputContext creates an input with a context.
CreateInputContext creates an input with a context.
// CreateInputContext creates an input with a context .
func (client *Client) CreateInputContext(
	ctx context.Context, input *graylog.Input,
) (ei *ErrorInfo, err error) {
	if input == nil {
		return nil, fmt.Errorf("input is nil")
	}
	if input.ID != "" {
		return nil, fmt.Errorf("input id should be empty")
	}
	d := map[string]interface{}{
		"title":         input.Title,
		"type":          input.Type(),
		"configuration": input.Attrs,
		"global":        input.Global,
	}
	if input.Node != "" {
		d["node"] = input.Node
	}
	return client.callPost(ctx, client.Endpoints().Inputs(), &d, input)
}
func ( client * Client ) CreateInputContext ( ctx context . Context , input * graylog . Input , ) ( ei * ErrorInfo , err error ) { if input == nil { return nil , fmt . Errorf ( " " ) } if input . ID != " " { return nil , fmt . Errorf ( " " ) } d := map [ string ] interface { } { " " : input . Title , " " : input . Type ( ) , " " : input . Attrs , " " : input . Global , } if input . Node != " " { d [ " " ] = input . Node } return client . callPost ( ctx , client . Endpoints ( ) . Inputs ( ) , & d , input ) }
CreateInputContext creates an input with a context.
CreateInputContext creates an input with a context .
// change attributes to configuration // https://github.com/Graylog2/graylog2-server/issues/3480