Documentation ¶
Index ¶
- type CheckIn
- type Geolocation
- type Marker
- type MarkerCollection
- type MarkerRepo
- type MarkerResource
- type Skill
- type SkillCategory
- type SkillCategoryCollection
- type SkillCategoryRepo
- type SkillCategoryResource
- type SkillCollection
- type SkillRepo
- type SkillTemp
- type SkillTempCategory
- type SkillTempCategoryCollection
- type User
- type UserCollection
- type UserF
- type UserRepo
- func (r *UserRepo) All() (UserCollection, error)
- func (r *UserRepo) Authenticate(user User) (UserResource, error)
- func (r *UserRepo) Create(user *User) error
- func (r *UserRepo) Delete(id string) error
- func (r *UserRepo) Find(id string) (UserResource, error)
- func (r *UserRepo) GetByIds(ids []bson.ObjectId) (UserCollection, error)
- func (r *UserRepo) GetFByIds(ids []bson.ObjectId) ([]UserF, error)
- func (r *UserRepo) GetFollowers(id bson.ObjectId) ([]UserF, error)
- func (r *UserRepo) Unfollow(userId bson.ObjectId, unfollowId bson.ObjectId) error
- func (r *UserRepo) Update(user *User) error
- func (r *UserRepo) UserAlreadyExists(username string) (bool, error)
- type UserResource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Geolocation ¶
type Marker ¶
type Marker struct { Id bson.ObjectId `json:"id,omitempty" bson:"_id,omitempty"` Geolocation Geolocation `json:"geolocation,omitempty"` Name string `json:"name,omitempty"` Address string `json:"address,omitempty"` Website string `json:"website,omitempty"` Kind int `json:"kind,omitempty"` Else string `json:"else,omitempty"` Author string `json:"author,omitempty"` CheckIns []CheckIn `json:"checkins,omitempty"` }
type MarkerCollection ¶
type MarkerCollection struct {
Data []Marker `json:"data"`
}
type MarkerRepo ¶
type MarkerRepo struct {
Coll *mgo.Collection
}
func (*MarkerRepo) All ¶
func (r *MarkerRepo) All(lat string, lng string, km string) (MarkerCollection, error)
func (*MarkerRepo) Create ¶
func (r *MarkerRepo) Create(marker *Marker) error
func (*MarkerRepo) Delete ¶
func (r *MarkerRepo) Delete(id string) error
func (*MarkerRepo) Find ¶
func (r *MarkerRepo) Find(id string) (MarkerResource, error)
func (*MarkerRepo) Update ¶
func (r *MarkerRepo) Update(marker *Marker) error
type MarkerResource ¶
type MarkerResource struct {
Data Marker `json:"data"`
}
type SkillCategory ¶
type SkillCategoryCollection ¶
type SkillCategoryCollection struct {
Data []SkillCategory `json:"data"`
}
type SkillCategoryRepo ¶
type SkillCategoryRepo struct {
Coll *mgo.Collection
}
func (*SkillCategoryRepo) All ¶
func (r *SkillCategoryRepo) All(lang string) (SkillCategoryCollection, error)
func (*SkillCategoryRepo) GetById ¶
func (r *SkillCategoryRepo) GetById(id bson.ObjectId, lang string) (SkillCategoryResource, error)
type SkillCategoryResource ¶
type SkillCategoryResource struct {
Data SkillTempCategory `json:"data"`
}
type SkillCollection ¶
type SkillCollection struct {
Data []SkillTemp `json:"data"`
}
type SkillTempCategory ¶
type SkillTempCategoryCollection ¶
type SkillTempCategoryCollection struct {
Data []SkillTempCategory `json:"data"`
}
type User ¶
type User struct { Id bson.ObjectId `json:"id,omitempty" bson:"_id,omitempty"` Username string `bson:"username,omitempty" json:"username,omitempty"` FirstName string `bson:"firstname,omitempty" json:"firstname,omitempty"` LastName string `bson:"lastname,omitempty" json:"lastname,omitempty"` Email string `bson:"email,omitempty" json:"email,omitempty"` Verified bool `bson:"verified,omitempty" json:"verified,omitempty"` Facebook bool `bson:"facebook,omitempty" json:"facebook,omitempty"` ShowEmail bool `bson:"showEmail,omitempty" json:"showEmail,omitempty"` Password string `json:"password,omitempty"` //only used for parsing incoming json FacebookId string `bson:"facebookid,omitempty" json:"facebookid,omitempty"` Hash string `bson:"hash,omitempty"` Salt string `bson:"salt,omitempty"` Created time.Time `bson:"created,omitempty" json:"created,omitempty"` Updated time.Time `bson:"updated,omitempty" json:"updated,omitempty"` UrlToken string `bson:"urltoken,omitempty" json:"urltoken,omitempty"` About string `bson:"about,omitempty" json:"about,omitempty"` FollowInfo []UserF `bson:"followinfo,omitempty" json:"followinfo,omitempty"` FollowedInfo []UserF `bson:"followedinfo,omitempty" json:"followedinfo,omitempty"` Image string `bson:"image,omitempty" json:"image,omitempty"` // TODO: make bson object objects id better... Skills []bson.ObjectId `bson:"skills,omitempty" json:"skills,omitempty"` Following []bson.ObjectId `bson:"following,omitempty" json:"following,omitempty"` }
type UserCollection ¶
type UserCollection struct {
Data []User `json:"data"`
}
type UserF ¶
type UserF struct { Id bson.ObjectId `json:"id,omitempty" bson:"_id,omitempty"` Username string `bson:"username,omitempty" json:"username,omitempty"` FirstName string `bson:"firstname,omitempty" json:"firstname,omitempty"` LastName string `bson:"lastname,omitempty" json:"lastname,omitempty"` FacebookId string `bson:"facebookid,omitempty" json:"facebookid,omitempty"` Image string `bson:"image,omitempty" json:"image,omitempty"` }
type UserRepo ¶
type UserRepo struct {
Coll *mgo.Collection
}
func (*UserRepo) All ¶
func (r *UserRepo) All() (UserCollection, error)
func (*UserRepo) Authenticate ¶
func (r *UserRepo) Authenticate(user User) (UserResource, error)
func (*UserRepo) GetByIds ¶
func (r *UserRepo) GetByIds(ids []bson.ObjectId) (UserCollection, error)
type UserResource ¶
type UserResource struct {
Data User `json:"data"`
}
Click to show internal directories.
Click to hide internal directories.