sumitasok
5/27/2016 - 10:37 AM

Design for Crud method interface for apis.V2

Design for Crud method interface for apis.V2

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{})