Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var VotesThreshold float64 = 0.7
Functions ¶
func RandStringBytesRmndr ¶
Types ¶
type Hadi ¶
type Hadi struct {
ID int `json:"id" gorm:"primary_key"`
Name string `json:"name"`
Hypothesis string `json:"hypothesis"`
Action string `json:"action"`
Metric string `json:"metric"`
Effect string `json:"effect"`
Overall *int `json:"overall" gorm:"-"`
Complexity *int `json:"complexity" gorm:"-"`
Faith *int `json:"faith" gorm:"-"`
Votes []*Vote `json:"votes" gorm:"foreignKey:HadiID"`
UserID int
User *User `json:"user" gorm:"foreignKey:UserID"`
TeamID int
Team *Team `json:"team" gorm:"foreignKey:TeamID"`
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt *time.Time `sql:"index"`
}
type HadiRepository ¶
type Invite ¶
type LoginInput ¶
type Team ¶
type User ¶
type User struct {
ID int `json:"id" gorm:"primary_key"`
Nickname string `json:"nickname"`
Email string `json:"email"`
Secret string `gorm:"size:255"`
Password string
Salt string
Votes []*Vote `json:"votes" gorm:"foreignKey:UserID"`
Teams []*Team `json:"teams" gorm:"many2many:user_has_team;"`
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt *time.Time `sql:"index"`
}
func (*User) CheckPlainPassword ¶
func (*User) SetPlainPassword ¶
type VoteRepository ¶
func (*VoteRepository) GetOrCreateNew ¶
func (r *VoteRepository) GetOrCreateNew(user *User, hadi *Hadi) *Vote
Click to show internal directories.
Click to hide internal directories.