Documentation
¶
Index ¶
- Variables
- func CookieSameSite(name string) http.SameSite
- func UnaryConnectErrorResponseInterceptor() connect.UnaryInterceptorFunc
- func UnaryConnectLoggerInterceptor(logger *zap.Logger, opts *LoggerOptions) connect.UnaryInterceptorFunc
- func WithConnectCORS(connectHandler http.Handler, conf CorsConfig) http.Handler
- type AuditInterceptor
- type AuthenticationInterceptor
- func (i *AuthenticationInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc
- func (i *AuthenticationInterceptor) WrapStreamingHandler(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc
- func (i *AuthenticationInterceptor) WrapUnary(next connect.UnaryFunc) connect.UnaryFunc
- type AuthorizationInterceptor
- func (a *AuthorizationInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc
- func (a *AuthorizationInterceptor) WrapStreamingHandler(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc
- func (a *AuthorizationInterceptor) WrapUnary(next connect.UnaryFunc) connect.UnaryFunc
- type CorsConfig
- type LoggerOption
- type LoggerOptions
- type SessionInterceptor
- func (s *SessionInterceptor) UnaryConnectRequestHeadersAnnotator() connect.UnaryInterceptorFunc
- func (s *SessionInterceptor) UnaryConnectResponseInterceptor() connect.UnaryInterceptorFunc
- func (s *SessionInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc
- func (s *SessionInterceptor) WrapStreamingHandler(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc
- func (s *SessionInterceptor) WrapUnary(next connect.UnaryFunc) connect.UnaryFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotAvailable = connect.NewError(connect.CodeUnavailable, fmt.Errorf("function not available at the moment")) ErrDeniedInvalidArgs = connect.NewError(connect.CodePermissionDenied, errors.New("invalid arguments")) )
Functions ¶
func CookieSameSite ¶
func UnaryConnectErrorResponseInterceptor ¶ added in v0.79.0
func UnaryConnectErrorResponseInterceptor() connect.UnaryInterceptorFunc
UnaryConnectErrorResponseInterceptor handles error processing after the handler executes but before the logger interceptor logs the response. This interceptor normalizes context-related errors and wraps them in proper Connect error types.
func UnaryConnectLoggerInterceptor ¶
func UnaryConnectLoggerInterceptor(logger *zap.Logger, opts *LoggerOptions) connect.UnaryInterceptorFunc
func WithConnectCORS ¶ added in v0.82.0
func WithConnectCORS(connectHandler http.Handler, conf CorsConfig) http.Handler
WithConnectCORS adds CORS support to a Connect HTTP handler. It uses Connect-specific methods, headers, and exposed headers from the connectcors package.
Types ¶
type AuditInterceptor ¶ added in v0.84.1
type AuditInterceptor struct {
// contains filtered or unexported fields
}
func NewAuditInterceptor ¶ added in v0.84.1
func NewAuditInterceptor(service *audit.Service) *AuditInterceptor
func (*AuditInterceptor) WrapStreamingClient ¶ added in v0.84.1
func (a *AuditInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc
func (*AuditInterceptor) WrapStreamingHandler ¶ added in v0.84.1
func (a *AuditInterceptor) WrapStreamingHandler(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc
type AuthenticationInterceptor ¶ added in v0.71.0
type AuthenticationInterceptor struct {
// contains filtered or unexported fields
}
func NewAuthenticationInterceptor ¶ added in v0.71.0
func NewAuthenticationInterceptor(h *v1beta1connect.ConnectHandler, sessionHeaderConfig authenticate.SessionMetadataHeaders) *AuthenticationInterceptor
func (*AuthenticationInterceptor) WrapStreamingClient ¶ added in v0.71.0
func (i *AuthenticationInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc
func (*AuthenticationInterceptor) WrapStreamingHandler ¶ added in v0.71.0
func (i *AuthenticationInterceptor) WrapStreamingHandler(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc
type AuthorizationInterceptor ¶ added in v0.71.0
type AuthorizationInterceptor struct {
// contains filtered or unexported fields
}
func NewAuthorizationInterceptor ¶ added in v0.71.0
func NewAuthorizationInterceptor(h *v1beta1connect.ConnectHandler) *AuthorizationInterceptor
func (*AuthorizationInterceptor) WrapStreamingClient ¶ added in v0.71.0
func (a *AuthorizationInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc
func (*AuthorizationInterceptor) WrapStreamingHandler ¶ added in v0.71.0
func (a *AuthorizationInterceptor) WrapStreamingHandler(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc
type CorsConfig ¶ added in v0.82.0
type LoggerOption ¶
type LoggerOptions ¶
type LoggerOptions struct {
// contains filtered or unexported fields
}
func NewLoggerOptions ¶
func NewLoggerOptions(opts ...LoggerOption) *LoggerOptions
type SessionInterceptor ¶ added in v0.71.0
type SessionInterceptor struct {
// contains filtered or unexported fields
}
func NewSessionInterceptor ¶ added in v0.71.0
func NewSessionInterceptor(cookieCutter securecookie.Codec, conf authenticate.SessionConfig, h *v1beta1connect.ConnectHandler) *SessionInterceptor
func (*SessionInterceptor) UnaryConnectRequestHeadersAnnotator ¶ added in v0.71.0
func (s *SessionInterceptor) UnaryConnectRequestHeadersAnnotator() connect.UnaryInterceptorFunc
UnaryConnectRequestHeadersAnnotator converts session cookies set in grpc metadata to context this requires decrypting the cookie and setting it as context
func (*SessionInterceptor) UnaryConnectResponseInterceptor ¶ added in v0.71.0
func (s *SessionInterceptor) UnaryConnectResponseInterceptor() connect.UnaryInterceptorFunc
UnaryConnectResponseInterceptor adds session cookie to response if session id is present in header
func (*SessionInterceptor) WrapStreamingClient ¶ added in v0.71.0
func (s *SessionInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc
func (*SessionInterceptor) WrapStreamingHandler ¶ added in v0.71.0
func (s *SessionInterceptor) WrapStreamingHandler(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc
Click to show internal directories.
Click to hide internal directories.