Versions in this module Expand all Collapse all v0 v0.8.1 Feb 1, 2019 v0.8.0 Jan 24, 2019 Changes in this version + type Invite struct + Created time.Time + Expires *time.Time + ID string + Inactive bool + MaxUses sql.NullInt64 + func (i Invite) Expired() bool + func (i Invite) ExpiresFriendly() string + func (i Invite) Uses() int64 type UserPage + CanInvite bool v0.7.1 Jan 13, 2019 v0.7.0 Jan 7, 2019 Changes in this version + var SQLiteEnabled bool type User + func (u User) CreatedFriendly() string v0.6.0 Dec 10, 2018 Changes in this version + func RouteRead(handler *Handler, readPerm UserLevel, r *mux.Router) v0.5.0 Dec 3, 2018 v0.4.0 Nov 26, 2018 Changes in this version + type InstanceStats struct + NumBlogs int64 + NumPosts int64 v0.3.0 Nov 19, 2018 Changes in this version type Handler + func (h *Handler) Admin(f userHandlerFunc) http.HandlerFunc type User + func (u *User) IsAdmin() bool type UserPage + IsAdmin bool v0.2.1 Nov 13, 2018 v0.2.0 Nov 11, 2018 Changes in this version type Collection + func (c *Collection) AvatarURL() string v0.1.0 Nov 10, 2018 Changes in this version + const CollPrivate + const CollProtected + const CollPublic + const CollUnlisted + var ErrBadAccessToken = impart.HTTPError + var ErrBadFormData = impart.HTTPError + var ErrBadJSON = impart.HTTPError + var ErrBadJSONArray = impart.HTTPError + var ErrBadRequestedType = impart.HTTPError + var ErrCollectionGone = impart.HTTPError + var ErrCollectionNotFound = impart.HTTPError + var ErrCollectionPageNotFound = impart.HTTPError + var ErrCollectionUnauthorizedRead = impart.HTTPError + var ErrForbiddenCollection = impart.HTTPError + var ErrForbiddenEditPost = impart.HTTPError + var ErrInternalCookieSession = impart.HTTPError + var ErrInternalGeneral = impart.HTTPError + var ErrNoAccessToken = impart.HTTPError + var ErrNoPublishableContent = impart.HTTPError + var ErrNotLoggedIn = impart.HTTPError + var ErrPostBanned = impart.HTTPError + var ErrPostFetchError = impart.HTTPError + var ErrPostNoUpdatableVals = impart.HTTPError + var ErrPostNotFound = impart.HTTPError + var ErrPostUnpublished = impart.HTTPError + var ErrUnauthorizedEditPost = impart.HTTPError + var ErrUnauthorizedGeneral = impart.HTTPError + var ErrUserNotFound = impart.HTTPError + var ErrUserNotFoundEmail = impart.HTTPError + func AuthenticateUser(db writestore, accessToken string) (int64, error) + func CachePosts(userID int64, p *[]PublicPost) + func GetPostsCache(userID int64) *[]PublicPost + func IsJSON(h string) bool + func PostsContains(sl *[]PublicPost, s *PublicPost) bool + func RouteCollections(handler *Handler, r *mux.Router) + func Serve() + func ViewFeed(app *app, w http.ResponseWriter, req *http.Request) error + type AnonymousAuthPost struct + ID string + Token string + type AnonymousPost struct + Author string + Content string + Description string + Direction string + Font string + GenTitle string + HTMLContent template.HTML + ID string + IsCode bool + IsLinkable bool + IsPlainText bool + Language string + Title string + Views int64 + type AuthCache struct + Alias string + BadPasses map[string]bool + Pass string + Token string + type AuthUser struct + AccessToken string + Collections *[]Collection + Password string + Posts *[]PublicPost + User *User + type AuthenticatedPost struct + ID string + type ClaimPostRequest struct + CollectionAlias string + CreateCollection bool + Slug string + type ClaimPostResult struct + Code int + ErrorMessage string + ID string + Post *PublicPost + type Collection struct + Alias string + Description string + Direction string + Format string + ID int64 + Language string + OwnerID int64 + Public bool + PublicOwner bool + Script string + StyleSheet string + Title string + URL string + Views int64 + Visibility collVisibility + func (c *Collection) CanonicalURL() string + func (c *Collection) DisplayCanonicalURL() string + func (c *Collection) DisplayTitle() string + func (c *Collection) FederatedAPIBase() string + func (c *Collection) FederatedAccount() string + func (c *Collection) ForPublic() + func (c *Collection) FriendlyVisibility() string + func (c *Collection) IsPrivate() bool + func (c *Collection) IsProtected() bool + func (c *Collection) IsPublic() bool + func (c *Collection) IsUnlisted() bool + func (c *Collection) NewFormat() *CollectionFormat + func (c *Collection) NextPageURL(prefix string, n int, tl bool) string + func (c *Collection) PersonObject(ids ...int64) *activitystreams.Person + func (c *Collection) PrevPageURL(prefix string, n int, tl bool) string + func (c *Collection) RedirectingCanonicalURL(isRedir bool) string + func (c *Collection) RenderMathJax() bool + func (c *Collection) ShowFooterBranding() bool + func (c *Collection) StyleSheetDisplay() template.CSS + type CollectionFormat struct + Format string + func (cf *CollectionFormat) Ascending() bool + func (cf *CollectionFormat) PostsPerPage() int + func (cf *CollectionFormat) ShowDates() bool + func (cf *CollectionFormat) Valid() bool + type CollectionObj struct + Owner *User + Posts *[]PublicPost + TotalPosts int + func (c *CollectionObj) CanShowScript() bool + func (c *CollectionObj) ExternalScripts() []template.URL + func (c *CollectionObj) ScriptDisplay() template.JS + type CollectionPage struct + CanPin bool + Collections *[]Collection + IsCustomDomain bool + IsOwner bool + IsWelcome bool + PinnedPosts *[]PublicPost + Username string + type DisplayCollection struct + CurrentPage int + Format *CollectionFormat + IsTopLevel bool + Prefix string + TotalPages int + type ErrorPages struct + Blank *template.Template + Gone *template.Template + InternalServerError *template.Template + NotFound *template.Template + type ExportUser struct + AnonymousPosts []PublicPost + Collections *[]CollectionObj + type Handler struct + func NewHandler(app *app) *Handler + func (h *Handler) All(f handlerFunc) http.HandlerFunc + func (h *Handler) Download(f dataHandlerFunc, ul UserLevel) http.HandlerFunc + func (h *Handler) LogHandlerFunc(f http.HandlerFunc) http.HandlerFunc + func (h *Handler) Page(n string) http.HandlerFunc + func (h *Handler) Redirect(url string, ul UserLevel) http.HandlerFunc + func (h *Handler) RedirectOnErr(f handlerFunc, loc string) handlerFunc + func (h *Handler) SetErrorPages(e *ErrorPages) + func (h *Handler) User(f userHandlerFunc) http.HandlerFunc + func (h *Handler) UserAPI(f userHandlerFunc) http.HandlerFunc + func (h *Handler) UserAll(web bool, f userHandlerFunc, a authFunc) http.HandlerFunc + func (h *Handler) Web(f handlerFunc, ul UserLevel) http.HandlerFunc + func (h *Handler) WebErrors(f handlerFunc, ul UserLevel) http.HandlerFunc + type PinPostResult struct + Code int + ErrorMessage string + ID string + type Post struct + CollectionID null.Int + Content string + Created time.Time + Font string + HTMLContent template.HTML + HTMLExcerpt template.HTML + HTMLTitle template.HTML + ID string + Images []string + Language zero.String + OwnerID null.Int + OwnerName string + PinnedPosition null.Int + Privacy int64 + RTL zero.Bool + Slug null.String + Tags []string + Title zero.String + Updated time.Time + ViewCount int64 + func (p *Post) Created8601() string + func (p *Post) CreatedDate() string + func (p *Post) Direction() string + func (p *Post) DisplayTitle() string + func (p *Post) Excerpt() template.HTML + func (p *Post) FormattedDisplayTitle() template.HTML + func (p *Post) HasTag(tag string) bool + func (p *Post) HasTitleLink() bool + func (p *Post) IsScheduled() bool + func (p *Post) PlainDisplayTitle() string + func (p Post) Summary() string + type PublicPost struct + Collection *CollectionObj + DisplayDate string + IsOwner bool + IsSubdomain bool + IsTopLevel bool + Owner *PublicUser + Views int64 + func (p *PublicPost) ActivityObject() *activitystreams.Object + func (p *PublicPost) CanonicalURL() string + type PublicUser struct + Username string + type RawPost struct + CollectionID sql.NullInt64 + Content string + Created time.Time + Font string + Found bool + Gone bool + Id string + IsRTL sql.NullBool + Language sql.NullString + OwnerID int64 + Slug string + Title string + Views int64 + func (rp *RawPost) Created8601() string + func (rp *RawPost) UserFacingCreated() string + type RemoteUser struct + ActorID string + ID int64 + Inbox string + SharedInbox string + func (ru *RemoteUser) AsPerson() *activitystreams.Person + type SubmittedCollection struct + Alias *string + Description *string + Format *sql.NullString + Handle string + ID int64 + MathJax bool + OwnerID uint64 + Pass string + PreferURL string + Privacy int + Script *sql.NullString + StyleSheet *sql.NullString + Title *string + Visibility *int + func (sc *SubmittedCollection) FediverseHandle() string + type SubmittedPost struct + Content *string + Created *string + Font string + IsRTL converter.NullJSONBool + Language converter.NullJSONString + Slug *string + Title *string + type User struct + Created time.Time + Email zero.String + HasPass bool + HashedPass []byte + ID int64 + Username string + func (u *User) EmailClear(keys *keychain) string + func (u User) Cookie() *User + type UserLevel int + const UserLevelNone + const UserLevelNoneRequired + const UserLevelOptional + const UserLevelUser + type UserPage struct + PageTitle string + Separator template.HTML + func NewUserPage(app *app, r *http.Request, username, title string, flashes []string) *UserPage + func (up *UserPage) SetMessaging(u *User)