Documentation
¶
Index ¶
- Variables
- func BanUnbanUser(db *gorm.DB, username string, ban bool) error
- func ConnectDb(ConnStr string) error
- func CreateImage(db *gorm.DB, id string, userID uint, size uint) (*models.Image, error)
- func GarbageCollector(imagesPath string)
- func GenerateAnonymousAvatar(alias string) string
- func GetAllReports(db *gorm.DB) ([]models.Report, error)
- func GetBannedUsers(db *gorm.DB) ([]models.User, error)
- func GetDb() *gorm.DB
- func GetNumberOfImagesByUser(db *gorm.DB, userID uint) (int64, error)
- func GetOrCreateUserByID(db *gorm.DB, id uint, username string) (*models.User, error)
- func GetPublicAvatarURL(userID uint) string
- func GetTotalSizeOfImagesByUser(db *gorm.DB, userID uint) (uint64, error)
- func GetUserByID(db *gorm.DB, id uint) (*models.User, error)
- func GetUserByUsername(db *gorm.DB, username string) (*models.User, error)
- func NewLoggerMiddleware(next http.Handler) http.Handler
- func SaveNewReport(db *gorm.DB, answerID uint, cause string, userID uint) error
- type MuxieStatusRecorder
Constants ¶
This section is empty.
Variables ¶
View Source
var DeletedURL = "https://api.dicebear.com/9.x/thumbs/svg?seed=Eden&backgroundColor=0a5b83&backgroundType[]&eyes[]&eyesColor[]&face[]&mouth[]"
Functions ¶
func CreateImage ¶
func GarbageCollector ¶
func GarbageCollector(imagesPath string)
func GenerateAnonymousAvatar ¶
func GetNumberOfImagesByUser ¶
func GetOrCreateUserByID ¶
func GetPublicAvatarURL ¶
Types ¶
type MuxieStatusRecorder ¶
wrapper that records the status code
func NewMuxieStatusRecorder ¶
func NewMuxieStatusRecorder(w http.ResponseWriter) *MuxieStatusRecorder
func (*MuxieStatusRecorder) WriteHeader ¶
func (r *MuxieStatusRecorder) WriteHeader(code int)
Click to show internal directories.
Click to hide internal directories.