backend

package
v0.3.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

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

func FindDeploymentByName(session *mongo.Session, Name string) (entity.Deployment, error)

FindDeploymentByName will find deployment by name

func FindNetworkByID

func FindNetworkByID(session *mongo.Session, ID bson.ObjectId) (entity.Network, error)

FindNetworkByID is function for finding network by ID

func FindPodByID

func FindPodByID(session *mongo.Session, ID bson.ObjectId) (entity.Pod, error)

FindPodByID will find pod by ID

func FindUserByID added in v0.2.0

func FindUserByID(session *mongo.Session, ID bson.ObjectId) (entity.User, error)

func GenerateToken added in v0.1.7

func GenerateToken(userID string, user entity.User) (string, error)

GenerateToken is for generating token

func VerifyToken added in v0.2.0

func VerifyToken(tokenData []byte) bool

VerifyToken is for verifing the JWT

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL