另客网go项目公用的代码库

123456789101112131415
  1. package auth
  2. import "time"
  3. type Session interface {
  4. // StoreJwtToken store jwt token is redis, make it expired for feature
  5. StoreJwtToken(key string, value string, timeout time.Duration) error
  6. // IsExistsJwtToken judge whether token is invalid
  7. IsExistsJwtToken(key string) bool
  8. // DeleteJwtToken delete jwt token
  9. DeleteJwtToken(key string) bool
  10. }