Versions in this module Expand all Collapse all v0 v0.1.2 Feb 18, 2025 Changes in this version + type Groups []string + func (groups Groups) Test(rule func(*rules), more ...Rule) bool + type HasGroups interface + GetGroups func() Groups + type HasUser interface + GetUser func() *UserType + type Middleware struct + Client MiddlewareAPIClient + ClientOptions []func(*dynamodb.Options) + CookieName string + SessionContextKey string + UserContextKey string + func New[SessionType HasUser[UserType], UserType HasGroups](client MiddlewareAPIClient, optFns ...func(*Middleware[SessionType, UserType])) *Middleware[SessionType, UserType] + func (m *Middleware[SessionType, UserType]) RequireAuthentication() gin.HandlerFunc + func (m *Middleware[SessionType, UserType]) RequireAuthorisation(rule Rule, more ...Rule) gin.HandlerFunc + func (m *Middleware[SessionType, UserType]) RequireSession() gin.HandlerFunc + type MiddlewareAPIClient interface + GetItem func(ctx context.Context, params *dynamodb.GetItemInput, ...) (*dynamodb.GetItemOutput, error) + type Rule func(*rules) + func AllOf(group string, more ...string) Rule + func OneOf(first, second string, more ...string) Rule