Documentation ¶
Index ¶
- Constants
- func DecayScores(s gorp.SqlExecutor) error
- func ErrorFromMap(errMap map[string]error) error
- func ListenToFeeds(s gorp.SqlExecutor) error
- func ValidateToken(s gorp.SqlExecutor, memberID int64, token string) error
- type Category
- type CategoryMember
- type Community
- func (c *Community) Delete()
- func (c *Community) PostGet(s gorp.SqlExecutor) error
- func (c *Community) PreInsert(s gorp.SqlExecutor) error
- func (c *Community) PreUpdate(s gorp.SqlExecutor) error
- func (c *Community) TableId() int64
- func (c *Community) TableName() string
- func (c *Community) Validate() error
- type FacebookLikes
- type FacebookPhoto
- type FacebookPost
- type FacebookPosts
- type Feed
- func (f *Feed) Delete()
- func (f *Feed) PostGet(s gorp.SqlExecutor) error
- func (f *Feed) PreInsert(s gorp.SqlExecutor) error
- func (f *Feed) PreUpdate(s gorp.SqlExecutor) error
- func (f *Feed) TableId() int64
- func (f *Feed) TableName() string
- func (f *Feed) UpdateStories(s gorp.SqlExecutor) error
- func (f *Feed) Validate() error
- type FeedType
- type Member
- func (m *Member) Delete()
- func (m *Member) HasPassword(password string) bool
- func (m *Member) HashtagsSlice() []string
- func (m *Member) ImagesSlice() []string
- func (m *Member) Invite(email string) error
- func (m *Member) LocationCoords() []float64
- func (m *Member) PostGet(s gorp.SqlExecutor) error
- func (m *Member) PreInsert(s gorp.SqlExecutor) error
- func (m *Member) PreUpdate(s gorp.SqlExecutor) error
- func (m *Member) ResetPassword() error
- func (m *Member) SetHashtags(s []string)
- func (m *Member) SetImages(s []string)
- func (m *Member) SetPassword(p *Password)
- func (m *Member) TableId() int64
- func (m *Member) TableName() string
- func (m *Member) Validate() error
- type Password
- type Story
- func (story *Story) CalculateScore(s gorp.SqlExecutor) error
- func (story *Story) Delete()
- func (story *Story) HashtagsSlice() []string
- func (story *Story) ImagesSlice() []string
- func (story *Story) LinksSlice() []string
- func (story *Story) LocationCoords() []float64
- func (story *Story) PostGet(s gorp.SqlExecutor) error
- func (story *Story) PostInsert(s gorp.SqlExecutor) error
- func (story *Story) PreInsert(s gorp.SqlExecutor) error
- func (story *Story) PreUpdate(s gorp.SqlExecutor) error
- func (story *Story) TableId() int64
- func (story *Story) TableName() string
- func (story *Story) Validate() error
- type Token
Constants ¶
View Source
const ( ObjectNameCategory = "Category" TableNameCategory = "categories" )
View Source
const ( ObjectNameCommunity = "Community" TableNameCommunity = "communities" RegistrationPolicyOpen = "open" RegistrationPolicyClosed = "closed" )
View Source
const ( ObjectNameFeed = "Feed" TableNameFeed = "feeds" )
View Source
const ( ObjectNameMember = "Member" TableNameMember = "members" )
View Source
const ( ObjectNameStory = "Story" TableNameStory = "stories" )
View Source
const ( ModelNameToken = "Token" TableNameToken = "tokens" )
View Source
const (
TableNameCategoryMember = "category_members"
)
Variables ¶
This section is empty.
Functions ¶
func DecayScores ¶
func DecayScores(s gorp.SqlExecutor) error
func ErrorFromMap ¶
func ListenToFeeds ¶
func ListenToFeeds(s gorp.SqlExecutor) error
func ValidateToken ¶
func ValidateToken(s gorp.SqlExecutor, memberID int64, token string) error
Types ¶
type Category ¶
type CategoryMember ¶
func NewCategoryMember ¶
func NewCategoryMember(categoryID, memberID int64) *CategoryMember
type Community ¶
type Community struct { ID int64 `json:"id"` Created int64 `json:"created" val:"nonzero"` Updated int64 `json:"updated" val:"nonzero"` Deleted bool `json:"deleted" merge:"true"` Object string `db:"-" json:"object"` Name string `json:"name" val:"nonzero" merge:"true"` Description string `json:"description" val:"nonzero"` RegistrationPolicy string `json:"registrationPolicy" val:"in(open,closed)"` Latitude float64 `json:"-" val:"lat"` Longitude float64 `json:"-" val:"lon"` Location []float64 `db:"-" json:"location" merge:"true"` }
type FacebookLikes ¶
type FacebookLikes struct {
Data []interface{}
}
type FacebookPhoto ¶
type FacebookPost ¶
type FacebookPosts ¶
type FacebookPosts struct {
Data []*FacebookPost
}
type Feed ¶
type Feed struct { ID int64 `json:"id"` Created int64 `json:"created" val:"nonzero"` Updated int64 `json:"updated" val:"nonzero"` Deleted bool `json:"deleted" merge:"true"` Object string `db:"-" json:"object"` MemberID int64 `json:"memberId" val:"nonzero" merge:"true"` Type string `json:"type" val:"in(twitter,facebook,rss)" merge:"true"` Identifier string `json:"identifier" val:"nonzero" merge:"true"` LastRetrieved int64 `json:"-"` }
func (*Feed) UpdateStories ¶
func (f *Feed) UpdateStories(s gorp.SqlExecutor) error
type Member ¶
type Member struct { ID int64 `json:"id"` Created int64 `json:"created" val:"nonzero"` Updated int64 `json:"updated" val:"nonzero"` Deleted bool `json:"deleted" merge:"true"` Object string `db:"-" json:"object"` // auth user Email string `json:"email" merge:"true"` Organizer bool `json:"-"` Token string `db:"-" json:"token,omitempty"` Password string `db:"-" json:"password,omitempty"` PasswordHash string `json:"-"` // member Name string `json:"name" val:"nonzero" merge:"true"` Address string `json:"address" merge:"true"` Phone string `json:"phone" merge:"true"` Description string `json:"description" merge:"true"` Icon string `json:"icon" merge:"true"` Website string `json:"website" merge:"true"` Latitude float64 `json:"-" merge:"true"` Longitude float64 `json:"-" merge:"true"` ImagesRaw string `json:"-"` CategoryIds []int64 `db:"-" json:"categoryIds"` Images []string `db:"-" json:"images"` Location []float64 `db:"-" json:"location"` }
func AuthenticateMember ¶
func AuthenticateMember(s gorp.SqlExecutor, email, password string) (*Member, error)
func FindMember ¶
func FindMember(s gorp.SqlExecutor, email string) (*Member, error)
func (*Member) HasPassword ¶
func (*Member) HashtagsSlice ¶
func (*Member) ImagesSlice ¶
func (*Member) LocationCoords ¶
func (*Member) ResetPassword ¶
func (*Member) SetHashtags ¶
func (*Member) SetPassword ¶
type Password ¶
type Password struct {
// contains filtered or unexported fields
}
func NewAutoPassword ¶
func NewAutoPassword() *Password
func NewPassword ¶
type Story ¶
type Story struct { ID int64 `json:"id"` Created int64 `json:"created" val:"nonzero"` Updated int64 `json:"updated" val:"nonzero"` Deleted bool `json:"deleted" merge:"true"` Object string `db:"-" json:"object"` MemberID int64 `json:"memberId" val:"nonzero"` MemberName string `json:"memberName"` FeedID int64 `json:"feedId" val:"nonzero"` FeedIdentifier string `json:"feedIdentifier"` FeedType string `json:"feedType"` Timestamp int64 `json:"timestamp"` Body string `json:"body"` SourceURL string `json:"sourceUrl"` SourceID string `json:"sourceId"` Score float64 `json:"score"` Latitude float64 `json:"-"` Longitude float64 `json:"-"` LinksRaw string `json:"-"` ImagesRaw string `json:"-"` LastDecayTimestamp int64 `json:"-"` CategoryIds []int64 `db:"-" json:"categoryIds"` Links []string `db:"-" json:"links"` Images []string `db:"-" json:"images"` Location []float64 `db:"-" json:"location"` MemberIcon string `db:"-" json:"memberIcon"` }
func NewFacebookStory ¶
func NewFacebookStory(member *Member, feed *Feed, post *FacebookPost) *Story
func NewStoryRSS ¶
func NewStoryTwitter ¶
func (*Story) CalculateScore ¶
func (story *Story) CalculateScore(s gorp.SqlExecutor) error
func (*Story) HashtagsSlice ¶
func (*Story) ImagesSlice ¶
func (*Story) LinksSlice ¶
func (*Story) LocationCoords ¶
func (*Story) PostInsert ¶
func (story *Story) PostInsert(s gorp.SqlExecutor) error
type Token ¶
type Token struct { ID int64 `json:"id"` Created int64 `json:"created" val:"nonzero"` Updated int64 `json:"updated" val:"nonzero"` Deleted bool `json:"deleted" merge:"true"` ModelName string `db:"-" json:"modelName"` MemberID int64 `json:"memberId" val:"nonzero"` Value string `json:"value" val:"nonzero"` Expiration int64 `json:"expirationTimestamp" val:"nonzero"` }
Click to show internal directories.
Click to hide internal directories.