Documentation
¶
Index ¶
- Variables
- type PostPolicy
- func (p PostPolicy) CanCreate(user *models.User) (bool, error)
- func (p PostPolicy) CanDelete(user *models.User, post *models.Post) (bool, error)
- func (p PostPolicy) CanUpdate(user *models.User, post *models.Post) (bool, error)
- func (p PostPolicy) CanViewDetail(_ *models.User, _ *models.Post) (bool, error)
- func (p PostPolicy) CanViewList(_ *models.User) (bool, error)
- type UserPolicy
Constants ¶
This section is empty.
Variables ¶
View Source
var Module = fx.Options( fx.Provide(NewPostPolicy), fx.Provide(NewUserPolicy), )
Functions ¶
This section is empty.
Types ¶
type PostPolicy ¶
type PostPolicy struct { }
func NewPostPolicy ¶
func NewPostPolicy() PostPolicy
func (PostPolicy) CanViewDetail ¶
func (PostPolicy) CanViewList ¶
func (p PostPolicy) CanViewList(_ *models.User) (bool, error)
Click to show internal directories.
Click to hide internal directories.