TEXT   23

service snip

Guest on 19th August 2022 12:20:42 AM

  1. /**
  2. * Snippet is automatically generate from MKCL-Core-DPE Snippet API
  3. * Author: Imtiyaz Shaikh
  4. */
  5.  
  6. package $moduleName$
  7.  
  8. func Init() {
  9.  
  10.         // This is response header as an optional data send with result
  11.         // This response header is apply when LoginService called
  12.         routebuildermdl.CreateResponseHeader("$moduleName$Service").
  13.  
  14.         // Enable its response to be cached at client end
  15.         // This is very critical operation
  16.         EnableReponseCache().
  17.  
  18.         // AddMethod add methods with data
  19.         // These are client methods
  20.         AddMethod("TestMethod", nil).
  21.  
  22.         // SetResponseHeader set response header with return data
  23.         SetResponseHeader()
  24.  
  25.         // Register Your serviced with restricted and role based configuration
  26.         routebuildermdl.RegisterNormalService("$moduleName$Service", Check$moduleName$Service, false, false)
  27.  
  28.         routebuildermdl.RegisterFormBasedService("$moduleName$UserService", Register$moduleName$Service, false, true)
  29.  
  30. }
  31.  
  32. func Check$moduleName$Service()(error) {
  33.         return nil
  34. }
  35.  
  36. func Register$moduleName$Service()(error) {
  37.         return nil
  38. }

Raw Paste


Login or Register to edit or fork this paste. It's free.