utils

package module
v0.0.0-...-7ae5cf1 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectMongoDB

func ConnectMongoDB() *mongo.Database

func ErrorHandler

func ErrorHandler(err error) bool

func GetIPAdress

func GetIPAdress(req *http.Request) (ip string, port string)

func IsExists

func IsExists(path string) bool

func VerifyOwnership

func VerifyOwnership(id primitive.ObjectID, auth_key string) bool

func WriteLog

func WriteLog(req *http.Request, message string)

func WriteResult

func WriteResult(req *http.Request, res http.ResponseWriter, data interface{}, message string)

Types

type Payload

type Payload struct {
	Message string      `json:"message"`
	Data    interface{} `json:"returned_data"`
}

Directories

Path Synopsis
controllers

Jump to

Keyboard shortcuts

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