Documentation ¶
Overview ¶
Package types provides common data types used across all Betula, all conveniently collected in a single box for resolving import cycles nicely.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CanonicalCategoryName ¶
func JoinCategories ¶
Types ¶
type Category ¶
func SplitCategories ¶
type Post ¶
type Post struct { // ID is a unique identifier of the post. Do not set this field by yourself. ID int // CreationTime is UNIX seconds. Do not set this field by yourself. CreationTime int64 // Categories are categories of this post. Do not set this field by yourself. Categories []Category // URL is a URL with any protocol. URL string // Title is a name for the link. Title string // Description is a Mycomarkup-formatted document. Currently, just unescaped plain text. Description string // Visibility sets who can see the post. Visibility Visibility }
Post is a link, along with some data.
type Visibility ¶
type Visibility int
Visibility determines where the post is seen.
const ( // Private posts are only seen by the author. Private Visibility = iota // Public posts are seen by everyone, and are federated. Public )
func VisibilityFromString ¶
func VisibilityFromString(s string) Visibility
VisibilityFromString turns a string into a Visbility.
Click to show internal directories.
Click to hide internal directories.