Versions in this module Expand all Collapse all v0 v0.10.0 Mar 4, 2019 Changes in this version + const LIMIT + const SolidStatisticID + type Statistic struct + Count int64 + CreatedAt time.Time + Name string + StatisticID string + UpdatedAt time.Time type User + func ReadUsersByIds(ctx context.Context, ids []string) ([]*User, error) v0.9.0 Feb 4, 2019 Changes in this version + type Category struct + Alias string + CategoryID string + CreatedAt time.Time + Description string + LastTopicID sql.NullString + Name string + Position int + TopicsCount int + UpdatedAt time.Time + func CreateCategory(ctx context.Context, name, alias, description string, position int) (*Category, error) + func ElevateCategory(ctx context.Context, id string) (*Category, error) + func ReadCategories(ctx context.Context) ([]*Category, error) + func ReadCategory(ctx context.Context, id string) (*Category, error) + func UpdateCategory(ctx context.Context, id, name, alias, description string, position int) (*Category, error) + func (c *Category) BeforeInsert(db orm.DB) error + func (c *Category) BeforeUpdate(db orm.DB) error + func (category *Category) ReadTopics(ctx context.Context, offset time.Time) ([]*Topic, error) + type Comment struct + Body string + CommentID string + CreatedAt time.Time + Score int + TopicID string + UpdatedAt time.Time + User *User + UserID string + func (c *Comment) BeforeInsert(db orm.DB) error + func (c *Comment) BeforeUpdate(db orm.DB) error + type GithubUser struct + Email string + Login string + Name string + NodeID string + type Session struct + CreatedAt time.Time + Secret string + SessionID string + UserID string + type Topic struct + Body string + Category *Category + CategoryID string + CommentsCount int + CreatedAt time.Time + Score int + Title string + TopicID string + UpdatedAt time.Time + User *User + UserID string + func ReadTopic(ctx context.Context, id string) (*Topic, error) + func ReadTopics(ctx context.Context, offset time.Time) ([]*Topic, error) + func (t *Topic) BeforeInsert(db orm.DB) error + func (t *Topic) BeforeUpdate(db orm.DB) error + func (topic *Topic) ReadComments(ctx context.Context, offset time.Time) ([]*Comment, error) + type User struct + Biography string + CreatedAt time.Time + Email sql.NullString + EncryptedPassword sql.NullString + GithubID sql.NullString + Nickname string + SessionID string + UpdatedAt time.Time + UserID string + Username string + func AuthenticateUser(ctx context.Context, tokenString string) (*User, error) + func CreateGithubUser(ctx context.Context, code, sessionSecret string) (*User, error) + func CreateSession(ctx context.Context, identity, password, sessionSecret string) (*User, error) + func CreateUser(ctx context.Context, email, username, nickname, biography, password string, ...) (*User, error) + func ReadUser(ctx context.Context, id string) (*User, error) + func ReadUserByUsernameOrEmail(ctx context.Context, identity string) (*User, error) + func ReadUsers(ctx context.Context, offset time.Time) ([]*User, error) + func (user *User) BeforeInsert(db orm.DB) error + func (user *User) BeforeUpdate(db orm.DB) error + func (user *User) CreateComment(ctx context.Context, topicID, body string) (*Comment, error) + func (user *User) CreateTopic(ctx context.Context, title, body, categoryID string) (*Topic, error) + func (user *User) DeleteComment(ctx context.Context, id string) error + func (user *User) Name() string + func (user *User) ReadComment(ctx context.Context, id string) (*Comment, error) + func (user *User) ReadComments(ctx context.Context, offset time.Time) ([]*Comment, error) + func (user *User) ReadTopics(ctx context.Context, offset time.Time) ([]*Topic, error) + func (user *User) Role() string + func (user *User) UpdateComment(ctx context.Context, id, body string) (*Comment, error) + func (user *User) UpdateProfile(ctx context.Context, nickname, biography string) error + func (user *User) UpdateTopic(ctx context.Context, id, title, body, categoryID string) (*Topic, error)