Documentation ¶
Index ¶
- func ParseB64ToUID(idb64 string) (*uid.UID, *governor.Error)
- func ParseUIDToB64(postid []byte) (*uid.UID, *governor.Error)
- func Setup(db *sql.DB) *governor.Error
- type Model
- func (m *Model) Delete(db *sql.DB) *governor.Error
- func (m *Model) IDBase64() (string, *governor.Error)
- func (m *Model) Insert(db *sql.DB) *governor.Error
- func (m *Model) IsLocked() bool
- func (m *Model) Lock()
- func (m *Model) Rescore(db *sql.DB) *governor.Error
- func (m *Model) Unlock()
- func (m *Model) Update(db *sql.DB) *governor.Error
- type ModelInfo
- type ModelSlice
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseB64ToUID ¶
ParseB64ToUID converts a postid in base64 into a UID
func ParseUIDToB64 ¶
ParseUIDToB64 converts a UID postid into base64
Types ¶
type Model ¶
Model is the db Post model
func GetByIDB64 ¶
GetByIDB64 returns a post model with the given base64 id
type ModelInfo ¶
type ModelInfo struct { Postid []byte `json:"postid"` Userid string `json:"userid"` Tag string `json:"group_tag"` Title string `json:"title"` Up int32 `json:"up"` Down int32 `json:"down"` Absolute int32 `json:"absolute"` Score int64 `json:"score"` CreationTime int64 `json:"creation_time"` }
ModelInfo is metadata of a post
Click to show internal directories.
Click to hide internal directories.