diff options
author | Steve Manuel <nilslice@gmail.com> | 2016-11-08 18:15:09 -0800 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2016-11-08 18:15:09 -0800 |
commit | 255c182d32cd8e9d243142ab08ef4865375a5e7c (patch) | |
tree | 2cfcee12293b1f42374b520e5b4157d05b6ed4c4 /content | |
parent | 48661a741c43f255ec4c440b93690812840256c5 (diff) |
adding remaining interface methods to satisfy Hookable. Reverting back again to value receiver as it is clearer about Hookable methods and ability to modifty struct fields
Diffstat (limited to 'content')
-rw-r--r-- | content/item.go | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/content/item.go b/content/item.go index cbf38af..14717bb 100644 --- a/content/item.go +++ b/content/item.go @@ -36,32 +36,42 @@ func (i *Item) SetItemID(id int) { } // BeforeSave is a no-op to ensure structs which embed Item implement Hookable -func (i *Item) BeforeSave(req *http.Request) error { +func (i Item) BeforeSave(req *http.Request) error { return nil } // AfterSave is a no-op to ensure structs which embed Item implement Hookable -func (i *Item) AfterSave(req *http.Request) error { +func (i Item) AfterSave(req *http.Request) error { return nil } // BeforeDelete is a no-op to ensure structs which embed Item implement Hookable -func (i *Item) BeforeDelete(req *http.Request) error { +func (i Item) BeforeDelete(req *http.Request) error { return nil } // AfterDelete is a no-op to ensure structs which embed Item implement Hookable -func (i *Item) AfterDelete(req *http.Request) error { +func (i Item) AfterDelete(req *http.Request) error { + return nil +} + +// BeforeApprove is a no-op to ensure structs which embed Item implement Hookable +func (i Item) BeforeApprove(req *http.Request) error { + return nil +} + +// AfterApprove is a no-op to ensure structs which embed Item implement Hookable +func (i Item) AfterApprove(req *http.Request) error { return nil } // BeforeReject is a no-op to ensure structs which embed Item implement Hookable -func (i *Item) BeforeReject(req *http.Request) error { +func (i Item) BeforeReject(req *http.Request) error { return nil } // AfterReject is a no-op to ensure structs which embed Item implement Hookable -func (i *Item) AfterReject(req *http.Request) error { +func (i Item) AfterReject(req *http.Request) error { return nil } |