handler

package
v0.0.0-...-0250d0e Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthEvent

type AuthEvent struct {
	Version string `json:"version,omitempty"`
}

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func New

func New(meter metric.Meter, tracer trace.Tracer, service Service) (*Handler, error)

New creates a new Handler with the provided meter, tracer, and service.

func (*Handler) RouteEvent

RouteEvent routes the incoming event to the appropriate handler based on its version. It supports v1, v2, and WebSocket events.

type Service

type Service interface {
	ValidateToken(ctx context.Context, token string) bool
	GetPrincipalID() string
}

Service defines the interface for token validation.

Jump to

Keyboard shortcuts

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