gitee.com/woood2/luca@v1.0.4/internal/service/acl.go (about) 1 package service 2 3 import ( 4 "context" 5 "gitee.com/woood2/luca/internal/errcode" 6 ) 7 8 func CheckToken(ctx context.Context, token string) error { 9 if token == "hi" { 10 return nil 11 } 12 return errcode.InvalidToken 13 } 14 15 func CheckPerm(ctx context.Context, uid int, perm string) (bool, error) { 16 return true, nil 17 }