controllers

package
v0.0.0-...-9d902f9 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2019 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthClient

func AuthClient(c *gin.Context) string

Returns Client of the logged in user

func AuthId

func AuthId(c *gin.Context) (primitive.ObjectID, error)

Returns ObjectId of logged in user

func AuthInit

func AuthInit()

AuthInit initializes authentication

func AuthUser

func AuthUser(c *gin.Context) (types.User, error)

Returns logged in user

func GetCredentials

func GetCredentials(c *gin.Context)

GetCredentials sends client credentials

func GetToken

func GetToken(c *gin.Context)

GetToken sends accecc_token

func Greet

func Greet(c *gin.Context)

Greet is the response for api/v1

func Register

func Register(c *gin.Context)

register

func Verify

func Verify(c *gin.Context)

Verify accessToken with client

Types

type Welcome

type Welcome struct {
	Greet    string `json:"greet"`
	Doc      string `json:"link_to_doc"`
	Github   string `json:"github"`
	Examples string `json:"examples"`
}

Welcome !! The content below is only a placeholder and can be replaced.

Jump to

Keyboard shortcuts

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