Documentation ¶
Index ¶
- Variables
- func BoolPtr(b **bool, defaultValue bool)
- func Duration(d **durationpb.Duration, defaultValue time.Duration)
- func Float64(s *float64, defaultValue float64)
- func HTTPHeaderToValuesMap(from http.Header) map[string]*HeaderValues
- func NotNil(field interface{})
- func String(s *string, defaultValue string)
- func StringPtr(s **string, defaultValue string)
- func URLValuesToValuesMap(from url.Values) map[string]*QueryValues
- func Uint32(d *uint32, defaultValue uint32)
- func ValuesMapToHTTPHeader(from map[string]*HeaderValues) http.Header
- func ValuesMapToURLValues(from map[string]*QueryValues) url.Values
- type HeaderValues
- func (*HeaderValues) Descriptor() ([]byte, []int)deprecated
- func (x *HeaderValues) GetValue() []string
- func (*HeaderValues) ProtoMessage()
- func (x *HeaderValues) ProtoReflect() protoreflect.Message
- func (x *HeaderValues) Reset()
- func (x *HeaderValues) String() string
- func (m *HeaderValues) Validate() error
- func (m *HeaderValues) ValidateAll() error
- type HeaderValuesMultiError
- type HeaderValuesValidationError
- func (e HeaderValuesValidationError) Cause() error
- func (e HeaderValuesValidationError) Error() string
- func (e HeaderValuesValidationError) ErrorName() string
- func (e HeaderValuesValidationError) Field() string
- func (e HeaderValuesValidationError) Key() bool
- func (e HeaderValuesValidationError) Reason() string
- type HttpRequest
- func (*HttpRequest) Descriptor() ([]byte, []int)deprecated
- func (x *HttpRequest) GetHeader() map[string]*HeaderValues
- func (x *HttpRequest) GetMethod() string
- func (x *HttpRequest) GetQuery() map[string]*QueryValues
- func (x *HttpRequest) GetUrlPath() string
- func (x *HttpRequest) HTTPHeader() http.Header
- func (x *HttpRequest) IsUpgrade() bool
- func (*HttpRequest) ProtoMessage()
- func (x *HttpRequest) ProtoReflect() protoreflect.Message
- func (x *HttpRequest) Reset()
- func (x *HttpRequest) String() string
- func (x *HttpRequest) URLQuery() url.Values
- func (m *HttpRequest) Validate() error
- func (m *HttpRequest) ValidateAll() error
- type HttpRequestMultiError
- type HttpRequestValidationError
- func (e HttpRequestValidationError) Cause() error
- func (e HttpRequestValidationError) Error() string
- func (e HttpRequestValidationError) ErrorName() string
- func (e HttpRequestValidationError) Field() string
- func (e HttpRequestValidationError) Key() bool
- func (e HttpRequestValidationError) Reason() string
- type HttpResponse
- func (*HttpResponse) Descriptor() ([]byte, []int)deprecated
- func (x *HttpResponse) GetHeader() map[string]*HeaderValues
- func (x *HttpResponse) GetStatus() string
- func (x *HttpResponse) GetStatusCode() int32
- func (x *HttpResponse) HTTPHeader() http.Header
- func (*HttpResponse) ProtoMessage()
- func (x *HttpResponse) ProtoReflect() protoreflect.Message
- func (x *HttpResponse) Reset()
- func (x *HttpResponse) String() string
- func (m *HttpResponse) Validate() error
- func (m *HttpResponse) ValidateAll() error
- type HttpResponseMultiError
- type HttpResponseValidationError
- func (e HttpResponseValidationError) Cause() error
- func (e HttpResponseValidationError) Error() string
- func (e HttpResponseValidationError) ErrorName() string
- func (e HttpResponseValidationError) Field() string
- func (e HttpResponseValidationError) Key() bool
- func (e HttpResponseValidationError) Reason() string
- type ProtoErrMarshaler
- type QueryValues
- func (*QueryValues) Descriptor() ([]byte, []int)deprecated
- func (x *QueryValues) GetValue() []string
- func (*QueryValues) ProtoMessage()
- func (x *QueryValues) ProtoReflect() protoreflect.Message
- func (x *QueryValues) Reset()
- func (x *QueryValues) String() string
- func (m *QueryValues) Validate() error
- func (m *QueryValues) ValidateAll() error
- type QueryValuesMultiError
- type QueryValuesValidationError
- func (e QueryValuesValidationError) Cause() error
- func (e QueryValuesValidationError) Error() string
- func (e QueryValuesValidationError) ErrorName() string
- func (e QueryValuesValidationError) Field() string
- func (e QueryValuesValidationError) Key() bool
- func (e QueryValuesValidationError) Reason() string
Constants ¶
This section is empty.
Variables ¶
var File_internal_tool_prototool_prototool_proto protoreflect.FileDescriptor
Functions ¶
func HTTPHeaderToValuesMap ¶
func HTTPHeaderToValuesMap(from http.Header) map[string]*HeaderValues
func NotNil ¶
func NotNil(field interface{})
NotNil ensures that the memory that the field pointer is pointing to is not nil. field must be a valid pointer. It's target is checked for nil-ness and populated if it's nil.
func URLValuesToValuesMap ¶
func URLValuesToValuesMap(from url.Values) map[string]*QueryValues
func ValuesMapToHTTPHeader ¶
func ValuesMapToHTTPHeader(from map[string]*HeaderValues) http.Header
func ValuesMapToURLValues ¶
func ValuesMapToURLValues(from map[string]*QueryValues) url.Values
Types ¶
type HeaderValues ¶ added in v17.1.0
type HeaderValues struct { Value []string `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*HeaderValues) Descriptor
deprecated
added in
v17.1.0
func (*HeaderValues) Descriptor() ([]byte, []int)
Deprecated: Use HeaderValues.ProtoReflect.Descriptor instead.
func (*HeaderValues) GetValue ¶ added in v17.1.0
func (x *HeaderValues) GetValue() []string
func (*HeaderValues) ProtoMessage ¶ added in v17.1.0
func (*HeaderValues) ProtoMessage()
func (*HeaderValues) ProtoReflect ¶ added in v17.1.0
func (x *HeaderValues) ProtoReflect() protoreflect.Message
func (*HeaderValues) Reset ¶ added in v17.1.0
func (x *HeaderValues) Reset()
func (*HeaderValues) String ¶ added in v17.1.0
func (x *HeaderValues) String() string
func (*HeaderValues) Validate ¶ added in v17.1.0
func (m *HeaderValues) Validate() error
Validate checks the field values on HeaderValues 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 (*HeaderValues) ValidateAll ¶ added in v17.1.0
func (m *HeaderValues) ValidateAll() error
ValidateAll checks the field values on HeaderValues 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 HeaderValuesMultiError, or nil if none found.
type HeaderValuesMultiError ¶ added in v17.1.0
type HeaderValuesMultiError []error
HeaderValuesMultiError is an error wrapping multiple validation errors returned by HeaderValues.ValidateAll() if the designated constraints aren't met.
func (HeaderValuesMultiError) AllErrors ¶ added in v17.1.0
func (m HeaderValuesMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (HeaderValuesMultiError) Error ¶ added in v17.1.0
func (m HeaderValuesMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type HeaderValuesValidationError ¶ added in v17.1.0
type HeaderValuesValidationError struct {
// contains filtered or unexported fields
}
HeaderValuesValidationError is the validation error returned by HeaderValues.Validate if the designated constraints aren't met.
func (HeaderValuesValidationError) Cause ¶ added in v17.1.0
func (e HeaderValuesValidationError) Cause() error
Cause function returns cause value.
func (HeaderValuesValidationError) Error ¶ added in v17.1.0
func (e HeaderValuesValidationError) Error() string
Error satisfies the builtin error interface
func (HeaderValuesValidationError) ErrorName ¶ added in v17.1.0
func (e HeaderValuesValidationError) ErrorName() string
ErrorName returns error name.
func (HeaderValuesValidationError) Field ¶ added in v17.1.0
func (e HeaderValuesValidationError) Field() string
Field function returns field value.
func (HeaderValuesValidationError) Key ¶ added in v17.1.0
func (e HeaderValuesValidationError) Key() bool
Key function returns key value.
func (HeaderValuesValidationError) Reason ¶ added in v17.1.0
func (e HeaderValuesValidationError) Reason() string
Reason function returns reason value.
type HttpRequest ¶
type HttpRequest struct { Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"` Header map[string]*HeaderValues `` /* 153-byte string literal not displayed */ UrlPath string `protobuf:"bytes,3,opt,name=url_path,json=urlPath,proto3" json:"url_path,omitempty"` Query map[string]*QueryValues `` /* 151-byte string literal not displayed */ // contains filtered or unexported fields }
func (*HttpRequest) Descriptor
deprecated
func (*HttpRequest) Descriptor() ([]byte, []int)
Deprecated: Use HttpRequest.ProtoReflect.Descriptor instead.
func (*HttpRequest) GetHeader ¶
func (x *HttpRequest) GetHeader() map[string]*HeaderValues
func (*HttpRequest) GetMethod ¶
func (x *HttpRequest) GetMethod() string
func (*HttpRequest) GetQuery ¶
func (x *HttpRequest) GetQuery() map[string]*QueryValues
func (*HttpRequest) GetUrlPath ¶
func (x *HttpRequest) GetUrlPath() string
func (*HttpRequest) HTTPHeader ¶
func (x *HttpRequest) HTTPHeader() http.Header
func (*HttpRequest) IsUpgrade ¶
func (x *HttpRequest) IsUpgrade() bool
func (*HttpRequest) ProtoMessage ¶
func (*HttpRequest) ProtoMessage()
func (*HttpRequest) ProtoReflect ¶
func (x *HttpRequest) ProtoReflect() protoreflect.Message
func (*HttpRequest) Reset ¶
func (x *HttpRequest) Reset()
func (*HttpRequest) String ¶
func (x *HttpRequest) String() string
func (*HttpRequest) URLQuery ¶
func (x *HttpRequest) URLQuery() url.Values
func (*HttpRequest) Validate ¶
func (m *HttpRequest) Validate() error
Validate checks the field values on HttpRequest 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 (*HttpRequest) ValidateAll ¶
func (m *HttpRequest) ValidateAll() error
ValidateAll checks the field values on HttpRequest 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 HttpRequestMultiError, or nil if none found.
type HttpRequestMultiError ¶
type HttpRequestMultiError []error
HttpRequestMultiError is an error wrapping multiple validation errors returned by HttpRequest.ValidateAll() if the designated constraints aren't met.
func (HttpRequestMultiError) AllErrors ¶
func (m HttpRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (HttpRequestMultiError) Error ¶
func (m HttpRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type HttpRequestValidationError ¶
type HttpRequestValidationError struct {
// contains filtered or unexported fields
}
HttpRequestValidationError is the validation error returned by HttpRequest.Validate if the designated constraints aren't met.
func (HttpRequestValidationError) Cause ¶
func (e HttpRequestValidationError) Cause() error
Cause function returns cause value.
func (HttpRequestValidationError) Error ¶
func (e HttpRequestValidationError) Error() string
Error satisfies the builtin error interface
func (HttpRequestValidationError) ErrorName ¶
func (e HttpRequestValidationError) ErrorName() string
ErrorName returns error name.
func (HttpRequestValidationError) Field ¶
func (e HttpRequestValidationError) Field() string
Field function returns field value.
func (HttpRequestValidationError) Key ¶
func (e HttpRequestValidationError) Key() bool
Key function returns key value.
func (HttpRequestValidationError) Reason ¶
func (e HttpRequestValidationError) Reason() string
Reason function returns reason value.
type HttpResponse ¶
type HttpResponse struct { StatusCode int32 `protobuf:"varint,1,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"` Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` Header map[string]*HeaderValues `` /* 153-byte string literal not displayed */ // contains filtered or unexported fields }
func (*HttpResponse) Descriptor
deprecated
func (*HttpResponse) Descriptor() ([]byte, []int)
Deprecated: Use HttpResponse.ProtoReflect.Descriptor instead.
func (*HttpResponse) GetHeader ¶
func (x *HttpResponse) GetHeader() map[string]*HeaderValues
func (*HttpResponse) GetStatus ¶
func (x *HttpResponse) GetStatus() string
func (*HttpResponse) GetStatusCode ¶
func (x *HttpResponse) GetStatusCode() int32
func (*HttpResponse) HTTPHeader ¶
func (x *HttpResponse) HTTPHeader() http.Header
func (*HttpResponse) ProtoMessage ¶
func (*HttpResponse) ProtoMessage()
func (*HttpResponse) ProtoReflect ¶
func (x *HttpResponse) ProtoReflect() protoreflect.Message
func (*HttpResponse) Reset ¶
func (x *HttpResponse) Reset()
func (*HttpResponse) String ¶
func (x *HttpResponse) String() string
func (*HttpResponse) Validate ¶
func (m *HttpResponse) Validate() error
Validate checks the field values on HttpResponse 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 (*HttpResponse) ValidateAll ¶
func (m *HttpResponse) ValidateAll() error
ValidateAll checks the field values on HttpResponse 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 HttpResponseMultiError, or nil if none found.
type HttpResponseMultiError ¶
type HttpResponseMultiError []error
HttpResponseMultiError is an error wrapping multiple validation errors returned by HttpResponse.ValidateAll() if the designated constraints aren't met.
func (HttpResponseMultiError) AllErrors ¶
func (m HttpResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (HttpResponseMultiError) Error ¶
func (m HttpResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type HttpResponseValidationError ¶
type HttpResponseValidationError struct {
// contains filtered or unexported fields
}
HttpResponseValidationError is the validation error returned by HttpResponse.Validate if the designated constraints aren't met.
func (HttpResponseValidationError) Cause ¶
func (e HttpResponseValidationError) Cause() error
Cause function returns cause value.
func (HttpResponseValidationError) Error ¶
func (e HttpResponseValidationError) Error() string
Error satisfies the builtin error interface
func (HttpResponseValidationError) ErrorName ¶
func (e HttpResponseValidationError) ErrorName() string
ErrorName returns error name.
func (HttpResponseValidationError) Field ¶
func (e HttpResponseValidationError) Field() string
Field function returns field value.
func (HttpResponseValidationError) Key ¶
func (e HttpResponseValidationError) Key() bool
Key function returns key value.
func (HttpResponseValidationError) Reason ¶
func (e HttpResponseValidationError) Reason() string
Reason function returns reason value.
type ProtoErrMarshaler ¶
type ProtoErrMarshaler struct { }
type QueryValues ¶ added in v17.1.0
type QueryValues struct { Value []string `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*QueryValues) Descriptor
deprecated
added in
v17.1.0
func (*QueryValues) Descriptor() ([]byte, []int)
Deprecated: Use QueryValues.ProtoReflect.Descriptor instead.
func (*QueryValues) GetValue ¶ added in v17.1.0
func (x *QueryValues) GetValue() []string
func (*QueryValues) ProtoMessage ¶ added in v17.1.0
func (*QueryValues) ProtoMessage()
func (*QueryValues) ProtoReflect ¶ added in v17.1.0
func (x *QueryValues) ProtoReflect() protoreflect.Message
func (*QueryValues) Reset ¶ added in v17.1.0
func (x *QueryValues) Reset()
func (*QueryValues) String ¶ added in v17.1.0
func (x *QueryValues) String() string
func (*QueryValues) Validate ¶ added in v17.1.0
func (m *QueryValues) Validate() error
Validate checks the field values on QueryValues 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 (*QueryValues) ValidateAll ¶ added in v17.1.0
func (m *QueryValues) ValidateAll() error
ValidateAll checks the field values on QueryValues 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 QueryValuesMultiError, or nil if none found.
type QueryValuesMultiError ¶ added in v17.1.0
type QueryValuesMultiError []error
QueryValuesMultiError is an error wrapping multiple validation errors returned by QueryValues.ValidateAll() if the designated constraints aren't met.
func (QueryValuesMultiError) AllErrors ¶ added in v17.1.0
func (m QueryValuesMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (QueryValuesMultiError) Error ¶ added in v17.1.0
func (m QueryValuesMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type QueryValuesValidationError ¶ added in v17.1.0
type QueryValuesValidationError struct {
// contains filtered or unexported fields
}
QueryValuesValidationError is the validation error returned by QueryValues.Validate if the designated constraints aren't met.
func (QueryValuesValidationError) Cause ¶ added in v17.1.0
func (e QueryValuesValidationError) Cause() error
Cause function returns cause value.
func (QueryValuesValidationError) Error ¶ added in v17.1.0
func (e QueryValuesValidationError) Error() string
Error satisfies the builtin error interface
func (QueryValuesValidationError) ErrorName ¶ added in v17.1.0
func (e QueryValuesValidationError) ErrorName() string
ErrorName returns error name.
func (QueryValuesValidationError) Field ¶ added in v17.1.0
func (e QueryValuesValidationError) Field() string
Field function returns field value.
func (QueryValuesValidationError) Key ¶ added in v17.1.0
func (e QueryValuesValidationError) Key() bool
Key function returns key value.
func (QueryValuesValidationError) Reason ¶ added in v17.1.0
func (e QueryValuesValidationError) Reason() string
Reason function returns reason value.