3529 lines
93 KiB
Go
3529 lines
93 KiB
Go
// Code generated by protoc-gen-validate. DO NOT EDIT.
|
|
// source: pkgdash.proto
|
|
|
|
package pkgdashpb
|
|
|
|
import (
|
|
"bytes"
|
|
"errors"
|
|
"fmt"
|
|
"net"
|
|
"net/mail"
|
|
"net/url"
|
|
"regexp"
|
|
"sort"
|
|
"strings"
|
|
"time"
|
|
"unicode/utf8"
|
|
|
|
"google.golang.org/protobuf/types/known/anypb"
|
|
)
|
|
|
|
// ensure the imports are used
|
|
var (
|
|
_ = bytes.MinRead
|
|
_ = errors.New("")
|
|
_ = fmt.Print
|
|
_ = utf8.UTFMax
|
|
_ = (*regexp.Regexp)(nil)
|
|
_ = (*strings.Reader)(nil)
|
|
_ = net.IPv4len
|
|
_ = time.Duration(0)
|
|
_ = (*url.URL)(nil)
|
|
_ = (*mail.Address)(nil)
|
|
_ = anypb.Any{}
|
|
_ = sort.Sort
|
|
)
|
|
|
|
// Validate checks the field values on PackagesModulesReq with the rules
|
|
// defined in the proto definition for this message. If any rules are
|
|
// violated, the first error encountered is returned, or nil if there are no violations.
|
|
func (m *PackagesModulesReq) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on PackagesModulesReq with the rules
|
|
// defined in the proto definition for this message. If any rules are
|
|
// violated, the result is a list of violation errors wrapped in
|
|
// PackagesModulesReqMultiError, or nil if none found.
|
|
func (m *PackagesModulesReq) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *PackagesModulesReq) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
// no validation rules for Id
|
|
|
|
if len(errors) > 0 {
|
|
return PackagesModulesReqMultiError(errors)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// PackagesModulesReqMultiError is an error wrapping multiple validation errors
|
|
// returned by PackagesModulesReq.ValidateAll() if the designated constraints
|
|
// aren't met.
|
|
type PackagesModulesReqMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m PackagesModulesReqMultiError) Error() string {
|
|
var msgs []string
|
|
for _, err := range m {
|
|
msgs = append(msgs, err.Error())
|
|
}
|
|
return strings.Join(msgs, "; ")
|
|
}
|
|
|
|
// AllErrors returns a list of validation violation errors.
|
|
func (m PackagesModulesReqMultiError) AllErrors() []error { return m }
|
|
|
|
// PackagesModulesReqValidationError is the validation error returned by
|
|
// PackagesModulesReq.Validate if the designated constraints aren't met.
|
|
type PackagesModulesReqValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e PackagesModulesReqValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e PackagesModulesReqValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e PackagesModulesReqValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e PackagesModulesReqValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e PackagesModulesReqValidationError) ErrorName() string {
|
|
return "PackagesModulesReqValidationError"
|
|
}
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e PackagesModulesReqValidationError) Error() string {
|
|
cause := ""
|
|
if e.cause != nil {
|
|
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
|
}
|
|
|
|
key := ""
|
|
if e.key {
|
|
key = "key for "
|
|
}
|
|
|
|
return fmt.Sprintf(
|
|
"invalid %sPackagesModulesReq.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = PackagesModulesReqValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = PackagesModulesReqValidationError{}
|
|
|
|
// Validate checks the field values on PackagesModulesRsp with the rules
|
|
// defined in the proto definition for this message. If any rules are
|
|
// violated, the first error encountered is returned, or nil if there are no violations.
|
|
func (m *PackagesModulesRsp) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on PackagesModulesRsp with the rules
|
|
// defined in the proto definition for this message. If any rules are
|
|
// violated, the result is a list of violation errors wrapped in
|
|
// PackagesModulesRspMultiError, or nil if none found.
|
|
func (m *PackagesModulesRsp) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *PackagesModulesRsp) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
for idx, item := range m.GetModules() {
|
|
_, _ = idx, item
|
|
|
|
if all {
|
|
switch v := interface{}(item).(type) {
|
|
case interface{ ValidateAll() error }:
|
|
if err := v.ValidateAll(); err != nil {
|
|
errors = append(errors, PackagesModulesRspValidationError{
|
|
field: fmt.Sprintf("Modules[%v]", idx),
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
})
|
|
}
|
|
case interface{ Validate() error }:
|
|
if err := v.Validate(); err != nil {
|
|
errors = append(errors, PackagesModulesRspValidationError{
|
|
field: fmt.Sprintf("Modules[%v]", idx),
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
})
|
|
}
|
|
}
|
|
} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
|
|
if err := v.Validate(); err != nil {
|
|
return PackagesModulesRspValidationError{
|
|
field: fmt.Sprintf("Modules[%v]", idx),
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if len(errors) > 0 {
|
|
return PackagesModulesRspMultiError(errors)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// PackagesModulesRspMultiError is an error wrapping multiple validation errors
|
|
// returned by PackagesModulesRsp.ValidateAll() if the designated constraints
|
|
// aren't met.
|
|
type PackagesModulesRspMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m PackagesModulesRspMultiError) Error() string {
|
|
var msgs []string
|
|
for _, err := range m {
|
|
msgs = append(msgs, err.Error())
|
|
}
|
|
return strings.Join(msgs, "; ")
|
|
}
|
|
|
|
// AllErrors returns a list of validation violation errors.
|
|
func (m PackagesModulesRspMultiError) AllErrors() []error { return m }
|
|
|
|
// PackagesModulesRspValidationError is the validation error returned by
|
|
// PackagesModulesRsp.Validate if the designated constraints aren't met.
|
|
type PackagesModulesRspValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e PackagesModulesRspValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e PackagesModulesRspValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e PackagesModulesRspValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e PackagesModulesRspValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e PackagesModulesRspValidationError) ErrorName() string {
|
|
return "PackagesModulesRspValidationError"
|
|
}
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e PackagesModulesRspValidationError) Error() string {
|
|
cause := ""
|
|
if e.cause != nil {
|
|
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
|
}
|
|
|
|
key := ""
|
|
if e.key {
|
|
key = "key for "
|
|
}
|
|
|
|
return fmt.Sprintf(
|
|
"invalid %sPackagesModulesRsp.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = PackagesModulesRspValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = PackagesModulesRspValidationError{}
|
|
|
|
// Validate checks the field values on PackagesLookupReq with the rules defined
|
|
// in the proto definition for this message. If any rules are violated, the
|
|
// first error encountered is returned, or nil if there are no violations.
|
|
func (m *PackagesLookupReq) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on PackagesLookupReq with the rules
|
|
// defined in the proto definition for this message. If any rules are
|
|
// violated, the result is a list of violation errors wrapped in
|
|
// PackagesLookupReqMultiError, or nil if none found.
|
|
func (m *PackagesLookupReq) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *PackagesLookupReq) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
// no validation rules for Id
|
|
|
|
if len(errors) > 0 {
|
|
return PackagesLookupReqMultiError(errors)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// PackagesLookupReqMultiError is an error wrapping multiple validation errors
|
|
// returned by PackagesLookupReq.ValidateAll() if the designated constraints
|
|
// aren't met.
|
|
type PackagesLookupReqMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m PackagesLookupReqMultiError) Error() string {
|
|
var msgs []string
|
|
for _, err := range m {
|
|
msgs = append(msgs, err.Error())
|
|
}
|
|
return strings.Join(msgs, "; ")
|
|
}
|
|
|
|
// AllErrors returns a list of validation violation errors.
|
|
func (m PackagesLookupReqMultiError) AllErrors() []error { return m }
|
|
|
|
// PackagesLookupReqValidationError is the validation error returned by
|
|
// PackagesLookupReq.Validate if the designated constraints aren't met.
|
|
type PackagesLookupReqValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e PackagesLookupReqValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e PackagesLookupReqValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e PackagesLookupReqValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e PackagesLookupReqValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e PackagesLookupReqValidationError) ErrorName() string {
|
|
return "PackagesLookupReqValidationError"
|
|
}
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e PackagesLookupReqValidationError) Error() string {
|
|
cause := ""
|
|
if e.cause != nil {
|
|
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
|
}
|
|
|
|
key := ""
|
|
if e.key {
|
|
key = "key for "
|
|
}
|
|
|
|
return fmt.Sprintf(
|
|
"invalid %sPackagesLookupReq.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = PackagesLookupReqValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = PackagesLookupReqValidationError{}
|
|
|
|
// Validate checks the field values on PackagesLookupRsp with the rules defined
|
|
// in the proto definition for this message. If any rules are violated, the
|
|
// first error encountered is returned, or nil if there are no violations.
|
|
func (m *PackagesLookupRsp) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on PackagesLookupRsp with the rules
|
|
// defined in the proto definition for this message. If any rules are
|
|
// violated, the result is a list of violation errors wrapped in
|
|
// PackagesLookupRspMultiError, or nil if none found.
|
|
func (m *PackagesLookupRsp) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *PackagesLookupRsp) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
if all {
|
|
switch v := interface{}(m.GetPackage()).(type) {
|
|
case interface{ ValidateAll() error }:
|
|
if err := v.ValidateAll(); err != nil {
|
|
errors = append(errors, PackagesLookupRspValidationError{
|
|
field: "Package",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
})
|
|
}
|
|
case interface{ Validate() error }:
|
|
if err := v.Validate(); err != nil {
|
|
errors = append(errors, PackagesLookupRspValidationError{
|
|
field: "Package",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
})
|
|
}
|
|
}
|
|
} else if v, ok := interface{}(m.GetPackage()).(interface{ Validate() error }); ok {
|
|
if err := v.Validate(); err != nil {
|
|
return PackagesLookupRspValidationError{
|
|
field: "Package",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
}
|
|
}
|
|
}
|
|
|
|
if len(errors) > 0 {
|
|
return PackagesLookupRspMultiError(errors)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// PackagesLookupRspMultiError is an error wrapping multiple validation errors
|
|
// returned by PackagesLookupRsp.ValidateAll() if the designated constraints
|
|
// aren't met.
|
|
type PackagesLookupRspMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m PackagesLookupRspMultiError) Error() string {
|
|
var msgs []string
|
|
for _, err := range m {
|
|
msgs = append(msgs, err.Error())
|
|
}
|
|
return strings.Join(msgs, "; ")
|
|
}
|
|
|
|
// AllErrors returns a list of validation violation errors.
|
|
func (m PackagesLookupRspMultiError) AllErrors() []error { return m }
|
|
|
|
// PackagesLookupRspValidationError is the validation error returned by
|
|
// PackagesLookupRsp.Validate if the designated constraints aren't met.
|
|
type PackagesLookupRspValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e PackagesLookupRspValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e PackagesLookupRspValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e PackagesLookupRspValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e PackagesLookupRspValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e PackagesLookupRspValidationError) ErrorName() string {
|
|
return "PackagesLookupRspValidationError"
|
|
}
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e PackagesLookupRspValidationError) Error() string {
|
|
cause := ""
|
|
if e.cause != nil {
|
|
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
|
}
|
|
|
|
key := ""
|
|
if e.key {
|
|
key = "key for "
|
|
}
|
|
|
|
return fmt.Sprintf(
|
|
"invalid %sPackagesLookupRsp.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = PackagesLookupRspValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = PackagesLookupRspValidationError{}
|
|
|
|
// Validate checks the field values on ErrorRsp with the rules defined in the
|
|
// proto definition for this message. If any rules are violated, the first
|
|
// error encountered is returned, or nil if there are no violations.
|
|
func (m *ErrorRsp) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on ErrorRsp with the rules defined in
|
|
// the proto definition for this message. If any rules are violated, the
|
|
// result is a list of violation errors wrapped in ErrorRspMultiError, or nil
|
|
// if none found.
|
|
func (m *ErrorRsp) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *ErrorRsp) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
// no validation rules for Code
|
|
|
|
// no validation rules for Title
|
|
|
|
// no validation rules for Uuid
|
|
|
|
// no validation rules for Details
|
|
|
|
if len(errors) > 0 {
|
|
return ErrorRspMultiError(errors)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// ErrorRspMultiError is an error wrapping multiple validation errors returned
|
|
// by ErrorRsp.ValidateAll() if the designated constraints aren't met.
|
|
type ErrorRspMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m ErrorRspMultiError) Error() string {
|
|
var msgs []string
|
|
for _, err := range m {
|
|
msgs = append(msgs, err.Error())
|
|
}
|
|
return strings.Join(msgs, "; ")
|
|
}
|
|
|
|
// AllErrors returns a list of validation violation errors.
|
|
func (m ErrorRspMultiError) AllErrors() []error { return m }
|
|
|
|
// ErrorRspValidationError is the validation error returned by
|
|
// ErrorRsp.Validate if the designated constraints aren't met.
|
|
type ErrorRspValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e ErrorRspValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e ErrorRspValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e ErrorRspValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e ErrorRspValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e ErrorRspValidationError) ErrorName() string { return "ErrorRspValidationError" }
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e ErrorRspValidationError) Error() string {
|
|
cause := ""
|
|
if e.cause != nil {
|
|
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
|
}
|
|
|
|
key := ""
|
|
if e.key {
|
|
key = "key for "
|
|
}
|
|
|
|
return fmt.Sprintf(
|
|
"invalid %sErrorRsp.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = ErrorRspValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = ErrorRspValidationError{}
|
|
|
|
// Validate checks the field values on Package with the rules defined in the
|
|
// proto definition for this message. If any rules are violated, the first
|
|
// error encountered is returned, or nil if there are no violations.
|
|
func (m *Package) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on Package with the rules defined in the
|
|
// proto definition for this message. If any rules are violated, the result is
|
|
// a list of violation errors wrapped in PackageMultiError, or nil if none found.
|
|
func (m *Package) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *Package) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
if m.GetId() <= 0 {
|
|
err := PackageValidationError{
|
|
field: "Id",
|
|
reason: "value must be greater than 0",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if utf8.RuneCountInString(m.GetName()) < 1 {
|
|
err := PackageValidationError{
|
|
field: "Name",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if utf8.RuneCountInString(m.GetUrl()) < 1 {
|
|
err := PackageValidationError{
|
|
field: "Url",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
// no validation rules for Modules
|
|
|
|
// no validation rules for Issues
|
|
|
|
// no validation rules for Comments
|
|
|
|
if all {
|
|
switch v := interface{}(m.GetCreated()).(type) {
|
|
case interface{ ValidateAll() error }:
|
|
if err := v.ValidateAll(); err != nil {
|
|
errors = append(errors, PackageValidationError{
|
|
field: "Created",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
})
|
|
}
|
|
case interface{ Validate() error }:
|
|
if err := v.Validate(); err != nil {
|
|
errors = append(errors, PackageValidationError{
|
|
field: "Created",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
})
|
|
}
|
|
}
|
|
} else if v, ok := interface{}(m.GetCreated()).(interface{ Validate() error }); ok {
|
|
if err := v.Validate(); err != nil {
|
|
return PackageValidationError{
|
|
field: "Created",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
}
|
|
}
|
|
}
|
|
|
|
if all {
|
|
switch v := interface{}(m.GetUpdated()).(type) {
|
|
case interface{ ValidateAll() error }:
|
|
if err := v.ValidateAll(); err != nil {
|
|
errors = append(errors, PackageValidationError{
|
|
field: "Updated",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
})
|
|
}
|
|
case interface{ Validate() error }:
|
|
if err := v.Validate(); err != nil {
|
|
errors = append(errors, PackageValidationError{
|
|
field: "Updated",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
})
|
|
}
|
|
}
|
|
} else if v, ok := interface{}(m.GetUpdated()).(interface{ Validate() error }); ok {
|
|
if err := v.Validate(); err != nil {
|
|
return PackageValidationError{
|
|
field: "Updated",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
}
|
|
}
|
|
}
|
|
|
|
if all {
|
|
switch v := interface{}(m.GetLastCheck()).(type) {
|
|
case interface{ ValidateAll() error }:
|
|
if err := v.ValidateAll(); err != nil {
|
|
errors = append(errors, PackageValidationError{
|
|
field: "LastCheck",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
})
|
|
}
|
|
case interface{ Validate() error }:
|
|
if err := v.Validate(); err != nil {
|
|
errors = append(errors, PackageValidationError{
|
|
field: "LastCheck",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
})
|
|
}
|
|
}
|
|
} else if v, ok := interface{}(m.GetLastCheck()).(interface{ Validate() error }); ok {
|
|
if err := v.Validate(); err != nil {
|
|
return PackageValidationError{
|
|
field: "LastCheck",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
}
|
|
}
|
|
}
|
|
|
|
if len(errors) > 0 {
|
|
return PackageMultiError(errors)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// PackageMultiError is an error wrapping multiple validation errors returned
|
|
// by Package.ValidateAll() if the designated constraints aren't met.
|
|
type PackageMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m PackageMultiError) Error() string {
|
|
var msgs []string
|
|
for _, err := range m {
|
|
msgs = append(msgs, err.Error())
|
|
}
|
|
return strings.Join(msgs, "; ")
|
|
}
|
|
|
|
// AllErrors returns a list of validation violation errors.
|
|
func (m PackageMultiError) AllErrors() []error { return m }
|
|
|
|
// PackageValidationError is the validation error returned by Package.Validate
|
|
// if the designated constraints aren't met.
|
|
type PackageValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e PackageValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e PackageValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e PackageValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e PackageValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e PackageValidationError) ErrorName() string { return "PackageValidationError" }
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e PackageValidationError) Error() string {
|
|
cause := ""
|
|
if e.cause != nil {
|
|
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
|
}
|
|
|
|
key := ""
|
|
if e.key {
|
|
key = "key for "
|
|
}
|
|
|
|
return fmt.Sprintf(
|
|
"invalid %sPackage.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = PackageValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = PackageValidationError{}
|
|
|
|
// Validate checks the field values on Module with the rules defined in the
|
|
// proto definition for this message. If any rules are violated, the first
|
|
// error encountered is returned, or nil if there are no violations.
|
|
func (m *Module) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on Module with the rules defined in the
|
|
// proto definition for this message. If any rules are violated, the result is
|
|
// a list of violation errors wrapped in ModuleMultiError, or nil if none found.
|
|
func (m *Module) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *Module) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
if m.GetId() <= 0 {
|
|
err := ModuleValidationError{
|
|
field: "Id",
|
|
reason: "value must be greater than 0",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if utf8.RuneCountInString(m.GetName()) < 1 {
|
|
err := ModuleValidationError{
|
|
field: "Name",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if utf8.RuneCountInString(m.GetVersion()) < 1 {
|
|
err := ModuleValidationError{
|
|
field: "Version",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if m.GetPackage() <= 0 {
|
|
err := ModuleValidationError{
|
|
field: "Package",
|
|
reason: "value must be greater than 0",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if utf8.RuneCountInString(m.GetLastVersion()) < 1 {
|
|
err := ModuleValidationError{
|
|
field: "LastVersion",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if all {
|
|
switch v := interface{}(m.GetCreated()).(type) {
|
|
case interface{ ValidateAll() error }:
|
|
if err := v.ValidateAll(); err != nil {
|
|
errors = append(errors, ModuleValidationError{
|
|
field: "Created",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
})
|
|
}
|
|
case interface{ Validate() error }:
|
|
if err := v.Validate(); err != nil {
|
|
errors = append(errors, ModuleValidationError{
|
|
field: "Created",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
})
|
|
}
|
|
}
|
|
} else if v, ok := interface{}(m.GetCreated()).(interface{ Validate() error }); ok {
|
|
if err := v.Validate(); err != nil {
|
|
return ModuleValidationError{
|
|
field: "Created",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
}
|
|
}
|
|
}
|
|
|
|
if all {
|
|
switch v := interface{}(m.GetUpdated()).(type) {
|
|
case interface{ ValidateAll() error }:
|
|
if err := v.ValidateAll(); err != nil {
|
|
errors = append(errors, ModuleValidationError{
|
|
field: "Updated",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
})
|
|
}
|
|
case interface{ Validate() error }:
|
|
if err := v.Validate(); err != nil {
|
|
errors = append(errors, ModuleValidationError{
|
|
field: "Updated",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
})
|
|
}
|
|
}
|
|
} else if v, ok := interface{}(m.GetUpdated()).(interface{ Validate() error }); ok {
|
|
if err := v.Validate(); err != nil {
|
|
return ModuleValidationError{
|
|
field: "Updated",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
}
|
|
}
|
|
}
|
|
|
|
if len(errors) > 0 {
|
|
return ModuleMultiError(errors)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// ModuleMultiError is an error wrapping multiple validation errors returned by
|
|
// Module.ValidateAll() if the designated constraints aren't met.
|
|
type ModuleMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m ModuleMultiError) Error() string {
|
|
var msgs []string
|
|
for _, err := range m {
|
|
msgs = append(msgs, err.Error())
|
|
}
|
|
return strings.Join(msgs, "; ")
|
|
}
|
|
|
|
// AllErrors returns a list of validation violation errors.
|
|
func (m ModuleMultiError) AllErrors() []error { return m }
|
|
|
|
// ModuleValidationError is the validation error returned by Module.Validate if
|
|
// the designated constraints aren't met.
|
|
type ModuleValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e ModuleValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e ModuleValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e ModuleValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e ModuleValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e ModuleValidationError) ErrorName() string { return "ModuleValidationError" }
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e ModuleValidationError) Error() string {
|
|
cause := ""
|
|
if e.cause != nil {
|
|
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
|
}
|
|
|
|
key := ""
|
|
if e.key {
|
|
key = "key for "
|
|
}
|
|
|
|
return fmt.Sprintf(
|
|
"invalid %sModule.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = ModuleValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = ModuleValidationError{}
|
|
|
|
// Validate checks the field values on Issue with the rules defined in the
|
|
// proto definition for this message. If any rules are violated, the first
|
|
// error encountered is returned, or nil if there are no violations.
|
|
func (m *Issue) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on Issue with the rules defined in the
|
|
// proto definition for this message. If any rules are violated, the result is
|
|
// a list of violation errors wrapped in IssueMultiError, or nil if none found.
|
|
func (m *Issue) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *Issue) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
if m.GetId() <= 0 {
|
|
err := IssueValidationError{
|
|
field: "Id",
|
|
reason: "value must be greater than 0",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if m.GetStatus() <= 0 {
|
|
err := IssueValidationError{
|
|
field: "Status",
|
|
reason: "value must be greater than 0",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if utf8.RuneCountInString(m.GetDesc()) < 1 {
|
|
err := IssueValidationError{
|
|
field: "Desc",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if m.GetPackage() <= 0 {
|
|
err := IssueValidationError{
|
|
field: "Package",
|
|
reason: "value must be greater than 0",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if all {
|
|
switch v := interface{}(m.GetCreated()).(type) {
|
|
case interface{ ValidateAll() error }:
|
|
if err := v.ValidateAll(); err != nil {
|
|
errors = append(errors, IssueValidationError{
|
|
field: "Created",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
})
|
|
}
|
|
case interface{ Validate() error }:
|
|
if err := v.Validate(); err != nil {
|
|
errors = append(errors, IssueValidationError{
|
|
field: "Created",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
})
|
|
}
|
|
}
|
|
} else if v, ok := interface{}(m.GetCreated()).(interface{ Validate() error }); ok {
|
|
if err := v.Validate(); err != nil {
|
|
return IssueValidationError{
|
|
field: "Created",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
}
|
|
}
|
|
}
|
|
|
|
if all {
|
|
switch v := interface{}(m.GetUpdated()).(type) {
|
|
case interface{ ValidateAll() error }:
|
|
if err := v.ValidateAll(); err != nil {
|
|
errors = append(errors, IssueValidationError{
|
|
field: "Updated",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
})
|
|
}
|
|
case interface{ Validate() error }:
|
|
if err := v.Validate(); err != nil {
|
|
errors = append(errors, IssueValidationError{
|
|
field: "Updated",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
})
|
|
}
|
|
}
|
|
} else if v, ok := interface{}(m.GetUpdated()).(interface{ Validate() error }); ok {
|
|
if err := v.Validate(); err != nil {
|
|
return IssueValidationError{
|
|
field: "Updated",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
}
|
|
}
|
|
}
|
|
|
|
if len(errors) > 0 {
|
|
return IssueMultiError(errors)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// IssueMultiError is an error wrapping multiple validation errors returned by
|
|
// Issue.ValidateAll() if the designated constraints aren't met.
|
|
type IssueMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m IssueMultiError) Error() string {
|
|
var msgs []string
|
|
for _, err := range m {
|
|
msgs = append(msgs, err.Error())
|
|
}
|
|
return strings.Join(msgs, "; ")
|
|
}
|
|
|
|
// AllErrors returns a list of validation violation errors.
|
|
func (m IssueMultiError) AllErrors() []error { return m }
|
|
|
|
// IssueValidationError is the validation error returned by Issue.Validate if
|
|
// the designated constraints aren't met.
|
|
type IssueValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e IssueValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e IssueValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e IssueValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e IssueValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e IssueValidationError) ErrorName() string { return "IssueValidationError" }
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e IssueValidationError) Error() string {
|
|
cause := ""
|
|
if e.cause != nil {
|
|
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
|
}
|
|
|
|
key := ""
|
|
if e.key {
|
|
key = "key for "
|
|
}
|
|
|
|
return fmt.Sprintf(
|
|
"invalid %sIssue.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = IssueValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = IssueValidationError{}
|
|
|
|
// Validate checks the field values on Comment with the rules defined in the
|
|
// proto definition for this message. If any rules are violated, the first
|
|
// error encountered is returned, or nil if there are no violations.
|
|
func (m *Comment) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on Comment with the rules defined in the
|
|
// proto definition for this message. If any rules are violated, the result is
|
|
// a list of violation errors wrapped in CommentMultiError, or nil if none found.
|
|
func (m *Comment) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *Comment) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
if m.GetId() <= 0 {
|
|
err := CommentValidationError{
|
|
field: "Id",
|
|
reason: "value must be greater than 0",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if m.GetPackage() <= 0 {
|
|
err := CommentValidationError{
|
|
field: "Package",
|
|
reason: "value must be greater than 0",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
// no validation rules for Comment
|
|
|
|
if all {
|
|
switch v := interface{}(m.GetCreated()).(type) {
|
|
case interface{ ValidateAll() error }:
|
|
if err := v.ValidateAll(); err != nil {
|
|
errors = append(errors, CommentValidationError{
|
|
field: "Created",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
})
|
|
}
|
|
case interface{ Validate() error }:
|
|
if err := v.Validate(); err != nil {
|
|
errors = append(errors, CommentValidationError{
|
|
field: "Created",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
})
|
|
}
|
|
}
|
|
} else if v, ok := interface{}(m.GetCreated()).(interface{ Validate() error }); ok {
|
|
if err := v.Validate(); err != nil {
|
|
return CommentValidationError{
|
|
field: "Created",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
}
|
|
}
|
|
}
|
|
|
|
if all {
|
|
switch v := interface{}(m.GetUpdated()).(type) {
|
|
case interface{ ValidateAll() error }:
|
|
if err := v.ValidateAll(); err != nil {
|
|
errors = append(errors, CommentValidationError{
|
|
field: "Updated",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
})
|
|
}
|
|
case interface{ Validate() error }:
|
|
if err := v.Validate(); err != nil {
|
|
errors = append(errors, CommentValidationError{
|
|
field: "Updated",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
})
|
|
}
|
|
}
|
|
} else if v, ok := interface{}(m.GetUpdated()).(interface{ Validate() error }); ok {
|
|
if err := v.Validate(); err != nil {
|
|
return CommentValidationError{
|
|
field: "Updated",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
}
|
|
}
|
|
}
|
|
|
|
if len(errors) > 0 {
|
|
return CommentMultiError(errors)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// CommentMultiError is an error wrapping multiple validation errors returned
|
|
// by Comment.ValidateAll() if the designated constraints aren't met.
|
|
type CommentMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m CommentMultiError) Error() string {
|
|
var msgs []string
|
|
for _, err := range m {
|
|
msgs = append(msgs, err.Error())
|
|
}
|
|
return strings.Join(msgs, "; ")
|
|
}
|
|
|
|
// AllErrors returns a list of validation violation errors.
|
|
func (m CommentMultiError) AllErrors() []error { return m }
|
|
|
|
// CommentValidationError is the validation error returned by Comment.Validate
|
|
// if the designated constraints aren't met.
|
|
type CommentValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e CommentValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e CommentValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e CommentValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e CommentValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e CommentValidationError) ErrorName() string { return "CommentValidationError" }
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e CommentValidationError) Error() string {
|
|
cause := ""
|
|
if e.cause != nil {
|
|
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
|
}
|
|
|
|
key := ""
|
|
if e.key {
|
|
key = "key for "
|
|
}
|
|
|
|
return fmt.Sprintf(
|
|
"invalid %sComment.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = CommentValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = CommentValidationError{}
|
|
|
|
// Validate checks the field values on CommentsDeleteReq with the rules defined
|
|
// in the proto definition for this message. If any rules are violated, the
|
|
// first error encountered is returned, or nil if there are no violations.
|
|
func (m *CommentsDeleteReq) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on CommentsDeleteReq with the rules
|
|
// defined in the proto definition for this message. If any rules are
|
|
// violated, the result is a list of violation errors wrapped in
|
|
// CommentsDeleteReqMultiError, or nil if none found.
|
|
func (m *CommentsDeleteReq) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *CommentsDeleteReq) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
// no validation rules for Id
|
|
|
|
// no validation rules for PackageId
|
|
|
|
if len(errors) > 0 {
|
|
return CommentsDeleteReqMultiError(errors)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// CommentsDeleteReqMultiError is an error wrapping multiple validation errors
|
|
// returned by CommentsDeleteReq.ValidateAll() if the designated constraints
|
|
// aren't met.
|
|
type CommentsDeleteReqMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m CommentsDeleteReqMultiError) Error() string {
|
|
var msgs []string
|
|
for _, err := range m {
|
|
msgs = append(msgs, err.Error())
|
|
}
|
|
return strings.Join(msgs, "; ")
|
|
}
|
|
|
|
// AllErrors returns a list of validation violation errors.
|
|
func (m CommentsDeleteReqMultiError) AllErrors() []error { return m }
|
|
|
|
// CommentsDeleteReqValidationError is the validation error returned by
|
|
// CommentsDeleteReq.Validate if the designated constraints aren't met.
|
|
type CommentsDeleteReqValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e CommentsDeleteReqValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e CommentsDeleteReqValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e CommentsDeleteReqValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e CommentsDeleteReqValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e CommentsDeleteReqValidationError) ErrorName() string {
|
|
return "CommentsDeleteReqValidationError"
|
|
}
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e CommentsDeleteReqValidationError) Error() string {
|
|
cause := ""
|
|
if e.cause != nil {
|
|
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
|
}
|
|
|
|
key := ""
|
|
if e.key {
|
|
key = "key for "
|
|
}
|
|
|
|
return fmt.Sprintf(
|
|
"invalid %sCommentsDeleteReq.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = CommentsDeleteReqValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = CommentsDeleteReqValidationError{}
|
|
|
|
// Validate checks the field values on CommentsDeleteRsp with the rules defined
|
|
// in the proto definition for this message. If any rules are violated, the
|
|
// first error encountered is returned, or nil if there are no violations.
|
|
func (m *CommentsDeleteRsp) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on CommentsDeleteRsp with the rules
|
|
// defined in the proto definition for this message. If any rules are
|
|
// violated, the result is a list of violation errors wrapped in
|
|
// CommentsDeleteRspMultiError, or nil if none found.
|
|
func (m *CommentsDeleteRsp) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *CommentsDeleteRsp) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
if len(errors) > 0 {
|
|
return CommentsDeleteRspMultiError(errors)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// CommentsDeleteRspMultiError is an error wrapping multiple validation errors
|
|
// returned by CommentsDeleteRsp.ValidateAll() if the designated constraints
|
|
// aren't met.
|
|
type CommentsDeleteRspMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m CommentsDeleteRspMultiError) Error() string {
|
|
var msgs []string
|
|
for _, err := range m {
|
|
msgs = append(msgs, err.Error())
|
|
}
|
|
return strings.Join(msgs, "; ")
|
|
}
|
|
|
|
// AllErrors returns a list of validation violation errors.
|
|
func (m CommentsDeleteRspMultiError) AllErrors() []error { return m }
|
|
|
|
// CommentsDeleteRspValidationError is the validation error returned by
|
|
// CommentsDeleteRsp.Validate if the designated constraints aren't met.
|
|
type CommentsDeleteRspValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e CommentsDeleteRspValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e CommentsDeleteRspValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e CommentsDeleteRspValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e CommentsDeleteRspValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e CommentsDeleteRspValidationError) ErrorName() string {
|
|
return "CommentsDeleteRspValidationError"
|
|
}
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e CommentsDeleteRspValidationError) Error() string {
|
|
cause := ""
|
|
if e.cause != nil {
|
|
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
|
}
|
|
|
|
key := ""
|
|
if e.key {
|
|
key = "key for "
|
|
}
|
|
|
|
return fmt.Sprintf(
|
|
"invalid %sCommentsDeleteRsp.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = CommentsDeleteRspValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = CommentsDeleteRspValidationError{}
|
|
|
|
// Validate checks the field values on PackagesDeleteReq with the rules defined
|
|
// in the proto definition for this message. If any rules are violated, the
|
|
// first error encountered is returned, or nil if there are no violations.
|
|
func (m *PackagesDeleteReq) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on PackagesDeleteReq with the rules
|
|
// defined in the proto definition for this message. If any rules are
|
|
// violated, the result is a list of violation errors wrapped in
|
|
// PackagesDeleteReqMultiError, or nil if none found.
|
|
func (m *PackagesDeleteReq) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *PackagesDeleteReq) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
// no validation rules for Id
|
|
|
|
if len(errors) > 0 {
|
|
return PackagesDeleteReqMultiError(errors)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// PackagesDeleteReqMultiError is an error wrapping multiple validation errors
|
|
// returned by PackagesDeleteReq.ValidateAll() if the designated constraints
|
|
// aren't met.
|
|
type PackagesDeleteReqMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m PackagesDeleteReqMultiError) Error() string {
|
|
var msgs []string
|
|
for _, err := range m {
|
|
msgs = append(msgs, err.Error())
|
|
}
|
|
return strings.Join(msgs, "; ")
|
|
}
|
|
|
|
// AllErrors returns a list of validation violation errors.
|
|
func (m PackagesDeleteReqMultiError) AllErrors() []error { return m }
|
|
|
|
// PackagesDeleteReqValidationError is the validation error returned by
|
|
// PackagesDeleteReq.Validate if the designated constraints aren't met.
|
|
type PackagesDeleteReqValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e PackagesDeleteReqValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e PackagesDeleteReqValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e PackagesDeleteReqValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e PackagesDeleteReqValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e PackagesDeleteReqValidationError) ErrorName() string {
|
|
return "PackagesDeleteReqValidationError"
|
|
}
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e PackagesDeleteReqValidationError) Error() string {
|
|
cause := ""
|
|
if e.cause != nil {
|
|
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
|
}
|
|
|
|
key := ""
|
|
if e.key {
|
|
key = "key for "
|
|
}
|
|
|
|
return fmt.Sprintf(
|
|
"invalid %sPackagesDeleteReq.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = PackagesDeleteReqValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = PackagesDeleteReqValidationError{}
|
|
|
|
// Validate checks the field values on PackagesDeleteRsp with the rules defined
|
|
// in the proto definition for this message. If any rules are violated, the
|
|
// first error encountered is returned, or nil if there are no violations.
|
|
func (m *PackagesDeleteRsp) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on PackagesDeleteRsp with the rules
|
|
// defined in the proto definition for this message. If any rules are
|
|
// violated, the result is a list of violation errors wrapped in
|
|
// PackagesDeleteRspMultiError, or nil if none found.
|
|
func (m *PackagesDeleteRsp) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *PackagesDeleteRsp) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
if len(errors) > 0 {
|
|
return PackagesDeleteRspMultiError(errors)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// PackagesDeleteRspMultiError is an error wrapping multiple validation errors
|
|
// returned by PackagesDeleteRsp.ValidateAll() if the designated constraints
|
|
// aren't met.
|
|
type PackagesDeleteRspMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m PackagesDeleteRspMultiError) Error() string {
|
|
var msgs []string
|
|
for _, err := range m {
|
|
msgs = append(msgs, err.Error())
|
|
}
|
|
return strings.Join(msgs, "; ")
|
|
}
|
|
|
|
// AllErrors returns a list of validation violation errors.
|
|
func (m PackagesDeleteRspMultiError) AllErrors() []error { return m }
|
|
|
|
// PackagesDeleteRspValidationError is the validation error returned by
|
|
// PackagesDeleteRsp.Validate if the designated constraints aren't met.
|
|
type PackagesDeleteRspValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e PackagesDeleteRspValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e PackagesDeleteRspValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e PackagesDeleteRspValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e PackagesDeleteRspValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e PackagesDeleteRspValidationError) ErrorName() string {
|
|
return "PackagesDeleteRspValidationError"
|
|
}
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e PackagesDeleteRspValidationError) Error() string {
|
|
cause := ""
|
|
if e.cause != nil {
|
|
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
|
}
|
|
|
|
key := ""
|
|
if e.key {
|
|
key = "key for "
|
|
}
|
|
|
|
return fmt.Sprintf(
|
|
"invalid %sPackagesDeleteRsp.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = PackagesDeleteRspValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = PackagesDeleteRspValidationError{}
|
|
|
|
// Validate checks the field values on PackagesListReq with the rules defined
|
|
// in the proto definition for this message. If any rules are violated, the
|
|
// first error encountered is returned, or nil if there are no violations.
|
|
func (m *PackagesListReq) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on PackagesListReq with the rules
|
|
// defined in the proto definition for this message. If any rules are
|
|
// violated, the result is a list of violation errors wrapped in
|
|
// PackagesListReqMultiError, or nil if none found.
|
|
func (m *PackagesListReq) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *PackagesListReq) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
if len(errors) > 0 {
|
|
return PackagesListReqMultiError(errors)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// PackagesListReqMultiError is an error wrapping multiple validation errors
|
|
// returned by PackagesListReq.ValidateAll() if the designated constraints
|
|
// aren't met.
|
|
type PackagesListReqMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m PackagesListReqMultiError) Error() string {
|
|
var msgs []string
|
|
for _, err := range m {
|
|
msgs = append(msgs, err.Error())
|
|
}
|
|
return strings.Join(msgs, "; ")
|
|
}
|
|
|
|
// AllErrors returns a list of validation violation errors.
|
|
func (m PackagesListReqMultiError) AllErrors() []error { return m }
|
|
|
|
// PackagesListReqValidationError is the validation error returned by
|
|
// PackagesListReq.Validate if the designated constraints aren't met.
|
|
type PackagesListReqValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e PackagesListReqValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e PackagesListReqValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e PackagesListReqValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e PackagesListReqValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e PackagesListReqValidationError) ErrorName() string { return "PackagesListReqValidationError" }
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e PackagesListReqValidationError) Error() string {
|
|
cause := ""
|
|
if e.cause != nil {
|
|
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
|
}
|
|
|
|
key := ""
|
|
if e.key {
|
|
key = "key for "
|
|
}
|
|
|
|
return fmt.Sprintf(
|
|
"invalid %sPackagesListReq.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = PackagesListReqValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = PackagesListReqValidationError{}
|
|
|
|
// Validate checks the field values on PackagesListRsp with the rules defined
|
|
// in the proto definition for this message. If any rules are violated, the
|
|
// first error encountered is returned, or nil if there are no violations.
|
|
func (m *PackagesListRsp) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on PackagesListRsp with the rules
|
|
// defined in the proto definition for this message. If any rules are
|
|
// violated, the result is a list of violation errors wrapped in
|
|
// PackagesListRspMultiError, or nil if none found.
|
|
func (m *PackagesListRsp) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *PackagesListRsp) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
for idx, item := range m.GetPackages() {
|
|
_, _ = idx, item
|
|
|
|
if all {
|
|
switch v := interface{}(item).(type) {
|
|
case interface{ ValidateAll() error }:
|
|
if err := v.ValidateAll(); err != nil {
|
|
errors = append(errors, PackagesListRspValidationError{
|
|
field: fmt.Sprintf("Packages[%v]", idx),
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
})
|
|
}
|
|
case interface{ Validate() error }:
|
|
if err := v.Validate(); err != nil {
|
|
errors = append(errors, PackagesListRspValidationError{
|
|
field: fmt.Sprintf("Packages[%v]", idx),
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
})
|
|
}
|
|
}
|
|
} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
|
|
if err := v.Validate(); err != nil {
|
|
return PackagesListRspValidationError{
|
|
field: fmt.Sprintf("Packages[%v]", idx),
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if len(errors) > 0 {
|
|
return PackagesListRspMultiError(errors)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// PackagesListRspMultiError is an error wrapping multiple validation errors
|
|
// returned by PackagesListRsp.ValidateAll() if the designated constraints
|
|
// aren't met.
|
|
type PackagesListRspMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m PackagesListRspMultiError) Error() string {
|
|
var msgs []string
|
|
for _, err := range m {
|
|
msgs = append(msgs, err.Error())
|
|
}
|
|
return strings.Join(msgs, "; ")
|
|
}
|
|
|
|
// AllErrors returns a list of validation violation errors.
|
|
func (m PackagesListRspMultiError) AllErrors() []error { return m }
|
|
|
|
// PackagesListRspValidationError is the validation error returned by
|
|
// PackagesListRsp.Validate if the designated constraints aren't met.
|
|
type PackagesListRspValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e PackagesListRspValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e PackagesListRspValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e PackagesListRspValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e PackagesListRspValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e PackagesListRspValidationError) ErrorName() string { return "PackagesListRspValidationError" }
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e PackagesListRspValidationError) Error() string {
|
|
cause := ""
|
|
if e.cause != nil {
|
|
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
|
}
|
|
|
|
key := ""
|
|
if e.key {
|
|
key = "key for "
|
|
}
|
|
|
|
return fmt.Sprintf(
|
|
"invalid %sPackagesListRsp.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = PackagesListRspValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = PackagesListRspValidationError{}
|
|
|
|
// Validate checks the field values on PackagesUpdateReq with the rules defined
|
|
// in the proto definition for this message. If any rules are violated, the
|
|
// first error encountered is returned, or nil if there are no violations.
|
|
func (m *PackagesUpdateReq) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on PackagesUpdateReq with the rules
|
|
// defined in the proto definition for this message. If any rules are
|
|
// violated, the result is a list of violation errors wrapped in
|
|
// PackagesUpdateReqMultiError, or nil if none found.
|
|
func (m *PackagesUpdateReq) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *PackagesUpdateReq) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
if m.GetId() <= 0 {
|
|
err := PackagesUpdateReqValidationError{
|
|
field: "Id",
|
|
reason: "value must be greater than 0",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if utf8.RuneCountInString(m.GetName()) < 1 {
|
|
err := PackagesUpdateReqValidationError{
|
|
field: "Name",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if utf8.RuneCountInString(m.GetUrl()) < 1 {
|
|
err := PackagesUpdateReqValidationError{
|
|
field: "Url",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if len(errors) > 0 {
|
|
return PackagesUpdateReqMultiError(errors)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// PackagesUpdateReqMultiError is an error wrapping multiple validation errors
|
|
// returned by PackagesUpdateReq.ValidateAll() if the designated constraints
|
|
// aren't met.
|
|
type PackagesUpdateReqMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m PackagesUpdateReqMultiError) Error() string {
|
|
var msgs []string
|
|
for _, err := range m {
|
|
msgs = append(msgs, err.Error())
|
|
}
|
|
return strings.Join(msgs, "; ")
|
|
}
|
|
|
|
// AllErrors returns a list of validation violation errors.
|
|
func (m PackagesUpdateReqMultiError) AllErrors() []error { return m }
|
|
|
|
// PackagesUpdateReqValidationError is the validation error returned by
|
|
// PackagesUpdateReq.Validate if the designated constraints aren't met.
|
|
type PackagesUpdateReqValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e PackagesUpdateReqValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e PackagesUpdateReqValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e PackagesUpdateReqValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e PackagesUpdateReqValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e PackagesUpdateReqValidationError) ErrorName() string {
|
|
return "PackagesUpdateReqValidationError"
|
|
}
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e PackagesUpdateReqValidationError) Error() string {
|
|
cause := ""
|
|
if e.cause != nil {
|
|
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
|
}
|
|
|
|
key := ""
|
|
if e.key {
|
|
key = "key for "
|
|
}
|
|
|
|
return fmt.Sprintf(
|
|
"invalid %sPackagesUpdateReq.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = PackagesUpdateReqValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = PackagesUpdateReqValidationError{}
|
|
|
|
// Validate checks the field values on PackagesUpdateRsp with the rules defined
|
|
// in the proto definition for this message. If any rules are violated, the
|
|
// first error encountered is returned, or nil if there are no violations.
|
|
func (m *PackagesUpdateRsp) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on PackagesUpdateRsp with the rules
|
|
// defined in the proto definition for this message. If any rules are
|
|
// violated, the result is a list of violation errors wrapped in
|
|
// PackagesUpdateRspMultiError, or nil if none found.
|
|
func (m *PackagesUpdateRsp) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *PackagesUpdateRsp) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
if all {
|
|
switch v := interface{}(m.GetPackage()).(type) {
|
|
case interface{ ValidateAll() error }:
|
|
if err := v.ValidateAll(); err != nil {
|
|
errors = append(errors, PackagesUpdateRspValidationError{
|
|
field: "Package",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
})
|
|
}
|
|
case interface{ Validate() error }:
|
|
if err := v.Validate(); err != nil {
|
|
errors = append(errors, PackagesUpdateRspValidationError{
|
|
field: "Package",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
})
|
|
}
|
|
}
|
|
} else if v, ok := interface{}(m.GetPackage()).(interface{ Validate() error }); ok {
|
|
if err := v.Validate(); err != nil {
|
|
return PackagesUpdateRspValidationError{
|
|
field: "Package",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
}
|
|
}
|
|
}
|
|
|
|
if len(errors) > 0 {
|
|
return PackagesUpdateRspMultiError(errors)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// PackagesUpdateRspMultiError is an error wrapping multiple validation errors
|
|
// returned by PackagesUpdateRsp.ValidateAll() if the designated constraints
|
|
// aren't met.
|
|
type PackagesUpdateRspMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m PackagesUpdateRspMultiError) Error() string {
|
|
var msgs []string
|
|
for _, err := range m {
|
|
msgs = append(msgs, err.Error())
|
|
}
|
|
return strings.Join(msgs, "; ")
|
|
}
|
|
|
|
// AllErrors returns a list of validation violation errors.
|
|
func (m PackagesUpdateRspMultiError) AllErrors() []error { return m }
|
|
|
|
// PackagesUpdateRspValidationError is the validation error returned by
|
|
// PackagesUpdateRsp.Validate if the designated constraints aren't met.
|
|
type PackagesUpdateRspValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e PackagesUpdateRspValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e PackagesUpdateRspValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e PackagesUpdateRspValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e PackagesUpdateRspValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e PackagesUpdateRspValidationError) ErrorName() string {
|
|
return "PackagesUpdateRspValidationError"
|
|
}
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e PackagesUpdateRspValidationError) Error() string {
|
|
cause := ""
|
|
if e.cause != nil {
|
|
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
|
}
|
|
|
|
key := ""
|
|
if e.key {
|
|
key = "key for "
|
|
}
|
|
|
|
return fmt.Sprintf(
|
|
"invalid %sPackagesUpdateRsp.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = PackagesUpdateRspValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = PackagesUpdateRspValidationError{}
|
|
|
|
// Validate checks the field values on CommentsCreateReq with the rules defined
|
|
// in the proto definition for this message. If any rules are violated, the
|
|
// first error encountered is returned, or nil if there are no violations.
|
|
func (m *CommentsCreateReq) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on CommentsCreateReq with the rules
|
|
// defined in the proto definition for this message. If any rules are
|
|
// violated, the result is a list of violation errors wrapped in
|
|
// CommentsCreateReqMultiError, or nil if none found.
|
|
func (m *CommentsCreateReq) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *CommentsCreateReq) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
if m.GetPackageId() <= 0 {
|
|
err := CommentsCreateReqValidationError{
|
|
field: "PackageId",
|
|
reason: "value must be greater than 0",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
// no validation rules for Comment
|
|
|
|
if len(errors) > 0 {
|
|
return CommentsCreateReqMultiError(errors)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// CommentsCreateReqMultiError is an error wrapping multiple validation errors
|
|
// returned by CommentsCreateReq.ValidateAll() if the designated constraints
|
|
// aren't met.
|
|
type CommentsCreateReqMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m CommentsCreateReqMultiError) Error() string {
|
|
var msgs []string
|
|
for _, err := range m {
|
|
msgs = append(msgs, err.Error())
|
|
}
|
|
return strings.Join(msgs, "; ")
|
|
}
|
|
|
|
// AllErrors returns a list of validation violation errors.
|
|
func (m CommentsCreateReqMultiError) AllErrors() []error { return m }
|
|
|
|
// CommentsCreateReqValidationError is the validation error returned by
|
|
// CommentsCreateReq.Validate if the designated constraints aren't met.
|
|
type CommentsCreateReqValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e CommentsCreateReqValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e CommentsCreateReqValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e CommentsCreateReqValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e CommentsCreateReqValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e CommentsCreateReqValidationError) ErrorName() string {
|
|
return "CommentsCreateReqValidationError"
|
|
}
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e CommentsCreateReqValidationError) Error() string {
|
|
cause := ""
|
|
if e.cause != nil {
|
|
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
|
}
|
|
|
|
key := ""
|
|
if e.key {
|
|
key = "key for "
|
|
}
|
|
|
|
return fmt.Sprintf(
|
|
"invalid %sCommentsCreateReq.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = CommentsCreateReqValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = CommentsCreateReqValidationError{}
|
|
|
|
// Validate checks the field values on CommentsCreateRsp with the rules defined
|
|
// in the proto definition for this message. If any rules are violated, the
|
|
// first error encountered is returned, or nil if there are no violations.
|
|
func (m *CommentsCreateRsp) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on CommentsCreateRsp with the rules
|
|
// defined in the proto definition for this message. If any rules are
|
|
// violated, the result is a list of violation errors wrapped in
|
|
// CommentsCreateRspMultiError, or nil if none found.
|
|
func (m *CommentsCreateRsp) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *CommentsCreateRsp) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
if all {
|
|
switch v := interface{}(m.GetComment()).(type) {
|
|
case interface{ ValidateAll() error }:
|
|
if err := v.ValidateAll(); err != nil {
|
|
errors = append(errors, CommentsCreateRspValidationError{
|
|
field: "Comment",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
})
|
|
}
|
|
case interface{ Validate() error }:
|
|
if err := v.Validate(); err != nil {
|
|
errors = append(errors, CommentsCreateRspValidationError{
|
|
field: "Comment",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
})
|
|
}
|
|
}
|
|
} else if v, ok := interface{}(m.GetComment()).(interface{ Validate() error }); ok {
|
|
if err := v.Validate(); err != nil {
|
|
return CommentsCreateRspValidationError{
|
|
field: "Comment",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
}
|
|
}
|
|
}
|
|
|
|
if len(errors) > 0 {
|
|
return CommentsCreateRspMultiError(errors)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// CommentsCreateRspMultiError is an error wrapping multiple validation errors
|
|
// returned by CommentsCreateRsp.ValidateAll() if the designated constraints
|
|
// aren't met.
|
|
type CommentsCreateRspMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m CommentsCreateRspMultiError) Error() string {
|
|
var msgs []string
|
|
for _, err := range m {
|
|
msgs = append(msgs, err.Error())
|
|
}
|
|
return strings.Join(msgs, "; ")
|
|
}
|
|
|
|
// AllErrors returns a list of validation violation errors.
|
|
func (m CommentsCreateRspMultiError) AllErrors() []error { return m }
|
|
|
|
// CommentsCreateRspValidationError is the validation error returned by
|
|
// CommentsCreateRsp.Validate if the designated constraints aren't met.
|
|
type CommentsCreateRspValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e CommentsCreateRspValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e CommentsCreateRspValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e CommentsCreateRspValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e CommentsCreateRspValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e CommentsCreateRspValidationError) ErrorName() string {
|
|
return "CommentsCreateRspValidationError"
|
|
}
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e CommentsCreateRspValidationError) Error() string {
|
|
cause := ""
|
|
if e.cause != nil {
|
|
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
|
}
|
|
|
|
key := ""
|
|
if e.key {
|
|
key = "key for "
|
|
}
|
|
|
|
return fmt.Sprintf(
|
|
"invalid %sCommentsCreateRsp.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = CommentsCreateRspValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = CommentsCreateRspValidationError{}
|
|
|
|
// Validate checks the field values on PackagesCreateReq with the rules defined
|
|
// in the proto definition for this message. If any rules are violated, the
|
|
// first error encountered is returned, or nil if there are no violations.
|
|
func (m *PackagesCreateReq) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on PackagesCreateReq with the rules
|
|
// defined in the proto definition for this message. If any rules are
|
|
// violated, the result is a list of violation errors wrapped in
|
|
// PackagesCreateReqMultiError, or nil if none found.
|
|
func (m *PackagesCreateReq) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *PackagesCreateReq) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
if utf8.RuneCountInString(m.GetName()) < 1 {
|
|
err := PackagesCreateReqValidationError{
|
|
field: "Name",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if utf8.RuneCountInString(m.GetUrl()) < 1 {
|
|
err := PackagesCreateReqValidationError{
|
|
field: "Url",
|
|
reason: "value length must be at least 1 runes",
|
|
}
|
|
if !all {
|
|
return err
|
|
}
|
|
errors = append(errors, err)
|
|
}
|
|
|
|
if len(errors) > 0 {
|
|
return PackagesCreateReqMultiError(errors)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// PackagesCreateReqMultiError is an error wrapping multiple validation errors
|
|
// returned by PackagesCreateReq.ValidateAll() if the designated constraints
|
|
// aren't met.
|
|
type PackagesCreateReqMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m PackagesCreateReqMultiError) Error() string {
|
|
var msgs []string
|
|
for _, err := range m {
|
|
msgs = append(msgs, err.Error())
|
|
}
|
|
return strings.Join(msgs, "; ")
|
|
}
|
|
|
|
// AllErrors returns a list of validation violation errors.
|
|
func (m PackagesCreateReqMultiError) AllErrors() []error { return m }
|
|
|
|
// PackagesCreateReqValidationError is the validation error returned by
|
|
// PackagesCreateReq.Validate if the designated constraints aren't met.
|
|
type PackagesCreateReqValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e PackagesCreateReqValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e PackagesCreateReqValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e PackagesCreateReqValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e PackagesCreateReqValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e PackagesCreateReqValidationError) ErrorName() string {
|
|
return "PackagesCreateReqValidationError"
|
|
}
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e PackagesCreateReqValidationError) Error() string {
|
|
cause := ""
|
|
if e.cause != nil {
|
|
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
|
}
|
|
|
|
key := ""
|
|
if e.key {
|
|
key = "key for "
|
|
}
|
|
|
|
return fmt.Sprintf(
|
|
"invalid %sPackagesCreateReq.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = PackagesCreateReqValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = PackagesCreateReqValidationError{}
|
|
|
|
// Validate checks the field values on PackagesCreateRsp with the rules defined
|
|
// in the proto definition for this message. If any rules are violated, the
|
|
// first error encountered is returned, or nil if there are no violations.
|
|
func (m *PackagesCreateRsp) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on PackagesCreateRsp with the rules
|
|
// defined in the proto definition for this message. If any rules are
|
|
// violated, the result is a list of violation errors wrapped in
|
|
// PackagesCreateRspMultiError, or nil if none found.
|
|
func (m *PackagesCreateRsp) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *PackagesCreateRsp) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
if all {
|
|
switch v := interface{}(m.GetPackage()).(type) {
|
|
case interface{ ValidateAll() error }:
|
|
if err := v.ValidateAll(); err != nil {
|
|
errors = append(errors, PackagesCreateRspValidationError{
|
|
field: "Package",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
})
|
|
}
|
|
case interface{ Validate() error }:
|
|
if err := v.Validate(); err != nil {
|
|
errors = append(errors, PackagesCreateRspValidationError{
|
|
field: "Package",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
})
|
|
}
|
|
}
|
|
} else if v, ok := interface{}(m.GetPackage()).(interface{ Validate() error }); ok {
|
|
if err := v.Validate(); err != nil {
|
|
return PackagesCreateRspValidationError{
|
|
field: "Package",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
}
|
|
}
|
|
}
|
|
|
|
if len(errors) > 0 {
|
|
return PackagesCreateRspMultiError(errors)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// PackagesCreateRspMultiError is an error wrapping multiple validation errors
|
|
// returned by PackagesCreateRsp.ValidateAll() if the designated constraints
|
|
// aren't met.
|
|
type PackagesCreateRspMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m PackagesCreateRspMultiError) Error() string {
|
|
var msgs []string
|
|
for _, err := range m {
|
|
msgs = append(msgs, err.Error())
|
|
}
|
|
return strings.Join(msgs, "; ")
|
|
}
|
|
|
|
// AllErrors returns a list of validation violation errors.
|
|
func (m PackagesCreateRspMultiError) AllErrors() []error { return m }
|
|
|
|
// PackagesCreateRspValidationError is the validation error returned by
|
|
// PackagesCreateRsp.Validate if the designated constraints aren't met.
|
|
type PackagesCreateRspValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e PackagesCreateRspValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e PackagesCreateRspValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e PackagesCreateRspValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e PackagesCreateRspValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e PackagesCreateRspValidationError) ErrorName() string {
|
|
return "PackagesCreateRspValidationError"
|
|
}
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e PackagesCreateRspValidationError) Error() string {
|
|
cause := ""
|
|
if e.cause != nil {
|
|
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
|
}
|
|
|
|
key := ""
|
|
if e.key {
|
|
key = "key for "
|
|
}
|
|
|
|
return fmt.Sprintf(
|
|
"invalid %sPackagesCreateRsp.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = PackagesCreateRspValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = PackagesCreateRspValidationError{}
|
|
|
|
// Validate checks the field values on ModulesListReq with the rules defined in
|
|
// the proto definition for this message. If any rules are violated, the first
|
|
// error encountered is returned, or nil if there are no violations.
|
|
func (m *ModulesListReq) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on ModulesListReq with the rules defined
|
|
// in the proto definition for this message. If any rules are violated, the
|
|
// result is a list of violation errors wrapped in ModulesListReqMultiError,
|
|
// or nil if none found.
|
|
func (m *ModulesListReq) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *ModulesListReq) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
if len(errors) > 0 {
|
|
return ModulesListReqMultiError(errors)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// ModulesListReqMultiError is an error wrapping multiple validation errors
|
|
// returned by ModulesListReq.ValidateAll() if the designated constraints
|
|
// aren't met.
|
|
type ModulesListReqMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m ModulesListReqMultiError) Error() string {
|
|
var msgs []string
|
|
for _, err := range m {
|
|
msgs = append(msgs, err.Error())
|
|
}
|
|
return strings.Join(msgs, "; ")
|
|
}
|
|
|
|
// AllErrors returns a list of validation violation errors.
|
|
func (m ModulesListReqMultiError) AllErrors() []error { return m }
|
|
|
|
// ModulesListReqValidationError is the validation error returned by
|
|
// ModulesListReq.Validate if the designated constraints aren't met.
|
|
type ModulesListReqValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e ModulesListReqValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e ModulesListReqValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e ModulesListReqValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e ModulesListReqValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e ModulesListReqValidationError) ErrorName() string { return "ModulesListReqValidationError" }
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e ModulesListReqValidationError) Error() string {
|
|
cause := ""
|
|
if e.cause != nil {
|
|
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
|
}
|
|
|
|
key := ""
|
|
if e.key {
|
|
key = "key for "
|
|
}
|
|
|
|
return fmt.Sprintf(
|
|
"invalid %sModulesListReq.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = ModulesListReqValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = ModulesListReqValidationError{}
|
|
|
|
// Validate checks the field values on ModulesListRsp with the rules defined in
|
|
// the proto definition for this message. If any rules are violated, the first
|
|
// error encountered is returned, or nil if there are no violations.
|
|
func (m *ModulesListRsp) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on ModulesListRsp with the rules defined
|
|
// in the proto definition for this message. If any rules are violated, the
|
|
// result is a list of violation errors wrapped in ModulesListRspMultiError,
|
|
// or nil if none found.
|
|
func (m *ModulesListRsp) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *ModulesListRsp) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
for idx, item := range m.GetModules() {
|
|
_, _ = idx, item
|
|
|
|
if all {
|
|
switch v := interface{}(item).(type) {
|
|
case interface{ ValidateAll() error }:
|
|
if err := v.ValidateAll(); err != nil {
|
|
errors = append(errors, ModulesListRspValidationError{
|
|
field: fmt.Sprintf("Modules[%v]", idx),
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
})
|
|
}
|
|
case interface{ Validate() error }:
|
|
if err := v.Validate(); err != nil {
|
|
errors = append(errors, ModulesListRspValidationError{
|
|
field: fmt.Sprintf("Modules[%v]", idx),
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
})
|
|
}
|
|
}
|
|
} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
|
|
if err := v.Validate(); err != nil {
|
|
return ModulesListRspValidationError{
|
|
field: fmt.Sprintf("Modules[%v]", idx),
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if len(errors) > 0 {
|
|
return ModulesListRspMultiError(errors)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// ModulesListRspMultiError is an error wrapping multiple validation errors
|
|
// returned by ModulesListRsp.ValidateAll() if the designated constraints
|
|
// aren't met.
|
|
type ModulesListRspMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m ModulesListRspMultiError) Error() string {
|
|
var msgs []string
|
|
for _, err := range m {
|
|
msgs = append(msgs, err.Error())
|
|
}
|
|
return strings.Join(msgs, "; ")
|
|
}
|
|
|
|
// AllErrors returns a list of validation violation errors.
|
|
func (m ModulesListRspMultiError) AllErrors() []error { return m }
|
|
|
|
// ModulesListRspValidationError is the validation error returned by
|
|
// ModulesListRsp.Validate if the designated constraints aren't met.
|
|
type ModulesListRspValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e ModulesListRspValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e ModulesListRspValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e ModulesListRspValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e ModulesListRspValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e ModulesListRspValidationError) ErrorName() string { return "ModulesListRspValidationError" }
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e ModulesListRspValidationError) Error() string {
|
|
cause := ""
|
|
if e.cause != nil {
|
|
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
|
}
|
|
|
|
key := ""
|
|
if e.key {
|
|
key = "key for "
|
|
}
|
|
|
|
return fmt.Sprintf(
|
|
"invalid %sModulesListRsp.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = ModulesListRspValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = ModulesListRspValidationError{}
|
|
|
|
// Validate checks the field values on CommentsListReq with the rules defined
|
|
// in the proto definition for this message. If any rules are violated, the
|
|
// first error encountered is returned, or nil if there are no violations.
|
|
func (m *CommentsListReq) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on CommentsListReq with the rules
|
|
// defined in the proto definition for this message. If any rules are
|
|
// violated, the result is a list of violation errors wrapped in
|
|
// CommentsListReqMultiError, or nil if none found.
|
|
func (m *CommentsListReq) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *CommentsListReq) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
// no validation rules for PackageId
|
|
|
|
if len(errors) > 0 {
|
|
return CommentsListReqMultiError(errors)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// CommentsListReqMultiError is an error wrapping multiple validation errors
|
|
// returned by CommentsListReq.ValidateAll() if the designated constraints
|
|
// aren't met.
|
|
type CommentsListReqMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m CommentsListReqMultiError) Error() string {
|
|
var msgs []string
|
|
for _, err := range m {
|
|
msgs = append(msgs, err.Error())
|
|
}
|
|
return strings.Join(msgs, "; ")
|
|
}
|
|
|
|
// AllErrors returns a list of validation violation errors.
|
|
func (m CommentsListReqMultiError) AllErrors() []error { return m }
|
|
|
|
// CommentsListReqValidationError is the validation error returned by
|
|
// CommentsListReq.Validate if the designated constraints aren't met.
|
|
type CommentsListReqValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e CommentsListReqValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e CommentsListReqValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e CommentsListReqValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e CommentsListReqValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e CommentsListReqValidationError) ErrorName() string { return "CommentsListReqValidationError" }
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e CommentsListReqValidationError) Error() string {
|
|
cause := ""
|
|
if e.cause != nil {
|
|
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
|
}
|
|
|
|
key := ""
|
|
if e.key {
|
|
key = "key for "
|
|
}
|
|
|
|
return fmt.Sprintf(
|
|
"invalid %sCommentsListReq.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = CommentsListReqValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = CommentsListReqValidationError{}
|
|
|
|
// Validate checks the field values on CommentsListRsp with the rules defined
|
|
// in the proto definition for this message. If any rules are violated, the
|
|
// first error encountered is returned, or nil if there are no violations.
|
|
func (m *CommentsListRsp) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on CommentsListRsp with the rules
|
|
// defined in the proto definition for this message. If any rules are
|
|
// violated, the result is a list of violation errors wrapped in
|
|
// CommentsListRspMultiError, or nil if none found.
|
|
func (m *CommentsListRsp) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *CommentsListRsp) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
for idx, item := range m.GetComments() {
|
|
_, _ = idx, item
|
|
|
|
if all {
|
|
switch v := interface{}(item).(type) {
|
|
case interface{ ValidateAll() error }:
|
|
if err := v.ValidateAll(); err != nil {
|
|
errors = append(errors, CommentsListRspValidationError{
|
|
field: fmt.Sprintf("Comments[%v]", idx),
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
})
|
|
}
|
|
case interface{ Validate() error }:
|
|
if err := v.Validate(); err != nil {
|
|
errors = append(errors, CommentsListRspValidationError{
|
|
field: fmt.Sprintf("Comments[%v]", idx),
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
})
|
|
}
|
|
}
|
|
} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
|
|
if err := v.Validate(); err != nil {
|
|
return CommentsListRspValidationError{
|
|
field: fmt.Sprintf("Comments[%v]", idx),
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if len(errors) > 0 {
|
|
return CommentsListRspMultiError(errors)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// CommentsListRspMultiError is an error wrapping multiple validation errors
|
|
// returned by CommentsListRsp.ValidateAll() if the designated constraints
|
|
// aren't met.
|
|
type CommentsListRspMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m CommentsListRspMultiError) Error() string {
|
|
var msgs []string
|
|
for _, err := range m {
|
|
msgs = append(msgs, err.Error())
|
|
}
|
|
return strings.Join(msgs, "; ")
|
|
}
|
|
|
|
// AllErrors returns a list of validation violation errors.
|
|
func (m CommentsListRspMultiError) AllErrors() []error { return m }
|
|
|
|
// CommentsListRspValidationError is the validation error returned by
|
|
// CommentsListRsp.Validate if the designated constraints aren't met.
|
|
type CommentsListRspValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e CommentsListRspValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e CommentsListRspValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e CommentsListRspValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e CommentsListRspValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e CommentsListRspValidationError) ErrorName() string { return "CommentsListRspValidationError" }
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e CommentsListRspValidationError) Error() string {
|
|
cause := ""
|
|
if e.cause != nil {
|
|
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
|
}
|
|
|
|
key := ""
|
|
if e.key {
|
|
key = "key for "
|
|
}
|
|
|
|
return fmt.Sprintf(
|
|
"invalid %sCommentsListRsp.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = CommentsListRspValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = CommentsListRspValidationError{}
|
|
|
|
// Validate checks the field values on CommentsLookupReq with the rules defined
|
|
// in the proto definition for this message. If any rules are violated, the
|
|
// first error encountered is returned, or nil if there are no violations.
|
|
func (m *CommentsLookupReq) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on CommentsLookupReq with the rules
|
|
// defined in the proto definition for this message. If any rules are
|
|
// violated, the result is a list of violation errors wrapped in
|
|
// CommentsLookupReqMultiError, or nil if none found.
|
|
func (m *CommentsLookupReq) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *CommentsLookupReq) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
// no validation rules for Id
|
|
|
|
// no validation rules for PackageId
|
|
|
|
if len(errors) > 0 {
|
|
return CommentsLookupReqMultiError(errors)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// CommentsLookupReqMultiError is an error wrapping multiple validation errors
|
|
// returned by CommentsLookupReq.ValidateAll() if the designated constraints
|
|
// aren't met.
|
|
type CommentsLookupReqMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m CommentsLookupReqMultiError) Error() string {
|
|
var msgs []string
|
|
for _, err := range m {
|
|
msgs = append(msgs, err.Error())
|
|
}
|
|
return strings.Join(msgs, "; ")
|
|
}
|
|
|
|
// AllErrors returns a list of validation violation errors.
|
|
func (m CommentsLookupReqMultiError) AllErrors() []error { return m }
|
|
|
|
// CommentsLookupReqValidationError is the validation error returned by
|
|
// CommentsLookupReq.Validate if the designated constraints aren't met.
|
|
type CommentsLookupReqValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e CommentsLookupReqValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e CommentsLookupReqValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e CommentsLookupReqValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e CommentsLookupReqValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e CommentsLookupReqValidationError) ErrorName() string {
|
|
return "CommentsLookupReqValidationError"
|
|
}
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e CommentsLookupReqValidationError) Error() string {
|
|
cause := ""
|
|
if e.cause != nil {
|
|
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
|
}
|
|
|
|
key := ""
|
|
if e.key {
|
|
key = "key for "
|
|
}
|
|
|
|
return fmt.Sprintf(
|
|
"invalid %sCommentsLookupReq.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = CommentsLookupReqValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = CommentsLookupReqValidationError{}
|
|
|
|
// Validate checks the field values on CommentsLookupRsp with the rules defined
|
|
// in the proto definition for this message. If any rules are violated, the
|
|
// first error encountered is returned, or nil if there are no violations.
|
|
func (m *CommentsLookupRsp) Validate() error {
|
|
return m.validate(false)
|
|
}
|
|
|
|
// ValidateAll checks the field values on CommentsLookupRsp with the rules
|
|
// defined in the proto definition for this message. If any rules are
|
|
// violated, the result is a list of violation errors wrapped in
|
|
// CommentsLookupRspMultiError, or nil if none found.
|
|
func (m *CommentsLookupRsp) ValidateAll() error {
|
|
return m.validate(true)
|
|
}
|
|
|
|
func (m *CommentsLookupRsp) validate(all bool) error {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
|
|
var errors []error
|
|
|
|
if all {
|
|
switch v := interface{}(m.GetComment()).(type) {
|
|
case interface{ ValidateAll() error }:
|
|
if err := v.ValidateAll(); err != nil {
|
|
errors = append(errors, CommentsLookupRspValidationError{
|
|
field: "Comment",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
})
|
|
}
|
|
case interface{ Validate() error }:
|
|
if err := v.Validate(); err != nil {
|
|
errors = append(errors, CommentsLookupRspValidationError{
|
|
field: "Comment",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
})
|
|
}
|
|
}
|
|
} else if v, ok := interface{}(m.GetComment()).(interface{ Validate() error }); ok {
|
|
if err := v.Validate(); err != nil {
|
|
return CommentsLookupRspValidationError{
|
|
field: "Comment",
|
|
reason: "embedded message failed validation",
|
|
cause: err,
|
|
}
|
|
}
|
|
}
|
|
|
|
if len(errors) > 0 {
|
|
return CommentsLookupRspMultiError(errors)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// CommentsLookupRspMultiError is an error wrapping multiple validation errors
|
|
// returned by CommentsLookupRsp.ValidateAll() if the designated constraints
|
|
// aren't met.
|
|
type CommentsLookupRspMultiError []error
|
|
|
|
// Error returns a concatenation of all the error messages it wraps.
|
|
func (m CommentsLookupRspMultiError) Error() string {
|
|
var msgs []string
|
|
for _, err := range m {
|
|
msgs = append(msgs, err.Error())
|
|
}
|
|
return strings.Join(msgs, "; ")
|
|
}
|
|
|
|
// AllErrors returns a list of validation violation errors.
|
|
func (m CommentsLookupRspMultiError) AllErrors() []error { return m }
|
|
|
|
// CommentsLookupRspValidationError is the validation error returned by
|
|
// CommentsLookupRsp.Validate if the designated constraints aren't met.
|
|
type CommentsLookupRspValidationError struct {
|
|
field string
|
|
reason string
|
|
cause error
|
|
key bool
|
|
}
|
|
|
|
// Field function returns field value.
|
|
func (e CommentsLookupRspValidationError) Field() string { return e.field }
|
|
|
|
// Reason function returns reason value.
|
|
func (e CommentsLookupRspValidationError) Reason() string { return e.reason }
|
|
|
|
// Cause function returns cause value.
|
|
func (e CommentsLookupRspValidationError) Cause() error { return e.cause }
|
|
|
|
// Key function returns key value.
|
|
func (e CommentsLookupRspValidationError) Key() bool { return e.key }
|
|
|
|
// ErrorName returns error name.
|
|
func (e CommentsLookupRspValidationError) ErrorName() string {
|
|
return "CommentsLookupRspValidationError"
|
|
}
|
|
|
|
// Error satisfies the builtin error interface
|
|
func (e CommentsLookupRspValidationError) Error() string {
|
|
cause := ""
|
|
if e.cause != nil {
|
|
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
|
}
|
|
|
|
key := ""
|
|
if e.key {
|
|
key = "key for "
|
|
}
|
|
|
|
return fmt.Sprintf(
|
|
"invalid %sCommentsLookupRsp.%s: %s%s",
|
|
key,
|
|
e.field,
|
|
e.reason,
|
|
cause)
|
|
}
|
|
|
|
var _ error = CommentsLookupRspValidationError{}
|
|
|
|
var _ interface {
|
|
Field() string
|
|
Reason() string
|
|
Key() bool
|
|
Cause() error
|
|
ErrorName() string
|
|
} = CommentsLookupRspValidationError{}
|