models

package
v0.0.0-...-b5b9809 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2016 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	UserList map[string]*User
)

Functions

func AddUser

func AddUser(u User) string

func DeleteUser

func DeleteUser(uid string)

func GetAllUsers

func GetAllUsers() map[string]*User

func Login

func Login(username, password string) bool

Types

type Profile

type Profile struct {
	Gender  string
	Age     int
	Address string
	Email   string
}

type Study

type Study struct {
	Id            bson.ObjectId `json:"id" bson:"_id,omitempty"` // Mongodb _id
	Title         string        `json:"Title,omitempty" bson:"Title,omitempty"`
	UniversalID   string        `json:"UniversalID,omitempty" bson:"UniversalID,omitempty"`
	Abstract      string        `json:"Abstract,omitempty" bson:"Abstract,omitempty"`
	StudyType     string        `json:"StudyType,omitempty" bson:"StudyType,omitempty"`
	Description   string        `json:"Description,omitempty" bson:"Description,omitempty"`
	CenterName    string        `json:"CenterName,omitempty" bson:"CenterName,omitempty"`
	Organism      string        `json:"Organism,omitempty" bson:"Organism,omitempty"`
	Owner         string        `json:"Owner,omitempty" bson:"Owner,omitempty"`
	DeleteFlag    bool          `json:"DeleteFlag,omitempty" bson:"DeleteFlag,omitempty"`
	CreateTime    time.Time     `json:"CreateTime,omitempty" bson:"CreateTime,omitempty"`
	CreateTimeRaw string        `json:"CreateTimeRaw,omitempty" bson:"CreateTimeRaw,omitempty"`
}

func GetAllStudy

func GetAllStudy() []Study

type Submission

type Submission struct {
	Id            bson.ObjectId `json:"id" bson:"_id,omitempty"` // Mongodb _id
	Title         string        `json:"Title,omitempty" bson:"Title,omitempty"`
	UniversalID   string        `json:"UniversalID,omitempty" bson:"UniversalID,omitempty"`
	Abstract      string        `json:"Abstract,omitempty" bson:"Abstract,omitempty"`
	StudyType     string        `json:"StudyType,omitempty" bson:"StudyType,omitempty"`
	Description   string        `json:"Description,omitempty" bson:"Description,omitempty"`
	CenterName    string        `json:"CenterName,omitempty" bson:"CenterName,omitempty"`
	Organism      string        `json:"Organism,omitempty" bson:"Organism,omitempty"`
	Owner         string        `json:"Owner,omitempty" bson:"Owner,omitempty"`
	DeleteFlag    bool          `json:"DeleteFlag,omitempty" bson:"DeleteFlag,omitempty"`
	CreateTime    time.Time     `json:"CreateTime,omitempty" bson:"CreateTime,omitempty"`
	CreateTimeRaw string        `json:"CreateTimeRaw,omitempty" bson:"CreateTimeRaw,omitempty"`
}

func GetAllSubmission

func GetAllSubmission() []Submission

type User

type User struct {
	Id       string
	Username string
	Password string
	Profile  Profile
}

func GetUser

func GetUser(uid string) (u *User, err error)

func UpdateUser

func UpdateUser(uid string, uu *User) (a *User, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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