Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func CreateFact ¶
func CreateFact(fs FactStorer, f *Fact) error
Types ¶
type Fact ¶
type Fact struct { Id int64 Fact string Explain string ExplainFurther string AwaitModeration bool References []Reference Votes []Vote AccountId int64 CreatedAt nullables.NullTime EditedAt nullables.NullTime DeletedAt nullables.NullTime }
func (*Fact) ValidateReferences ¶
if the references are fine, no error will be returned this will also add "http://" to the urls if they do not begin with it or https:// or ftp://
type FactStorer ¶
type FactStorer interface { ListFacts(accountId int64, awaitModeration bool) ([]Fact, error) LoadFactFromId(id int64) (*Fact, error) DeleteFact(*Fact) error CreateFact(*Fact) error GetVoteForFact(accountId int64, factId int64) (*Vote, error) SaveVote(*Vote) error ModerateFact(f *Fact, enable bool) error }
Click to show internal directories.
Click to hide internal directories.