mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-19 23:16:26 +01:00
70 lines
2.7 KiB
Go
70 lines
2.7 KiB
Go
// Code generated by qtc from "stream_label_values_response.qtpl". DO NOT EDIT.
|
|
// See https://github.com/valyala/quicktemplate for details.
|
|
|
|
// StreamLabelValuesResponse formats /select/logsql/stream_label_values response
|
|
|
|
//line app/vlselect/logsql/stream_label_values_response.qtpl:4
|
|
package logsql
|
|
|
|
//line app/vlselect/logsql/stream_label_values_response.qtpl:4
|
|
import (
|
|
qtio422016 "io"
|
|
|
|
qt422016 "github.com/valyala/quicktemplate"
|
|
)
|
|
|
|
//line app/vlselect/logsql/stream_label_values_response.qtpl:4
|
|
var (
|
|
_ = qtio422016.Copy
|
|
_ = qt422016.AcquireByteBuffer
|
|
)
|
|
|
|
//line app/vlselect/logsql/stream_label_values_response.qtpl:4
|
|
func StreamStreamLabelValuesResponse(qw422016 *qt422016.Writer, values []string) {
|
|
//line app/vlselect/logsql/stream_label_values_response.qtpl:4
|
|
qw422016.N().S(`{"values":[`)
|
|
//line app/vlselect/logsql/stream_label_values_response.qtpl:7
|
|
if len(values) > 0 {
|
|
//line app/vlselect/logsql/stream_label_values_response.qtpl:8
|
|
qw422016.N().Q(values[0])
|
|
//line app/vlselect/logsql/stream_label_values_response.qtpl:9
|
|
for _, v := range values[1:] {
|
|
//line app/vlselect/logsql/stream_label_values_response.qtpl:9
|
|
qw422016.N().S(`,`)
|
|
//line app/vlselect/logsql/stream_label_values_response.qtpl:10
|
|
qw422016.N().Q(v)
|
|
//line app/vlselect/logsql/stream_label_values_response.qtpl:11
|
|
}
|
|
//line app/vlselect/logsql/stream_label_values_response.qtpl:12
|
|
}
|
|
//line app/vlselect/logsql/stream_label_values_response.qtpl:12
|
|
qw422016.N().S(`]}`)
|
|
//line app/vlselect/logsql/stream_label_values_response.qtpl:15
|
|
}
|
|
|
|
//line app/vlselect/logsql/stream_label_values_response.qtpl:15
|
|
func WriteStreamLabelValuesResponse(qq422016 qtio422016.Writer, values []string) {
|
|
//line app/vlselect/logsql/stream_label_values_response.qtpl:15
|
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
|
//line app/vlselect/logsql/stream_label_values_response.qtpl:15
|
|
StreamStreamLabelValuesResponse(qw422016, values)
|
|
//line app/vlselect/logsql/stream_label_values_response.qtpl:15
|
|
qt422016.ReleaseWriter(qw422016)
|
|
//line app/vlselect/logsql/stream_label_values_response.qtpl:15
|
|
}
|
|
|
|
//line app/vlselect/logsql/stream_label_values_response.qtpl:15
|
|
func StreamLabelValuesResponse(values []string) string {
|
|
//line app/vlselect/logsql/stream_label_values_response.qtpl:15
|
|
qb422016 := qt422016.AcquireByteBuffer()
|
|
//line app/vlselect/logsql/stream_label_values_response.qtpl:15
|
|
WriteStreamLabelValuesResponse(qb422016, values)
|
|
//line app/vlselect/logsql/stream_label_values_response.qtpl:15
|
|
qs422016 := string(qb422016.B)
|
|
//line app/vlselect/logsql/stream_label_values_response.qtpl:15
|
|
qt422016.ReleaseByteBuffer(qb422016)
|
|
//line app/vlselect/logsql/stream_label_values_response.qtpl:15
|
|
return qs422016
|
|
//line app/vlselect/logsql/stream_label_values_response.qtpl:15
|
|
}
|