Created
May 27, 2016 10:37
-
-
Save sumitasok/619eccbb8a95084f1e4376b59f8d09a5 to your computer and use it in GitHub Desktop.
Design for Crud method interface for apis.V2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Controler struct{ | |
} | |
func c Controller Config() apis.Config{} {} | |
func c Controller BeforeFilters() []actions { | |
if Methdo == "POST" { | |
retuen []actions{} | |
} esles is "PUT" | |
} | |
func c Controller Create(d apis.Dispatcher){} | |
func c Controller Update(d apis.Dispatcher){} | |
func c Controller Read(d apis.Dispatcher){} | |
func c Controller Delete(d apis.Dispatcher){} | |
func c Controller AfterFilters() []actions { | |
if Methdo == "POST" || "PUT" { | |
retuen []actions{} | |
} esles is "PUT" | |
} | |
// sael.CRUD("tickets").Set(salesC.Contrller{}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment