diary

package
v0.0.0-...-1bee8d1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2023 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const PerPage = 10

Variables

This section is empty.

Functions

This section is empty.

Types

type Diary

type Diary struct {
	DB *gorm.DB
	// contains filtered or unexported fields
}

func New

func New() *Diary

func (*Diary) AddPictureHandler

func (c *Diary) AddPictureHandler(w http.ResponseWriter, r *http.Request)

func (Diary) CanCreate

func (c Diary) CanCreate(userItf interface{}) bool

func (Diary) CanEdit

func (c Diary) CanEdit(entry models.DiaryEntry, userItf interface{}) bool

TODO: can we simplify this can functions

func (Diary) CanSeeUnpublished

func (c Diary) CanSeeUnpublished(userItf interface{}) bool

func (*Diary) CommentHandler

func (c *Diary) CommentHandler(w http.ResponseWriter, r *http.Request)

func (*Diary) Configure

func (c *Diary) Configure(app gongo.App) error

func (*Diary) DeletePictureHandler

func (c *Diary) DeletePictureHandler(w http.ResponseWriter, r *http.Request)

func (*Diary) EditHandler

func (c *Diary) EditHandler(w http.ResponseWriter, r *http.Request)

func (*Diary) ListHandler

func (c *Diary) ListHandler(w http.ResponseWriter, r *http.Request)

func (*Diary) PicturesHandler

func (c *Diary) PicturesHandler(w http.ResponseWriter, r *http.Request)

func (*Diary) PublishHandler

func (c *Diary) PublishHandler(w http.ResponseWriter, r *http.Request)

func (*Diary) ReadHandler

func (c *Diary) ReadHandler(w http.ResponseWriter, r *http.Request)

func (Diary) Resources

func (c Diary) Resources() []interface{}

func (*Diary) ServeMux

func (c *Diary) ServeMux() http.Handler

func (*Diary) SubscribeHandler

func (c *Diary) SubscribeHandler(w http.ResponseWriter, r *http.Request)

func (*Diary) ViewHandler

func (c *Diary) ViewHandler(w http.ResponseWriter, r *http.Request)

type Flash

type Flash struct {
	Type    string
	Message string
}

func FlashError

func FlashError(msg string) Flash

func FlashInfo

func FlashInfo(msg string) Flash

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL