Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Image ¶
type Image struct { Name string `json:"name" bson:"name,omitempty"` Type string `json:"type" bson:"type,omitempty"` Size int64 `json:"size" bson:"size,omitempty"` Width int `json:"width" bson:"width,omitempty"` Height int `json:"height" bson:"height,omitempty"` }
Image ...
type Profile ¶
type Profile struct { ID bson.ObjectId `json:"id" bson:"_id,omitempty"` UserName string `json:"username" bson:"username,omitempty"` Level string `json:"level" bson:"level,omitempty"` Rings int32 `json:"rings" bson:"rings,omitempty"` About string `json:"about" bson:"about,omitempty"` ProfileImage Image `json:"profileImage" bson:"profile_image,omitempty"` BackgroundImage Image `json:"backgroundImage" bson:"background_image,omitempty"` Followers []bson.ObjectId `json:"followers" bson:"followers,omitempty"` Following []bson.ObjectId `json:"following" bson:"following,omitempty"` DateLastUpdated time.Time `json:"dateLastUpdated" bson:"date_last_updated,omitempty"` }
Profile ...
func NewProfile ¶
func NewProfile(username, level, about string, followers []string, following []string, rings int32) *Profile
NewProfile creates a new Profile!
func ProfileFromContext ¶
ProfileFromContext gets profile from context
func ProfileMustFromContext ¶
ProfileMustFromContext gets profile from context. if can't make panic
Click to show internal directories.
Click to hide internal directories.