middleware

package
v0.0.0-...-9f60fe2 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2023 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAccountIDFromContext

func GetAccountIDFromContext(ctx context.Context) string

func GetExecIDFromContext

func GetExecIDFromContext(ctx context.Context) string

func GetProjectIDFromContext

func GetProjectIDFromContext(ctx context.Context) string

func GetUserIDFromContext

func GetUserIDFromContext(ctx context.Context) string

func SetAccountIDInContext

func SetAccountIDInContext(ctx context.Context, aid string) context.Context

func SetExecIDInContext

func SetExecIDInContext(ctx context.Context, execID string) context.Context

func SetProjectIDInContext

func SetProjectIDInContext(ctx context.Context, projectID string) context.Context

func SetUserIDInContext

func SetUserIDInContext(ctx context.Context, aid string) context.Context

func WithAccountCtx

func WithAccountCtx(next http.Handler) http.Handler

WithAccountCtx is a helper middleware that fakes an authenticated account. It should only be user for development or when self-hosting.

func WithExecCtx

func WithExecCtx(next http.Handler) http.Handler

WithExecCtx is a helper middleware that parsed the session id from the url and verifies it exists in the db.

func WithProjectCtx

func WithProjectCtx(next http.Handler) http.Handler

WithProjectCtx is a helper middleware that parsed the project id from the url and verifies it exists in the db.

Types

This section is empty.

Jump to

Keyboard shortcuts

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