Documentation ¶
Index ¶
- Variables
- func Duration(d **durationpb.Duration, defaultValue time.Duration)
- func Float64(s *float64, defaultValue float64)
- func HTTPHeaderToValuesMap(from http.Header) map[string]*Values
- func NotNil(field interface{})
- func String(s *string, defaultValue string)
- func StringPtr(s **string, defaultValue string)
- func URLValuesToValuesMap(from url.Values) map[string]*Values
- func Uint32(d *uint32, defaultValue uint32)
- func ValuesMapToHTTPHeader(from map[string]*Values) http.Header
- func ValuesMapToURLValues(from map[string]*Values) url.Values
- type HttpRequest
- func (*HttpRequest) Descriptor() ([]byte, []int)deprecated
- func (x *HttpRequest) GetHeader() map[string]*Values
- func (x *HttpRequest) GetMethod() string
- func (x *HttpRequest) GetQuery() map[string]*Values
- 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]*Values
- 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 Values
- func (*Values) Descriptor() ([]byte, []int)deprecated
- func (x *Values) GetValue() []string
- func (*Values) ProtoMessage()
- func (x *Values) ProtoReflect() protoreflect.Message
- func (x *Values) Reset()
- func (x *Values) String() string
- func (m *Values) Validate() error
- func (m *Values) ValidateAll() error
- type ValuesMultiError
- type ValuesValidationError
Constants ¶
This section is empty.
Variables ¶
var File_internal_tool_prototool_prototool_proto protoreflect.FileDescriptor
Functions ¶
func HTTPHeaderToValuesMap ¶ added in v16.9.0
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 ¶ added in v16.9.0
func ValuesMapToHTTPHeader ¶ added in v16.9.0
Types ¶
type HttpRequest ¶
type HttpRequest struct { Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"` Header map[string]*Values `` /* 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]*Values `` /* 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]*Values
func (*HttpRequest) GetMethod ¶
func (x *HttpRequest) GetMethod() string
func (*HttpRequest) GetQuery ¶
func (x *HttpRequest) GetQuery() map[string]*Values
func (*HttpRequest) GetUrlPath ¶
func (x *HttpRequest) GetUrlPath() string
func (*HttpRequest) HTTPHeader ¶ added in v16.9.0
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 ¶ added in v16.9.0
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]*Values `` /* 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]*Values
func (*HttpResponse) GetStatus ¶
func (x *HttpResponse) GetStatus() string
func (*HttpResponse) GetStatusCode ¶
func (x *HttpResponse) GetStatusCode() int32
func (*HttpResponse) HTTPHeader ¶ added in v16.9.0
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 Values ¶
type Values struct { Value []string `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*Values) Descriptor
deprecated
func (*Values) ProtoMessage ¶
func (*Values) ProtoMessage()
func (*Values) ProtoReflect ¶
func (x *Values) ProtoReflect() protoreflect.Message
func (*Values) Validate ¶
Validate checks the field values on Values 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 (*Values) ValidateAll ¶
ValidateAll checks the field values on Values 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 ValuesMultiError, or nil if none found.
type ValuesMultiError ¶
type ValuesMultiError []error
ValuesMultiError is an error wrapping multiple validation errors returned by Values.ValidateAll() if the designated constraints aren't met.
func (ValuesMultiError) AllErrors ¶
func (m ValuesMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ValuesMultiError) Error ¶
func (m ValuesMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ValuesValidationError ¶
type ValuesValidationError struct {
// contains filtered or unexported fields
}
ValuesValidationError is the validation error returned by Values.Validate if the designated constraints aren't met.
func (ValuesValidationError) Cause ¶
func (e ValuesValidationError) Cause() error
Cause function returns cause value.
func (ValuesValidationError) Error ¶
func (e ValuesValidationError) Error() string
Error satisfies the builtin error interface
func (ValuesValidationError) ErrorName ¶
func (e ValuesValidationError) ErrorName() string
ErrorName returns error name.
func (ValuesValidationError) Field ¶
func (e ValuesValidationError) Field() string
Field function returns field value.
func (ValuesValidationError) Key ¶
func (e ValuesValidationError) Key() bool
Key function returns key value.
func (ValuesValidationError) Reason ¶
func (e ValuesValidationError) Reason() string
Reason function returns reason value.