models

package
v0.0.0-...-5227afc Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MongoConnection = connectionToDB()

MongoConnection connects with MongoDB

Functions

func CheckMongoDBConnection

func CheckMongoDBConnection() bool

CheckMongoDBConnection validates connection with DB

Types

type CreateLanguageInput

type CreateLanguageInput struct {
	Name    string `bson:"name" json:"name" binding:"required"`
	Creator string `bson:"creator" json:"creator" binding:"required"`
}

CreateLanguageInput handles creation of language-structure

type Language

type Language struct {
	ID      primitive.ObjectID `bson:"_id,omitempty" json:"id"`
	Name    string             `bson:"name" json:"name"`
	Creator string             `bson:"creator" json:"creator"`
}

Language handles language-model-structure

type UpdateLanguageInput

type UpdateLanguageInput struct {
	Name    string `bson:"name" json:"name"`
	Creator string `bson:"creator" json:"creator"`
}

UpdateLanguageInput handles updating of language-structure

Jump to

Keyboard shortcuts

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