Documentation ¶
Index ¶
- Constants
- Variables
- type Adapter
- func (a *Adapter) Attach()
- func (a *Adapter) Detach()
- func (a *Adapter) GetCertAndKey() (string, string)
- func (a *Adapter) Initialize()
- func (a *Adapter) LoadTLSConfig() *tls.Config
- func (a *Adapter) LoadTLSConfigCAs(config *tls.Config)
- func (a *Adapter) Register() (string, interface{})
- func (a *Adapter) ServeHTTP(resp http.ResponseWriter, req *http.Request)
- func (a *Adapter) Start()
- func (a *Adapter) WithServerGetter(serverGetter GrpcServerGetter) *Adapter
- type Configuration
- func (*Configuration) Descriptor() ([]byte, []int)deprecated
- func (x *Configuration) GetBindAddress() string
- func (x *Configuration) GetCaFilePaths() []string
- func (x *Configuration) GetCertificateFilePath() string
- func (x *Configuration) GetClientAuthType() Configuration_ClientAuthType
- func (x *Configuration) GetCors() *Configuration_Cors
- func (x *Configuration) GetEnableTls() bool
- func (x *Configuration) GetEnabled() bool
- func (x *Configuration) GetIdleTimeout() int64
- func (x *Configuration) GetInsecureSkipVerify() bool
- func (x *Configuration) GetPrivateKeyFilePath() string
- func (x *Configuration) GetReadHeaderTimeoutSeconds() int64
- func (x *Configuration) GetReadTimeoutSeconds() int64
- func (x *Configuration) GetStopTimeoutSeconds() int64
- func (*Configuration) ProtoMessage()
- func (x *Configuration) ProtoReflect() protoreflect.Message
- func (x *Configuration) Reset()
- func (x *Configuration) String() string
- type Configuration_ClientAuthType
- func (Configuration_ClientAuthType) Descriptor() protoreflect.EnumDescriptor
- func (x Configuration_ClientAuthType) Enum() *Configuration_ClientAuthType
- func (Configuration_ClientAuthType) EnumDescriptor() ([]byte, []int)deprecated
- func (x Configuration_ClientAuthType) Number() protoreflect.EnumNumber
- func (x Configuration_ClientAuthType) String() string
- func (Configuration_ClientAuthType) Type() protoreflect.EnumType
- type Configuration_Cors
- func (*Configuration_Cors) Descriptor() ([]byte, []int)deprecated
- func (x *Configuration_Cors) GetAllowedHeaders() []string
- func (x *Configuration_Cors) GetAllowedMethods() []string
- func (x *Configuration_Cors) GetAllowedOrigins() []string
- func (*Configuration_Cors) ProtoMessage()
- func (x *Configuration_Cors) ProtoReflect() protoreflect.Message
- func (x *Configuration_Cors) Reset()
- func (x *Configuration_Cors) String() string
- type GrpcServerGetter
Constants ¶
View Source
const Key = "grpcWebServer"
Variables ¶
View Source
var ( Configuration_ClientAuthType_name = map[int32]string{ 0: "NO_CLIENT_CERT", 1: "REQUEST_CLIENT_CERT", 2: "REQUIRE_ANY_CLIENT_CERT", 3: "VERIFY_CLIENT_CERT_IF_GIVEN", 4: "REQUIRE_AND_VERIFY_CLIENT_CERT", } Configuration_ClientAuthType_value = map[string]int32{ "NO_CLIENT_CERT": 0, "REQUEST_CLIENT_CERT": 1, "REQUIRE_ANY_CLIENT_CERT": 2, "VERIFY_CLIENT_CERT_IF_GIVEN": 3, "REQUIRE_AND_VERIFY_CLIENT_CERT": 4, } )
Enum value maps for Configuration_ClientAuthType.
View Source
var File_adapters_grpc_web_server_grpc_web_server_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
func (*Adapter) GetCertAndKey ¶
func (*Adapter) Initialize ¶
func (a *Adapter) Initialize()
func (*Adapter) LoadTLSConfig ¶
func (*Adapter) LoadTLSConfigCAs ¶
func (*Adapter) ServeHTTP ¶
func (a *Adapter) ServeHTTP(resp http.ResponseWriter, req *http.Request)
ServeHTTP implements the interface to handle incoming http requests.
func (*Adapter) WithServerGetter ¶
func (a *Adapter) WithServerGetter(serverGetter GrpcServerGetter) *Adapter
type Configuration ¶
type Configuration struct { Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` StopTimeoutSeconds int64 `protobuf:"varint,2,opt,name=stop_timeout_seconds,json=stopTimeoutSeconds,proto3" json:"stop_timeout_seconds,omitempty"` Cors *Configuration_Cors `protobuf:"bytes,3,opt,name=cors,proto3" json:"cors,omitempty"` BindAddress string `protobuf:"bytes,4,opt,name=bind_address,json=bindAddress,proto3" json:"bind_address,omitempty"` ReadTimeoutSeconds int64 `protobuf:"varint,5,opt,name=read_timeout_seconds,json=readTimeoutSeconds,proto3" json:"read_timeout_seconds,omitempty"` ReadHeaderTimeoutSeconds int64 `` /* 138-byte string literal not displayed */ IdleTimeout int64 `protobuf:"varint,7,opt,name=idle_timeout,json=idleTimeout,proto3" json:"idle_timeout,omitempty"` EnableTls bool `protobuf:"varint,8,opt,name=enable_tls,json=enableTls,proto3" json:"enable_tls,omitempty"` InsecureSkipVerify bool `protobuf:"varint,9,opt,name=insecure_skip_verify,json=insecureSkipVerify,proto3" json:"insecure_skip_verify,omitempty"` ClientAuthType Configuration_ClientAuthType `` /* 170-byte string literal not displayed */ CertificateFilePath string `protobuf:"bytes,11,opt,name=certificate_file_path,json=certificateFilePath,proto3" json:"certificate_file_path,omitempty"` PrivateKeyFilePath string `protobuf:"bytes,12,opt,name=private_key_file_path,json=privateKeyFilePath,proto3" json:"private_key_file_path,omitempty"` CaFilePaths []string `protobuf:"bytes,13,rep,name=ca_file_paths,json=caFilePaths,proto3" json:"ca_file_paths,omitempty"` // contains filtered or unexported fields }
func (*Configuration) Descriptor
deprecated
func (*Configuration) Descriptor() ([]byte, []int)
Deprecated: Use Configuration.ProtoReflect.Descriptor instead.
func (*Configuration) GetBindAddress ¶
func (x *Configuration) GetBindAddress() string
func (*Configuration) GetCaFilePaths ¶
func (x *Configuration) GetCaFilePaths() []string
func (*Configuration) GetCertificateFilePath ¶
func (x *Configuration) GetCertificateFilePath() string
func (*Configuration) GetClientAuthType ¶
func (x *Configuration) GetClientAuthType() Configuration_ClientAuthType
func (*Configuration) GetCors ¶
func (x *Configuration) GetCors() *Configuration_Cors
func (*Configuration) GetEnableTls ¶
func (x *Configuration) GetEnableTls() bool
func (*Configuration) GetEnabled ¶
func (x *Configuration) GetEnabled() bool
func (*Configuration) GetIdleTimeout ¶
func (x *Configuration) GetIdleTimeout() int64
func (*Configuration) GetInsecureSkipVerify ¶
func (x *Configuration) GetInsecureSkipVerify() bool
func (*Configuration) GetPrivateKeyFilePath ¶
func (x *Configuration) GetPrivateKeyFilePath() string
func (*Configuration) GetReadHeaderTimeoutSeconds ¶
func (x *Configuration) GetReadHeaderTimeoutSeconds() int64
func (*Configuration) GetReadTimeoutSeconds ¶
func (x *Configuration) GetReadTimeoutSeconds() int64
func (*Configuration) GetStopTimeoutSeconds ¶
func (x *Configuration) GetStopTimeoutSeconds() int64
func (*Configuration) ProtoMessage ¶
func (*Configuration) ProtoMessage()
func (*Configuration) ProtoReflect ¶
func (x *Configuration) ProtoReflect() protoreflect.Message
func (*Configuration) Reset ¶
func (x *Configuration) Reset()
func (*Configuration) String ¶
func (x *Configuration) String() string
type Configuration_ClientAuthType ¶
type Configuration_ClientAuthType int32
const ( Configuration_NO_CLIENT_CERT Configuration_ClientAuthType = 0 Configuration_REQUEST_CLIENT_CERT Configuration_ClientAuthType = 1 Configuration_REQUIRE_ANY_CLIENT_CERT Configuration_ClientAuthType = 2 Configuration_VERIFY_CLIENT_CERT_IF_GIVEN Configuration_ClientAuthType = 3 Configuration_REQUIRE_AND_VERIFY_CLIENT_CERT Configuration_ClientAuthType = 4 )
func (Configuration_ClientAuthType) Descriptor ¶
func (Configuration_ClientAuthType) Descriptor() protoreflect.EnumDescriptor
func (Configuration_ClientAuthType) Enum ¶
func (x Configuration_ClientAuthType) Enum() *Configuration_ClientAuthType
func (Configuration_ClientAuthType) EnumDescriptor
deprecated
func (Configuration_ClientAuthType) EnumDescriptor() ([]byte, []int)
Deprecated: Use Configuration_ClientAuthType.Descriptor instead.
func (Configuration_ClientAuthType) Number ¶
func (x Configuration_ClientAuthType) Number() protoreflect.EnumNumber
func (Configuration_ClientAuthType) String ¶
func (x Configuration_ClientAuthType) String() string
func (Configuration_ClientAuthType) Type ¶
func (Configuration_ClientAuthType) Type() protoreflect.EnumType
type Configuration_Cors ¶
type Configuration_Cors struct { AllowedOrigins []string `protobuf:"bytes,1,rep,name=allowed_origins,json=allowedOrigins,proto3" json:"allowed_origins,omitempty"` AllowedHeaders []string `protobuf:"bytes,2,rep,name=allowed_headers,json=allowedHeaders,proto3" json:"allowed_headers,omitempty"` AllowedMethods []string `protobuf:"bytes,3,rep,name=allowed_methods,json=allowedMethods,proto3" json:"allowed_methods,omitempty"` // contains filtered or unexported fields }
func (*Configuration_Cors) Descriptor
deprecated
func (*Configuration_Cors) Descriptor() ([]byte, []int)
Deprecated: Use Configuration_Cors.ProtoReflect.Descriptor instead.
func (*Configuration_Cors) GetAllowedHeaders ¶
func (x *Configuration_Cors) GetAllowedHeaders() []string
func (*Configuration_Cors) GetAllowedMethods ¶
func (x *Configuration_Cors) GetAllowedMethods() []string
func (*Configuration_Cors) GetAllowedOrigins ¶
func (x *Configuration_Cors) GetAllowedOrigins() []string
func (*Configuration_Cors) ProtoMessage ¶
func (*Configuration_Cors) ProtoMessage()
func (*Configuration_Cors) ProtoReflect ¶
func (x *Configuration_Cors) ProtoReflect() protoreflect.Message
func (*Configuration_Cors) Reset ¶
func (x *Configuration_Cors) Reset()
func (*Configuration_Cors) String ¶
func (x *Configuration_Cors) String() string
type GrpcServerGetter ¶
Click to show internal directories.
Click to hide internal directories.