ghttpproto

package
Version: v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2021 License: BSD-3-Clause Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_ghttp_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: "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

This method has been 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 added in v1.4.7

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

This method has been 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 added in v1.4.7

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

This method has been 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 added in v1.4.7

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=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

This method has been 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 added in v1.4.7

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

This method has been deprecated.
func (*HTTPResponse) Descriptor() ([]byte, []int)

Deprecated: Use HTTPResponse.ProtoReflect.Descriptor instead.

func (*HTTPResponse) ProtoMessage

func (*HTTPResponse) ProtoMessage()

func (*HTTPResponse) ProtoReflect added in v1.4.7

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

This method has been 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 added in v1.4.7

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

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

type ResponseWriter added in v1.0.2

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 added in v1.0.2

This method has been deprecated.
func (*ResponseWriter) Descriptor() ([]byte, []int)

Deprecated: Use ResponseWriter.ProtoReflect.Descriptor instead.

func (*ResponseWriter) GetHeader added in v1.0.2

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

func (*ResponseWriter) GetId added in v1.0.2

func (x *ResponseWriter) GetId() uint32

func (*ResponseWriter) ProtoMessage added in v1.0.2

func (*ResponseWriter) ProtoMessage()

func (*ResponseWriter) ProtoReflect added in v1.4.7

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

func (*ResponseWriter) Reset added in v1.0.2

func (x *ResponseWriter) Reset()

func (*ResponseWriter) String added in v1.0.2

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

This method has been 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 added in v1.4.7

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 added in v1.4.7

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

This method has been 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 added in v1.4.7

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
t or T : Toggle theme light dark auto
y or Y : Canonical URL