ghttpproto

package
v1.7.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 1, 2022 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_ghttpproto_http_proto protoreflect.FileDescriptor
View Source
var HTTP_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "ghttpproto.HTTP",
	HandlerType: (*HTTPServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Handle",
			Handler:    _HTTP_Handle_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "ghttpproto/http.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=handshake_complete,json=handshakeComplete,proto3" json:"handshake_complete,omitempty"`
	DidResume                   bool            `protobuf:"varint,3,opt,name=did_resume,json=didResume,proto3" json:"did_resume,omitempty"`
	CipherSuite                 uint32          `protobuf:"varint,4,opt,name=cipher_suite,json=cipherSuite,proto3" json:"cipher_suite,omitempty"`
	NegotiatedProtocol          string          `protobuf:"bytes,5,opt,name=negotiated_protocol,json=negotiatedProtocol,proto3" json:"negotiated_protocol,omitempty"`
	NegotiatedProtocolIsMutual  bool            `` /* 144-byte string literal not displayed */
	ServerName                  string          `protobuf:"bytes,7,opt,name=server_name,json=serverName,proto3" json:"server_name,omitempty"`
	PeerCertificates            *Certificates   `protobuf:"bytes,8,opt,name=peer_certificates,json=peerCertificates,proto3" json:"peer_certificates,omitempty"`
	VerifiedChains              []*Certificates `protobuf:"bytes,9,rep,name=verified_chains,json=verifiedChains,proto3" json:"verified_chains,omitempty"`
	SignedCertificateTimestamps [][]byte        `` /* 145-byte string literal not displayed */
	OcspResponse                []byte          `protobuf:"bytes,11,opt,name=ocsp_response,json=ocspResponse,proto3" json:"ocsp_response,omitempty"`
	TlsUnique                   []byte          `protobuf:"bytes,12,opt,name=tls_unique,json=tlsUnique,proto3" json:"tls_unique,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) Descriptor() ([]byte, []int)

Deprecated: Use Element.ProtoReflect.Descriptor instead.

func (*Element) GetKey

func (x *Element) GetKey() string

func (*Element) GetValues

func (x *Element) GetValues() []string

func (*Element) ProtoMessage

func (*Element) ProtoMessage()

func (*Element) ProtoReflect

func (x *Element) ProtoReflect() protoreflect.Message

func (*Element) Reset

func (x *Element) Reset()

func (*Element) String

func (x *Element) String() string

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=response_writer,json=responseWriter,proto3" json:"response_writer,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=proto_major,json=protoMajor,proto3" json:"proto_major,omitempty"`
	ProtoMinor       int32            `protobuf:"varint,5,opt,name=proto_minor,json=protoMinor,proto3" json:"proto_minor,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=content_length,json=contentLength,proto3" json:"content_length,omitempty"`
	TransferEncoding []string         `protobuf:"bytes,9,rep,name=transfer_encoding,json=transferEncoding,proto3" json:"transfer_encoding,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=post_form,json=postForm,proto3" json:"post_form,omitempty"`
	TrailerKeys      []string         `protobuf:"bytes,13,rep,name=trailer_keys,json=trailerKeys,proto3" json:"trailer_keys,omitempty"`
	RemoteAddr       string           `protobuf:"bytes,14,opt,name=remote_addr,json=remoteAddr,proto3" json:"remote_addr,omitempty"`
	RequestUri       string           `protobuf:"bytes,15,opt,name=request_uri,json=requestUri,proto3" json:"request_uri,omitempty"`
	Tls              *ConnectionState `protobuf:"bytes,16,opt,name=tls,proto3" json:"tls,omitempty"`
	// contains filtered or unexported fields
}

func (*Request) Descriptor deprecated

func (*Request) Descriptor() ([]byte, []int)

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetBody

func (x *Request) GetBody() uint32

func (*Request) GetContentLength

func (x *Request) GetContentLength() int64

