@@ -29,7 +29,7 @@ import (
2929
3030// Decoder types decode an input stream into metric families.
3131type Decoder interface {
32- Decode (* dto.MetricFamily , model.NameValidationScheme ) error
32+ Decode (* dto.MetricFamily , model.ValidationScheme ) error
3333}
3434
3535// DecodeOptions contains options used by the Decoder and in sample extraction.
@@ -86,7 +86,7 @@ type protoDecoder struct {
8686}
8787
8888// Decode implements the Decoder interface.
89- func (d * protoDecoder ) Decode (v * dto.MetricFamily , nameValidationScheme model.NameValidationScheme ) error {
89+ func (d * protoDecoder ) Decode (v * dto.MetricFamily , nameValidationScheme model.ValidationScheme ) error {
9090 opts := protodelim.UnmarshalOptions {
9191 MaxSize : - 1 ,
9292 }
@@ -123,7 +123,7 @@ type textDecoder struct {
123123}
124124
125125// Decode implements the Decoder interface.
126- func (d * textDecoder ) Decode (v * dto.MetricFamily , _ model.NameValidationScheme ) error {
126+ func (d * textDecoder ) Decode (v * dto.MetricFamily , _ model.ValidationScheme ) error {
127127 if d .err == nil {
128128 // Read all metrics in one shot.
129129 var p TextParser
@@ -156,7 +156,7 @@ type SampleDecoder struct {
156156
157157// Decode calls the Decode method of the wrapped Decoder and then extracts the
158158// samples from the decoded MetricFamily into the provided model.Vector.
159- func (sd * SampleDecoder ) Decode (s * model.Vector , nameValidationScheme model.NameValidationScheme ) error {
159+ func (sd * SampleDecoder ) Decode (s * model.Vector , nameValidationScheme model.ValidationScheme ) error {
160160 err := sd .Dec .Decode (& sd .f , nameValidationScheme )
161161 if err != nil {
162162 return err
0 commit comments