github.com/hxx258456/ccgo@v0.0.5-0.20230213014102-48b35f46f66f/go-control-plane/envoy/type/range.pb.validate.go (about)

     1  // Code generated by protoc-gen-validate. DO NOT EDIT.
     2  // source: envoy/type/range.proto
     3  
     4  package envoy_type
     5  
     6  import (
     7  	"bytes"
     8  	"errors"
     9  	"fmt"
    10  	"net"
    11  	"net/mail"
    12  	"net/url"
    13  	"regexp"
    14  	"strings"
    15  	"time"
    16  	"unicode/utf8"
    17  
    18  	"google.golang.org/protobuf/types/known/anypb"
    19  )
    20  
    21  // ensure the imports are used
    22  var (
    23  	_ = bytes.MinRead
    24  	_ = errors.New("")
    25  	_ = fmt.Print
    26  	_ = utf8.UTFMax
    27  	_ = (*regexp.Regexp)(nil)
    28  	_ = (*strings.Reader)(nil)
    29  	_ = net.IPv4len
    30  	_ = time.Duration(0)
    31  	_ = (*url.URL)(nil)
    32  	_ = (*mail.Address)(nil)
    33  	_ = anypb.Any{}
    34  )
    35  
    36  // Validate checks the field values on Int64Range with the rules defined in the
    37  // proto definition for this message. If any rules are violated, an error is returned.
    38  func (m *Int64Range) Validate() error {
    39  	if m == nil {
    40  		return nil
    41  	}
    42  
    43  	// no validation rules for Start
    44  
    45  	// no validation rules for End
    46  
    47  	return nil
    48  }
    49  
    50  // Int64RangeValidationError is the validation error returned by
    51  // Int64Range.Validate if the designated constraints aren't met.
    52  type Int64RangeValidationError struct {
    53  	field  string
    54  	reason string
    55  	cause  error
    56  	key    bool
    57  }
    58  
    59  // Field function returns field value.
    60  func (e Int64RangeValidationError) Field() string { return e.field }
    61  
    62  // Reason function returns reason value.
    63  func (e Int64RangeValidationError) Reason() string { return e.reason }
    64  
    65  // Cause function returns cause value.
    66  func (e Int64RangeValidationError) Cause() error { return e.cause }
    67  
    68  // Key function returns key value.
    69  func (e Int64RangeValidationError) Key() bool { return e.key }
    70  
    71  // ErrorName returns error name.
    72  func (e Int64RangeValidationError) ErrorName() string { return "Int64RangeValidationError" }
    73  
    74  // Error satisfies the builtin error interface
    75  func (e Int64RangeValidationError) Error() string {
    76  	cause := ""
    77  	if e.cause != nil {
    78  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
    79  	}
    80  
    81  	key := ""
    82  	if e.key {
    83  		key = "key for "
    84  	}
    85  
    86  	return fmt.Sprintf(
    87  		"invalid %sInt64Range.%s: %s%s",
    88  		key,
    89  		e.field,
    90  		e.reason,
    91  		cause)
    92  }
    93  
    94  var _ error = Int64RangeValidationError{}
    95  
    96  var _ interface {
    97  	Field() string
    98  	Reason() string
    99  	Key() bool
   100  	Cause() error
   101  	ErrorName() string
   102  } = Int64RangeValidationError{}
   103  
   104  // Validate checks the field values on Int32Range with the rules defined in the
   105  // proto definition for this message. If any rules are violated, an error is returned.
   106  func (m *Int32Range) Validate() error {
   107  	if m == nil {
   108  		return nil
   109  	}
   110  
   111  	// no validation rules for Start
   112  
   113  	// no validation rules for End
   114  
   115  	return nil
   116  }
   117  
   118  // Int32RangeValidationError is the validation error returned by
   119  // Int32Range.Validate if the designated constraints aren't met.
   120  type Int32RangeValidationError struct {
   121  	field  string
   122  	reason string
   123  	cause  error
   124  	key    bool
   125  }
   126  
   127  // Field function returns field value.
   128  func (e Int32RangeValidationError) Field() string { return e.field }
   129  
   130  // Reason function returns reason value.
   131  func (e Int32RangeValidationError) Reason() string { return e.reason }
   132  
   133  // Cause function returns cause value.
   134  func (e Int32RangeValidationError) Cause() error { return e.cause }
   135  
   136  // Key function returns key value.
   137  func (e Int32RangeValidationError) Key() bool { return e.key }
   138  
   139  // ErrorName returns error name.
   140  func (e Int32RangeValidationError) ErrorName() string { return "Int32RangeValidationError" }
   141  
   142  // Error satisfies the builtin error interface
   143  func (e Int32RangeValidationError) Error() string {
   144  	cause := ""
   145  	if e.cause != nil {
   146  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
   147  	}
   148  
   149  	key := ""
   150  	if e.key {
   151  		key = "key for "
   152  	}
   153  
   154  	return fmt.Sprintf(
   155  		"invalid %sInt32Range.%s: %s%s",
   156  		key,
   157  		e.field,
   158  		e.reason,
   159  		cause)
   160  }
   161  
   162  var _ error = Int32RangeValidationError{}
   163  
   164  var _ interface {
   165  	Field() string
   166  	Reason() string
   167  	Key() bool
   168  	Cause() error
   169  	ErrorName() string
   170  } = Int32RangeValidationError{}
   171  
   172  // Validate checks the field values on DoubleRange with the rules defined in
   173  // the proto definition for this message. If any rules are violated, an error
   174  // is returned.
   175  func (m *DoubleRange) Validate() error {
   176  	if m == nil {
   177  		return nil
   178  	}
   179  
   180  	// no validation rules for Start
   181  
   182  	// no validation rules for End
   183  
   184  	return nil
   185  }
   186  
   187  // DoubleRangeValidationError is the validation error returned by
   188  // DoubleRange.Validate if the designated constraints aren't met.
   189  type DoubleRangeValidationError struct {
   190  	field  string
   191  	reason string
   192  	cause  error
   193  	key    bool
   194  }
   195  
   196  // Field function returns field value.
   197  func (e DoubleRangeValidationError) Field() string { return e.field }
   198  
   199  // Reason function returns reason value.
   200  func (e DoubleRangeValidationError) Reason() string { return e.reason }
   201  
   202  // Cause function returns cause value.
   203  func (e DoubleRangeValidationError) Cause() error { return e.cause }
   204  
   205  // Key function returns key value.
   206  func (e DoubleRangeValidationError) Key() bool { return e.key }
   207  
   208  // ErrorName returns error name.
   209  func (e DoubleRangeValidationError) ErrorName() string { return "DoubleRangeValidationError" }
   210  
   211  // Error satisfies the builtin error interface
   212  func (e DoubleRangeValidationError) Error() string {
   213  	cause := ""
   214  	if e.cause != nil {
   215  		cause = fmt.Sprintf(" | caused by: %v", e.cause)
   216  	}
   217  
   218  	key := ""
   219  	if e.key {
   220  		key = "key for "
   221  	}
   222  
   223  	return fmt.Sprintf(
   224  		"invalid %sDoubleRange.%s: %s%s",
   225  		key,
   226  		e.field,
   227  		e.reason,
   228  		cause)
   229  }
   230  
   231  var _ error = DoubleRangeValidationError{}
   232  
   233  var _ interface {
   234  	Field() string
   235  	Reason() string
   236  	Key() bool
   237  	Cause() error
   238  	ErrorName() string
   239  } = DoubleRangeValidationError{}