func (*Request) GetForm

func (x *Request) GetForm() []*Element

func (*Request) GetHeader

func (x *Request) GetHeader() []*Element

func (*Request) GetHost

func (x *Request) GetHost() string

func (*Request) GetMethod

func (x *Request) GetMethod() string

func (*Request) GetPostForm

func (x *Request) GetPostForm() []*Element

func (*Request) GetProto

func (x *Request) GetProto() string

func (*Request) GetProtoMajor

func (x *Request) GetProtoMajor() int32

func (*Request) GetProtoMinor

func (x *Request) GetProtoMinor() int32

func (*Request) GetRemoteAddr

func (x *Request) GetRemoteAddr() string

func (*Request) GetRequestUri

func (x *Request) GetRequestUri() string

func (*Request) GetTls

func (x *Request) GetTls() *ConnectionState

func (*Request) GetTrailerKeys

func (x *Request) GetTrailerKeys() []string

func (*Request) GetTransferEncoding

func (x *Request) GetTransferEncoding() []string

func (*Request) GetUrl

func (x *Request) GetUrl() *URL

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect

func (x *Request) ProtoReflect() protoreflect.Message

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

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=raw_path,json=rawPath,proto3" json:"raw_path,omitempty"`
	ForceQuery bool      `protobuf:"varint,7,opt,name=force_query,json=forceQuery,proto3" json:"force_query,omitempty"`
	RawQuery   string    `protobuf:"bytes,8,opt,name=raw_query,json=rawQuery,proto3" json:"raw_query,omitempty"`
	Fragment   string    `protobuf:"bytes,9,opt,name=fragment,proto3" json:"fragment,omitempty"`
	// contains filtered or unexported fields
}

func (*URL) Descriptor deprecated

func (*URL) Descriptor() ([]byte, []int)

Deprecated: Use URL.ProtoReflect.Descriptor instead.

func (*URL) GetForceQuery

func (x *URL) GetForceQuery() bool

func (*URL) GetFragment

func (x *URL) GetFragment() string

func (*URL) GetHost

func (x *URL) GetHost() string

func (*URL) GetOpaque

func (x *URL) GetOpaque() string

func (*URL) GetPath

func (x *URL) GetPath() string

func (*URL) GetRawPath

func (x *URL) GetRawPath() string

func (*URL) GetRawQuery

func (x *URL) GetRawQuery() string

func (*URL) GetScheme

func (x *URL) GetScheme() string

func (*URL) GetUser

func (x *URL) GetUser() *Userinfo

func (*URL) ProtoMessage

func (*URL) ProtoMessage()

func (*URL) ProtoReflect

func (x *URL) ProtoReflect() protoreflect.Message

func (*URL) Reset

func (x *URL) Reset()

func (*URL) String

func (x *URL) String() string

type UnimplementedHTTPServer

type UnimplementedHTTPServer struct {
}

UnimplementedHTTPServer must be embedded to have forward compatible implementations.

func (UnimplementedHTTPServer) Handle

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=password_set,json=passwordSet,proto3" json:"password_set,omitempty"`
	// contains filtered or unexported fields
}

func (*Userinfo) Descriptor deprecated

func (*Userinfo) Descriptor() ([]byte, []int)

Deprecated: Use Userinfo.ProtoReflect.Descriptor instead.

func (*Userinfo) GetPassword

func (x *Userinfo) GetPassword() string

func (*Userinfo) GetPasswordSet

func (x *Userinfo) GetPasswordSet() bool

func (*Userinfo) GetUsername

func (x *Userinfo) GetUsername() string

func (*Userinfo) ProtoMessage

func (*Userinfo) ProtoMessage()

func (*Userinfo) ProtoReflect

func (x *Userinfo) ProtoReflect() protoreflect.Message

func (*Userinfo) Reset

func (x *Userinfo) Reset()

func (*Userinfo) String

func (x *Userinfo) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL