Documentation ¶
Index ¶
- func AddEventHandler(streamService StreamService) echo.HandlerFunc
- func ApiNotFoundHandler(c echo.Context) error
- func AuthenticateHandler(jwtSignKey string) echo.HandlerFunc
- func DeleteEventsHandler(streamService StreamService) echo.HandlerFunc
- func GetDevicesHandler(streamService StreamService) echo.HandlerFunc
- func GetEnvVerbose(name string, sensitive bool) string
- func LoginCallbackHandler(validator IdTokenValidator, jwtSignKey string) echo.HandlerFunc
- func LoginPageHandler(gClientId, callbackUri string) echo.HandlerFunc
- func LogoutHandler() echo.HandlerFunc
- func NewAuthMiddleware(jwtSignKey string) echo.MiddlewareFunc
- func NewWebappServerMiddleware(bundleDir string) echo.MiddlewareFunc
- func ReadEventsHandler(streamService StreamService) echo.HandlerFunc
- func ResetStreamHandler(streamService StreamService) echo.HandlerFunc
- func RootHandler(c echo.Context) error
- func Start()
- type Device
- type Event
- type IdTokenValidator
- type RedisStreamConfig
- type Renderer
- type StreamService
- type TokenClaims
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddEventHandler ¶
func AddEventHandler(streamService StreamService) echo.HandlerFunc
func ApiNotFoundHandler ¶
func ApiNotFoundHandler(c echo.Context) error
func AuthenticateHandler ¶
func AuthenticateHandler(jwtSignKey string) echo.HandlerFunc
func DeleteEventsHandler ¶
func DeleteEventsHandler(streamService StreamService) echo.HandlerFunc
func GetDevicesHandler ¶
func GetDevicesHandler(streamService StreamService) echo.HandlerFunc
func GetEnvVerbose ¶
func LoginCallbackHandler ¶
func LoginCallbackHandler(validator IdTokenValidator, jwtSignKey string) echo.HandlerFunc
func LoginPageHandler ¶
func LoginPageHandler(gClientId, callbackUri string) echo.HandlerFunc
func LogoutHandler ¶
func LogoutHandler() echo.HandlerFunc
func NewAuthMiddleware ¶
func NewAuthMiddleware(jwtSignKey string) echo.MiddlewareFunc
func NewWebappServerMiddleware ¶
func NewWebappServerMiddleware(bundleDir string) echo.MiddlewareFunc
func ReadEventsHandler ¶
func ReadEventsHandler(streamService StreamService) echo.HandlerFunc
func ResetStreamHandler ¶
func ResetStreamHandler(streamService StreamService) echo.HandlerFunc
func RootHandler ¶
func RootHandler(c echo.Context) error
Types ¶
type IdTokenValidator ¶
type IdTokenValidator interface {
Validate(ctx context.Context, idToken string) (*idtoken.Payload, error)
}
func NewIdTokenValidator ¶
func NewIdTokenValidator(gClientId string) IdTokenValidator
type RedisStreamConfig ¶
type Renderer ¶
type Renderer struct {
// contains filtered or unexported fields
}
func NewRenderer ¶
func NewRenderer() *Renderer
type StreamService ¶
type StreamService interface { Add(ctx context.Context, stream string, event Event) (Event, error) Read(ctx context.Context, stream, lastId string) ([]Event, error) Delete(ctx context.Context, stream string, ids ...string) (int64, error) Reset(ctx context.Context, stream string) error AddDevice(ctx context.Context, stream string, device Device) (Device, error) AddFirstDevice(ctx context.Context, stream string, device Device) (Device, error) GetDevices(ctx context.Context, stream string) ([]Device, error) }
func NewRedisStreamService ¶
func NewRedisStreamService(client *redis.Client, config RedisStreamConfig) StreamService
type TokenClaims ¶
type TokenClaims struct { User jwt.RegisteredClaims }
Click to show internal directories.
Click to hide internal directories.