Documentation ¶
Index ¶
- Constants
- func EnsurePeriod(start time.Time, end time.Time) error
- func GetAuthFromRequest(r *http.Request) (*auth.Credential, error)
- func GetAuthUserFromContext(ctx context.Context) *auth.AuthenticatedUser
- func GetPageableFromContext(ctx context.Context) datastore.Pageable
- func InstrumentPath(path string) func(http.Handler) http.Handler
- func InstrumentRequests() func(next http.Handler) http.Handler
- func JsonResponse(next http.Handler) http.Handler
- func LogHttpRequest(a *types.APIOptions) func(next http.Handler) http.Handler
- func Pagination(next http.Handler) http.Handler
- func RequireAuth() func(next http.Handler) http.Handler
- func RequirePersonalAccessToken() func(next http.Handler) http.Handler
- func SetupCORS(next http.Handler) http.Handler
- func WriteRequestIDHeader(next http.Handler) http.Handler
- type AuthorizedLogin
Constants ¶
View Source
const (
AuthUserCtx types.ContextKey = "authUser"
)
Variables ¶
This section is empty.
Functions ¶
func GetAuthFromRequest ¶
func GetAuthFromRequest(r *http.Request) (*auth.Credential, error)
func GetAuthUserFromContext ¶
func GetAuthUserFromContext(ctx context.Context) *auth.AuthenticatedUser
func InstrumentPath ¶ added in v1.1.6
func InstrumentRequests ¶ added in v1.1.6
func LogHttpRequest ¶ added in v1.1.6
func RequirePersonalAccessToken ¶ added in v1.1.6
Types ¶
Click to show internal directories.
Click to hide internal directories.