//
pkg.gl
Category
github.com/gitwub5/go_todo_app
auth
package
0.0.0-20241123155345-3bf73386e864
Repository:
https://github.com/gitwub5/go_todo_app.git
Documentation:
pkg.go.dev
Overview
Versions
1
Dependencies
11
Dependents
3
Files
146 SLOC
#
Functions
GetRole
GetRole 함수는 context에서 권한을 가져옴.
GetUserID
GetUserID 함수는 context에서 사용자 ID를 가져옴.
IsAdmin
IsAdmin 함수는 context에서 권한을 가져와서 admin인지 확인.
NewJWTer
NewJWTer 함수는 JWTer 구조체를 초기화하는 생성자 함수.
SetRole
SetRole 함수는 context에 권한을 설정.
SetUserID
SetUserID 함수는 context에 사용자 ID를 설정.
#
Constants
RoleKey
No description provided by the author
UserNameKey
No description provided by the author
#
Structs
JWTer
JWTer 구조체는 JWT를 생성하고 검증할 때 사용하는 키와 스토어를 포함함.
#
Interfaces
Store
go:generate go run github.com/matryer/moq -out moq_test.go .