db

package
v0.0.0-...-dd2d8c9 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2015 License: MIT Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *db.DB
View Source
var Fittings *db.Col
View Source
var SDE sde.SDE
View Source
var Users *db.Col

Functions

func GetCleanFitID

func GetCleanFitID() int

func GetFitDocFromID

func GetFitDocFromID(ID int) int

func NewFit

func NewFit(username string, TypeID int) (int, error)

func NewUser

func NewUser(username, password, userlevel string) error

func PassHashFunc

func PassHashFunc(password string) string

func SetNames

func SetNames()

func UnMapFit

func UnMapFit(f Fit) map[string]interface{}

Types

type Fit

type Fit struct {
	TypeID         int
	HighSlot1      int
	HighSlot2      int
	HighSlot3      int
	HighSlot4      int
	HighSlot5      int
	LowSlot1       int
	LowSlot2       int
	LowSlot3       int
	LowSlot4       int
	LowSlot5       int
	WeaponSlot1    int
	WeaponSlot2    int
	WeaponSlot3    int
	EquipmentSlot1 int
	EquipmentSlot2 int
	EquipmentSlot3 int
	EquipmentSlot4 int
	Owner          string
	FitID          int
	Name           string
	SDEType        sde.SDEType
}

func GetAllFits

func GetAllFits() []Fit

func GetFitFromDB

func GetFitFromDB(ID int) (Fit, error)

func GetFitsFromUsername

func GetFitsFromUsername(username string) []Fit

func MapFit

func MapFit(data map[string]interface{}) Fit

type User

type User struct {
	Username  string
	PassHash  string
	UserLevel string
}

func GetUsersOrdered

func GetUsersOrdered() []User

func MapUser

func MapUser(data map[string]interface{}) User

func VerifyCredientials

func VerifyCredientials(username, password string) (User, bool)

func VerifyCredientialsHash

func VerifyCredientialsHash(username, password string) (User, bool)

Jump to

Keyboard shortcuts

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