Documentation
¶
Index ¶
- Variables
- func Authenticate(session *mongo.Session, credential entity.LoginCredential) (entity.User, bool, error)
- func FindDeploymentByName(session *mongo.Session, Name string) (entity.Deployment, error)
- func FindNetworkByID(session *mongo.Session, ID bson.ObjectId) (entity.Network, error)
- func FindPodByID(session *mongo.Session, ID bson.ObjectId) (entity.Pod, error)
- func FindUserByID(session *mongo.Session, ID bson.ObjectId) (entity.User, error)
- func GenerateToken(userID string, user entity.User) (string, error)
- func VerifyToken(tokenData []byte) bool
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 FindDeploymentByName ¶ added in v0.2.9
FindDeploymentByName will find deployment by name
func FindNetworkByID ¶
FindNetworkByID is function for finding network by ID
func FindPodByID ¶
FindPodByID will find pod by ID
func FindUserByID ¶ added in v0.2.0
func GenerateToken ¶ added in v0.1.7
GenerateToken is for generating token
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.