models

package
Version: v0.0.0-...-c350f69 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

DB - Postgres Db Handle

Functions

func InitDB

func InitDB(DbDriver, DbUser, DbPassword, DbPort, DbHost, DbName string) *gorm.DB

InitDB establishes postgres connection

Types

type Movie

type Movie struct {
	gorm.Model
	ID       uint   `json:"id" gorm:"primary_key"`
	Title    string `json:"title"`
	Director string `json:"director"`
	Genre    string `json:"genre"`
}

Movie Model for the Movie table

type MovieCollection

type MovieCollection struct {
	Movies []Movie
}

MovieCollection - A []Movie

var Archive *MovieCollection

Archive - MovieCollection Pointer

Jump to

Keyboard shortcuts

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