Documentation ¶
Index ¶
- func CreateUserIDToken(key []byte, userID string) (string, error)
- func ForContext(ctx context.Context) *ent.Admin
- func GinMiddleware(conn *storage.Conn, key []byte) gin.HandlerFunc
- func Init(ctx context.Context, admins []User, store *storage.Conn) error
- func Middleware(conn *storage.Conn, key []byte) func(http.Handler) http.Handler
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateUserIDToken ¶
CreateUserIDToken ForContext finds the user from the context. REQUIRES Middleware to have run.
func ForContext ¶
ForContext finds the user from the context. REQUIRES Middleware to have run.
func GinMiddleware ¶
func GinMiddleware(conn *storage.Conn, key []byte) gin.HandlerFunc
GinMiddleware decodes the share session cookie and packs the session into context
Types ¶
Click to show internal directories.
Click to hide internal directories.