Documentation ¶
Index ¶
- Variables
- func AttachForum(guildID, fid int) error
- func BuildGuildURL(slug string, id int) string
- func CommonAreaWidgets(header *c.Header)
- func ForumCheck(args ...interface{}) (skip bool, rerr c.RouteError)
- func GuildWidgets(header *c.Header, guildItem *Guild) (success bool)
- func MiddleViewGuild(w http.ResponseWriter, r *http.Request, user *c.User) c.RouteError
- func PreRenderViewForum(w http.ResponseWriter, r *http.Request, user *c.User, data interface{}) (halt bool)
- func PrebuildTmplList(user *c.User, h *c.Header) c.CTmpl
- func RouteCreateGuild(w http.ResponseWriter, r *http.Request, user *c.User) c.RouteError
- func RouteCreateGuildSubmit(w http.ResponseWriter, r *http.Request, user *c.User) c.RouteError
- func RouteGuildList(w http.ResponseWriter, r *http.Request, user *c.User) c.RouteError
- func RouteMemberList(w http.ResponseWriter, r *http.Request, user *c.User) c.RouteError
- func TopicCreatePreLoop(args ...interface{}) interface{}
- func TrowAssign(args ...interface{}) interface{}
- func UnattachForum(fid int) error
- func Widgets(args ...interface{}) interface{}
- type Guild
- type GuildStore
- type ListPage
- type Member
- type MemberListPage
- type Page
- type SQLGuildStore
Constants ¶
This section is empty.
Variables ¶
View Source
var AddMemberStmt *sql.Stmt
View Source
var AttachForumStmt *sql.Stmt
View Source
var GetMemberStmt *sql.Stmt
View Source
var ListStmt *sql.Stmt
View Source
var MemberListJoinStmt *sql.Stmt
View Source
var MemberListStmt *sql.Stmt
View Source
var UnattachForumStmt *sql.Stmt
Functions ¶
func AttachForum ¶
func BuildGuildURL ¶
func CommonAreaWidgets ¶
TODO: Do this properly via the widget system TODO: REWRITE THIS
func ForumCheck ¶
func ForumCheck(args ...interface{}) (skip bool, rerr c.RouteError)
TODO: Add privacy options TODO: Add support for multiple boards and add per-board simplified permissions TODO: Take js into account for routes which expect JSON responses
func GuildWidgets ¶
TODO: Do this properly via the widget system TODO: Make a better more customisable group widget system
func MiddleViewGuild ¶
func MiddleViewGuild(w http.ResponseWriter, r *http.Request, user *c.User) c.RouteError
func PreRenderViewForum ¶
func PreRenderViewForum(w http.ResponseWriter, r *http.Request, user *c.User, data interface{}) (halt bool)
TODO: Prebuild this template
func RouteCreateGuild ¶
func RouteCreateGuild(w http.ResponseWriter, r *http.Request, user *c.User) c.RouteError
func RouteCreateGuildSubmit ¶
func RouteCreateGuildSubmit(w http.ResponseWriter, r *http.Request, user *c.User) c.RouteError
func RouteGuildList ¶
func RouteGuildList(w http.ResponseWriter, r *http.Request, user *c.User) c.RouteError
func RouteMemberList ¶
func RouteMemberList(w http.ResponseWriter, r *http.Request, user *c.User) c.RouteError
func TopicCreatePreLoop ¶
func TopicCreatePreLoop(args ...interface{}) interface{}
TODO: It would be nice, if you could select one of the boards in the group from that drop-down rather than just the one you got linked from
func TrowAssign ¶
func TrowAssign(args ...interface{}) interface{}
func UnattachForum ¶
Types ¶
type Guild ¶
type Guild struct { ID int Link string Name string Desc string Active bool Privacy int /* 0: Public, 1: Protected, 2: Private */ // Who should be able to accept applications and create invites? Mods+ or just admins? Mods is a good start, we can ponder over whether we should make this more flexible in the future. Joinable int /* 0: Private, 1: Anyone can join, 2: Applications, 3: Invite-only */ MemberCount int Owner int Backdrop string CreatedAt string LastUpdateTime string MainForumID int MainForum *c.Forum Forums []*c.Forum ExtData c.ExtData }
Guild is a struct representing a guild
type GuildStore ¶
type GuildStore interface { Get(id int) (g *Guild, err error) Create(name, desc string, active bool, privacy, uid, fid int) (int, error) }
var Gstore GuildStore
type Member ¶
type Member struct { Link string Rank int /* 0: Member. 1: Mod. 2: Admin. */ RankString string /* Member, Mod, Admin, Owner */ PostCount int JoinedAt string Offline bool // TODO: Need to track the online states of members when WebSockets are enabled User c.User }
Member is a struct representing a specific member of a guild, not to be confused with the global User struct.
type MemberListPage ¶
type SQLGuildStore ¶
type SQLGuildStore struct {
// contains filtered or unexported fields
}
func NewSQLGuildStore ¶
func NewSQLGuildStore() (*SQLGuildStore, error)
func (*SQLGuildStore) Close ¶
func (s *SQLGuildStore) Close()
Click to show internal directories.
Click to hide internal directories.