db

package
v0.0.0-...-a9c5b8f Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Config struct {
	Host     string `ini:"host"`
	Port     int    `ini:"port"`
	User     string `ini:"user"`
	Password string `ini:"password"`
	Name     string `ini:"name"`
}
View Source
var DB *gorm.DB

Functions

func Open

func Open()

Types

type Repository

type Repository struct {
	ID     int `gorm:"primary_key"`
	User   User
	UserID int
	Name   string
}

type User

type User struct {
	ID       int    `gorm:"primary_key"`
	Name     string `gorm:"unique;size:32"`
	IsGroup  bool
	Password string
}

Jump to

Keyboard shortcuts

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