Documentation ¶
Index ¶
- Variables
- func RegisterHTTPServer(s grpc.ServiceRegistrar, srv HTTPServer)
- type Certificates
- type ConnectionState
- func (*ConnectionState) Descriptor() ([]byte, []int)deprecated
- func (x *ConnectionState) GetCipherSuite() uint32
- func (x *ConnectionState) GetDidResume() bool
- func (x *ConnectionState) GetHandshakeComplete() bool
- func (x *ConnectionState) GetNegotiatedProtocol() string
- func (x *ConnectionState) GetNegotiatedProtocolIsMutual() bool
- func (x *ConnectionState) GetOcspResponse() []byte
- func (x *ConnectionState) GetPeerCertificates() *Certificates
- func (x *ConnectionState) GetServerName() string
- func (x *ConnectionState) GetSignedCertificateTimestamps() [][]byte
- func (x *ConnectionState) GetTlsUnique() []byte
- func (x *ConnectionState) GetVerifiedChains() []*Certificates
- func (x *ConnectionState) GetVersion() uint32
- func (*ConnectionState) ProtoMessage()
- func (x *ConnectionState) ProtoReflect() protoreflect.Message
- func (x *ConnectionState) Reset()
- func (x *ConnectionState) String() string
- type Element
- type HTTPClient
- type HTTPRequest
- func (*HTTPRequest) Descriptor() ([]byte, []int)deprecated
- func (x *HTTPRequest) GetRequest() *Request
- func (x *HTTPRequest) GetResponseWriter() *ResponseWriter
- func (*HTTPRequest) ProtoMessage()
- func (x *HTTPRequest) ProtoReflect() protoreflect.Message
- func (x *HTTPRequest) Reset()
- func (x *HTTPRequest) String() string
- type HTTPResponse
- type HTTPServer
- type Request
- func (*Request) Descriptor() ([]byte, []int)deprecated
- func (x *Request) GetBody() uint32
- func (x *Request) GetContentLength() int64
- func (x *Request) GetForm() []*Element
- func (x *Request) GetHeader() []*Element
- func (x *Request) GetHost() string
- func (x *Request) GetMethod() string
- func (x *Request) GetPostForm() []*Element
- func (x *Request) GetProto() string
- func (x *Request) GetProtoMajor() int32
- func (x *Request) GetProtoMinor() int32
- func (x *Request) GetRemoteAddr() string
- func (x *Request) GetRequestURI() string
- func (x *Request) GetTls() *ConnectionState
- func (x *Request) GetTrailerKeys() []string
- func (x *Request) GetTransferEncoding() []string
- func (x *Request) GetUrl() *URL
- func (*Request) ProtoMessage()
- func (x *Request) ProtoReflect() protoreflect.Message
- func (x *Request) Reset()
- func (x *Request) String() string
- type ResponseWriter
- func (*ResponseWriter) Descriptor() ([]byte, []int)deprecated
- func (x *ResponseWriter) GetHeader() []*Element
- func (x *ResponseWriter) GetId() uint32
- func (*ResponseWriter) ProtoMessage()
- func (x *ResponseWriter) ProtoReflect() protoreflect.Message
- func (x *ResponseWriter) Reset()
- func (x *ResponseWriter) String() string
- type URL
- func (*URL) Descriptor() ([]byte, []int)deprecated
- func (x *URL) GetForceQuery() bool
- func (x *URL) GetFragment() string
- func (x *URL) GetHost() string
- func (x *URL) GetOpaque() string
- func (x *URL) GetPath() string
- func (x *URL) GetRawPath() string
- func (x *URL) GetRawQuery() string
- func (x *URL) GetScheme() string
- func (x *URL) GetUser() *Userinfo
- func (*URL) ProtoMessage()
- func (x *URL) ProtoReflect() protoreflect.Message
- func (x *URL) Reset()
- func (x *URL) String() string
- type UnimplementedHTTPServer
- type UnsafeHTTPServer
- type Userinfo
- func (*Userinfo) Descriptor() ([]byte, []int)deprecated
- func (x *Userinfo) GetPassword() string
- func (x *Userinfo) GetPasswordSet() bool
- func (x *Userinfo) GetUsername() string
- func (*Userinfo) ProtoMessage()
- func (x *Userinfo) ProtoReflect() protoreflect.Message
- func (x *Userinfo) Reset()
- func (x *Userinfo) String() string
Constants ¶
This section is empty.
Variables ¶
var File_ghttp_proto protoreflect.FileDescriptor
var HTTP_ServiceDesc = grpc.ServiceDesc{ ServiceName: "ghttpproto.HTTP", HandlerType: (*HTTPServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Handle", Handler: _HTTP_Handle_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "ghttp.proto", }
HTTP_ServiceDesc is the grpc.ServiceDesc for HTTP service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterHTTPServer ¶
func RegisterHTTPServer(s grpc.ServiceRegistrar, srv HTTPServer)
Types ¶
type Certificates ¶
type Certificates struct { Cert [][]byte `protobuf:"bytes,1,rep,name=cert,proto3" json:"cert,omitempty"` // contains filtered or unexported fields }
func (*Certificates) Descriptor
deprecated
func (*Certificates) Descriptor() ([]byte, []int)
Deprecated: Use Certificates.ProtoReflect.Descriptor instead.
func (*Certificates) GetCert ¶
func (x *Certificates) GetCert() [][]byte
func (*Certificates) ProtoMessage ¶
func (*Certificates) ProtoMessage()
func (*Certificates) ProtoReflect ¶
func (x *Certificates) ProtoReflect() protoreflect.Message
func (*Certificates) Reset ¶
func (x *Certificates) Reset()
func (*Certificates) String ¶
func (x *Certificates) String() string
type ConnectionState ¶
type ConnectionState struct { Version uint32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` HandshakeComplete bool `protobuf:"varint,2,opt,name=handshakeComplete,proto3" json:"handshakeComplete,omitempty"` DidResume bool `protobuf:"varint,3,opt,name=didResume,proto3" json:"didResume,omitempty"` CipherSuite uint32 `protobuf:"varint,4,opt,name=cipherSuite,proto3" json:"cipherSuite,omitempty"` NegotiatedProtocol string `protobuf:"bytes,5,opt,name=negotiatedProtocol,proto3" json:"negotiatedProtocol,omitempty"` NegotiatedProtocolIsMutual bool `protobuf:"varint,6,opt,name=negotiatedProtocolIsMutual,proto3" json:"negotiatedProtocolIsMutual,omitempty"` ServerName string `protobuf:"bytes,7,opt,name=serverName,proto3" json:"serverName,omitempty"` PeerCertificates *Certificates `protobuf:"bytes,8,opt,name=peerCertificates,proto3" json:"peerCertificates,omitempty"` VerifiedChains []*Certificates `protobuf:"bytes,9,rep,name=verifiedChains,proto3" json:"verifiedChains,omitempty"` SignedCertificateTimestamps [][]byte `protobuf:"bytes,10,rep,name=signedCertificateTimestamps,proto3" json:"signedCertificateTimestamps,omitempty"` OcspResponse []byte `protobuf:"bytes,11,opt,name=ocspResponse,proto3" json:"ocspResponse,omitempty"` TlsUnique []byte `protobuf:"bytes,12,opt,name=tlsUnique,proto3" json:"tlsUnique,omitempty"` // contains filtered or unexported fields }
func (*ConnectionState) Descriptor
deprecated
func (*ConnectionState) Descriptor() ([]byte, []int)
Deprecated: Use ConnectionState.ProtoReflect.Descriptor instead.
func (*ConnectionState) GetCipherSuite ¶
func (x *ConnectionState) GetCipherSuite() uint32
func (*ConnectionState) GetDidResume ¶
func (x *ConnectionState) GetDidResume() bool
func (*ConnectionState) GetHandshakeComplete ¶
func (x *ConnectionState) GetHandshakeComplete() bool
func (*ConnectionState) GetNegotiatedProtocol ¶
func (x *ConnectionState) GetNegotiatedProtocol() string
func (*ConnectionState) GetNegotiatedProtocolIsMutual ¶
func (x *ConnectionState) GetNegotiatedProtocolIsMutual() bool
func (*ConnectionState) GetOcspResponse ¶
func (x *ConnectionState) GetOcspResponse() []byte
func (*ConnectionState) GetPeerCertificates ¶
func (x *ConnectionState) GetPeerCertificates() *Certificates
func (*ConnectionState) GetServerName ¶
func (x *ConnectionState) GetServerName() string
func (*ConnectionState) GetSignedCertificateTimestamps ¶
func (x *ConnectionState) GetSignedCertificateTimestamps() [][]byte
func (*ConnectionState) GetTlsUnique ¶
func (x *ConnectionState) GetTlsUnique() []byte
func (*ConnectionState) GetVerifiedChains ¶
func (x *ConnectionState) GetVerifiedChains() []*Certificates
func (*ConnectionState) GetVersion ¶
func (x *ConnectionState) GetVersion() uint32
func (*ConnectionState) ProtoMessage ¶
func (*ConnectionState) ProtoMessage()
func (*ConnectionState) ProtoReflect ¶
func (x *ConnectionState) ProtoReflect() protoreflect.Message
func (*ConnectionState) Reset ¶
func (x *ConnectionState) Reset()
func (*ConnectionState) String ¶
func (x *ConnectionState) String() string
type Element ¶
type Element struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Values []string `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty"` // contains filtered or unexported fields }
func (*Element) Descriptor
deprecated
func (*Element) ProtoMessage ¶
func (*Element) ProtoMessage()
func (*Element) ProtoReflect ¶
func (x *Element) ProtoReflect() protoreflect.Message
type HTTPClient ¶
type HTTPClient interface {
Handle(ctx context.Context, in *HTTPRequest, opts ...grpc.CallOption) (*HTTPResponse, error)
}
HTTPClient is the client API for HTTP service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewHTTPClient ¶
func NewHTTPClient(cc grpc.ClientConnInterface) HTTPClient
type HTTPRequest ¶
type HTTPRequest struct { ResponseWriter *ResponseWriter `protobuf:"bytes,1,opt,name=responseWriter,proto3" json:"responseWriter,omitempty"` Request *Request `protobuf:"bytes,2,opt,name=request,proto3" json:"request,omitempty"` // contains filtered or unexported fields }
func (*HTTPRequest) Descriptor
deprecated
func (*HTTPRequest) Descriptor() ([]byte, []int)
Deprecated: Use HTTPRequest.ProtoReflect.Descriptor instead.
func (*HTTPRequest) GetRequest ¶
func (x *HTTPRequest) GetRequest() *Request
func (*HTTPRequest) GetResponseWriter ¶
func (x *HTTPRequest) GetResponseWriter() *ResponseWriter
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
type HTTPResponse ¶
type HTTPResponse struct {
// contains filtered or unexported fields
}
func (*HTTPResponse) Descriptor
deprecated
func (*HTTPResponse) Descriptor() ([]byte, []int)
Deprecated: Use HTTPResponse.ProtoReflect.Descriptor instead.
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
type HTTPServer ¶
type HTTPServer interface { Handle(context.Context, *HTTPRequest) (*HTTPResponse, error) // contains filtered or unexported methods }
HTTPServer is the server API for HTTP service. All implementations must embed UnimplementedHTTPServer for forward compatibility
type Request ¶
type Request struct { Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"` Url *URL `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` Proto string `protobuf:"bytes,3,opt,name=proto,proto3" json:"proto,omitempty"` ProtoMajor int32 `protobuf:"varint,4,opt,name=protoMajor,proto3" json:"protoMajor,omitempty"` ProtoMinor int32 `protobuf:"varint,5,opt,name=protoMinor,proto3" json:"protoMinor,omitempty"` Header []*Element `protobuf:"bytes,6,rep,name=header,proto3" json:"header,omitempty"` Body uint32 `protobuf:"varint,7,opt,name=body,proto3" json:"body,omitempty"` // server ID ContentLength int64 `protobuf:"varint,8,opt,name=contentLength,proto3" json:"contentLength,omitempty"` TransferEncoding []string `protobuf:"bytes,9,rep,name=transferEncoding,proto3" json:"transferEncoding,omitempty"` Host string `protobuf:"bytes,10,opt,name=host,proto3" json:"host,omitempty"` Form []*Element `protobuf:"bytes,11,rep,name=form,proto3" json:"form,omitempty"` PostForm []*Element `protobuf:"bytes,12,rep,name=postForm,proto3" json:"postForm,omitempty"` TrailerKeys []string `protobuf:"bytes,13,rep,name=trailerKeys,proto3" json:"trailerKeys,omitempty"` RemoteAddr string `protobuf:"bytes,14,opt,name=remoteAddr,proto3" json:"remoteAddr,omitempty"` RequestURI string `protobuf:"bytes,15,opt,name=requestURI,proto3" json:"requestURI,omitempty"` Tls *ConnectionState `protobuf:"bytes,16,opt,name=tls,proto3" json:"tls,omitempty"` // contains filtered or unexported fields }
func (*Request) Descriptor
deprecated
func (*Request) GetContentLength ¶
func (*Request) GetPostForm ¶
func (*Request) GetProtoMajor ¶
func (*Request) GetProtoMinor ¶
func (*Request) GetRemoteAddr ¶
func (*Request) GetRequestURI ¶
func (*Request) GetTls ¶
func (x *Request) GetTls() *ConnectionState
func (*Request) GetTrailerKeys ¶
func (*Request) GetTransferEncoding ¶
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) ProtoReflect ¶
func (x *Request) ProtoReflect() protoreflect.Message
type ResponseWriter ¶
type ResponseWriter struct { Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // server ID Header []*Element `protobuf:"bytes,2,rep,name=header,proto3" json:"header,omitempty"` // contains filtered or unexported fields }
func (*ResponseWriter) Descriptor
deprecated
func (*ResponseWriter) Descriptor() ([]byte, []int)
Deprecated: Use ResponseWriter.ProtoReflect.Descriptor instead.
func (*ResponseWriter) GetHeader ¶
func (x *ResponseWriter) GetHeader() []*Element
func (*ResponseWriter) GetId ¶
func (x *ResponseWriter) GetId() uint32
func (*ResponseWriter) ProtoMessage ¶
func (*ResponseWriter) ProtoMessage()
func (*ResponseWriter) ProtoReflect ¶
func (x *ResponseWriter) ProtoReflect() protoreflect.Message
func (*ResponseWriter) Reset ¶
func (x *ResponseWriter) Reset()
func (*ResponseWriter) String ¶
func (x *ResponseWriter) String() string
type URL ¶
type URL struct { Scheme string `protobuf:"bytes,1,opt,name=scheme,proto3" json:"scheme,omitempty"` Opaque string `protobuf:"bytes,2,opt,name=opaque,proto3" json:"opaque,omitempty"` User *Userinfo `protobuf:"bytes,3,opt,name=user,proto3" json:"user,omitempty"` Host string `protobuf:"bytes,4,opt,name=host,proto3" json:"host,omitempty"` Path string `protobuf:"bytes,5,opt,name=path,proto3" json:"path,omitempty"` RawPath string `protobuf:"bytes,6,opt,name=rawPath,proto3" json:"rawPath,omitempty"` ForceQuery bool `protobuf:"varint,7,opt,name=forceQuery,proto3" json:"forceQuery,omitempty"` RawQuery string `protobuf:"bytes,8,opt,name=rawQuery,proto3" json:"rawQuery,omitempty"` Fragment string `protobuf:"bytes,9,opt,name=fragment,proto3" json:"fragment,omitempty"` // contains filtered or unexported fields }
func (*URL) Descriptor
deprecated
func (*URL) GetForceQuery ¶
func (*URL) GetFragment ¶
func (*URL) GetRawPath ¶
func (*URL) GetRawQuery ¶
func (*URL) ProtoMessage ¶
func (*URL) ProtoMessage()
func (*URL) ProtoReflect ¶
func (x *URL) ProtoReflect() protoreflect.Message
type UnimplementedHTTPServer ¶
type UnimplementedHTTPServer struct { }
UnimplementedHTTPServer must be embedded to have forward compatible implementations.
func (UnimplementedHTTPServer) Handle ¶
func (UnimplementedHTTPServer) Handle(context.Context, *HTTPRequest) (*HTTPResponse, error)
type UnsafeHTTPServer ¶
type UnsafeHTTPServer interface {
// contains filtered or unexported methods
}
UnsafeHTTPServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to HTTPServer will result in compilation errors.
type Userinfo ¶
type Userinfo struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` PasswordSet bool `protobuf:"varint,3,opt,name=passwordSet,proto3" json:"passwordSet,omitempty"` // contains filtered or unexported fields }
func (*Userinfo) Descriptor
deprecated
func (*Userinfo) GetPassword ¶
func (*Userinfo) GetPasswordSet ¶
func (*Userinfo) GetUsername ¶
func (*Userinfo) ProtoMessage ¶
func (*Userinfo) ProtoMessage()
func (*Userinfo) ProtoReflect ¶
func (x *Userinfo) ProtoReflect() protoreflect.Message