Documentation
¶
Index ¶
- Variables
- func NewGatewayMux(cookieSecure bool) *runtime.ServeMux
- type GrpcImpl
- type GrpcWithGateway
- type ServersManager
- func (s *ServersManager) AddHttpHandler(path string, handler http.Handler)
- func (s *ServersManager) AddImplementation(ctx context.Context, grpcImpls ...GrpcImpl)
- func (s *ServersManager) AddServerOption(opts ...grpc.ServerOption)
- func (m *ServersManager) Start() error
- func (m *ServersManager) Stop() error
Constants ¶
This section is empty.
Variables ¶
var AllowAllOrigins = []string{"*"}
AllowAllOrigins is an explicit opt-in escape hatch for the old permissive CORS behavior (e.g. quick local dev) — pass it to setUpCors instead of retyping a wildcard. Never the generated default: AllowCredentials: true (required for cookie-based auth) is only valid alongside an explicit origin allowlist per the CORS spec, never "*".
Functions ¶
func NewGatewayMux ¶
NewGatewayMux builds the grpc-gateway mux shared by every *Impl.Gateway() method. CookieToMetadataAnnotator lets browser callers authenticate via the access_token cookie instead of an explicit Authorization header; CookieForwardResponseOption turns x-set-cookie-*/x-clear-auth-cookies gRPC response metadata into real Set-Cookie headers. Both are no-ops until a handler explicitly sets those keys, so this is safe to use uniformly regardless of whether this project ends up using cookie-based auth.
Types ¶
type GrpcImpl ¶
type GrpcImpl interface {
Register(srv grpc.ServiceRegistrar)
}
type GrpcWithGateway ¶
type ServersManager ¶
type ServersManager struct {
// contains filtered or unexported fields
}
func NewServerManager ¶
func (*ServersManager) AddHttpHandler ¶
func (*ServersManager) AddImplementation ¶
func (*ServersManager) AddServerOption ¶
func (s *ServersManager) AddServerOption(opts ...grpc.ServerOption)
func (*ServersManager) Start ¶
func (m *ServersManager) Start() error
func (*ServersManager) Stop ¶
func (m *ServersManager) Stop() error