Documentation ¶
Index ¶
- Variables
- func DefaultHTTPRequestPreflightHandler(req *http.Request) (*http.Request, error)
- func DefaultHTTPResponseValidator(res *http.Response) error
- func DefaultMethodValidator(msg ProtoMessageValidator) error
- func WithResponseValidateError()
- func WithValidation()
- type HTTPClientMethodValidatorHandler
- type HTTPClientService
- type HTTPRequestPreflightHandler
- type HTTPResponseValidatorHandler
- type HTTPServiceConstructorArg
- func WithHTTPRequestPreflight(f HTTPRequestPreflightHandler) HTTPServiceConstructorArg
- func WithHTTPResponseValidator(f HTTPResponseValidatorHandler) HTTPServiceConstructorArg
- func WithIgnoreUnknownField() HTTPServiceConstructorArg
- func WithResponseValidator(f HTTPClientMethodValidatorHandler) HTTPServiceConstructorArg
- type ProtoMessageIface
- type ProtoMessageValidator
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMethodHasNoHTTPClientSupport = errors.New("no google.api.http option for this method") ErrMethodHasNoHTTPBindingSupport = errors.New("no binding specified for google.api.HttpRule") )
Functions ¶
func DefaultMethodValidator ¶
func DefaultMethodValidator(msg ProtoMessageValidator) error
func WithResponseValidateError ¶
func WithResponseValidateError()
func WithValidation ¶
func WithValidation()
Types ¶
type HTTPClientMethodValidatorHandler ¶
type HTTPClientMethodValidatorHandler func(ProtoMessageValidator) (err error)
type HTTPClientService ¶
type HTTPClientService struct { BaseURL string Client *http.Client PbDiscardUnknown bool HttpRequestPreflight HTTPRequestPreflightHandler HttpResponseValidator HTTPResponseValidatorHandler ResponseValidator HTTPClientMethodValidatorHandler }
func (*HTTPClientService) ResponseHTTPClientHandler ¶
func (cs *HTTPClientService) ResponseHTTPClientHandler(res *http.Response, dst ProtoMessageIface) (err error)
type HTTPServiceConstructorArg ¶
type HTTPServiceConstructorArg func(*HTTPClientService)
func WithHTTPRequestPreflight ¶
func WithHTTPRequestPreflight(f HTTPRequestPreflightHandler) HTTPServiceConstructorArg
func WithHTTPResponseValidator ¶
func WithHTTPResponseValidator(f HTTPResponseValidatorHandler) HTTPServiceConstructorArg
func WithIgnoreUnknownField ¶
func WithIgnoreUnknownField() HTTPServiceConstructorArg
func WithResponseValidator ¶
func WithResponseValidator(f HTTPClientMethodValidatorHandler) HTTPServiceConstructorArg
type ProtoMessageIface ¶
type ProtoMessageIface interface { protoreflect.ProtoMessage // proto.Message protoiface.MessageV1 }
type ProtoMessageValidator ¶
type ProtoMessageValidator interface {
Validate() error
}
Click to show internal directories.
Click to hide internal directories.