Documentation
¶
Index ¶
- Variables
- func Authenticate(session *mongo.Session, credential entity.LoginCredential) (entity.User, bool, error)
- func CheckPasswordHash(password, hash string) bool
- func FindNetworkByID(session *mongo.Session, ID bson.ObjectId) (entity.Network, error)
- func FindPodByID(session *mongo.Session, ID bson.ObjectId) (entity.Pod, error)
- func GenerateToken(userUUID string, role string) (string, error)
- func HashPassword(password string) (string, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
SecretKey = "linkernetworks"
)
SecreKey is not a real secret key. Using the linker option to replace
Functions ¶
func Authenticate ¶ added in v0.1.7
func Authenticate(session *mongo.Session, credential entity.LoginCredential) (entity.User, bool, error)
Authenticate is a user authenticate function
func FindNetworkByID ¶
func GenerateToken ¶ added in v0.1.7
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.