package service import ( "errors" "xps/datasource" "xps/repositories" ) type ApiGatewayService interface { Get(apiCode string, m map[string]interface{})([]map[string]interface{}, error) Create(apiCode string, m map[string]interface{})error Update(apiCode string, m map[string]interface{})error Patch(apiCode string, m map[string]interface{})error Delete(apiCode string, m map[string]interface{})error } type apiGatewayService struct { apiRepo *repositories.ApiRepo dataBus *repositories.DataBusRepo } func NewApiGatewayService() ApiGatewayService { return &apiGatewayService{ apiRepo: repositories.NewApiRepo(datasource.InstanceMaster()), dataBus: repositories.NewDataBusRepo(datasource.InstanceMaster()), } } func (a apiGatewayService) Get(apiCode string, m map[string]interface{}) ([]map[string]interface{}, error) { return nil, errors.New("TEST") } func (a apiGatewayService) Create(apiCode string, m map[string]interface{}) error { //TODO implement me panic("implement me") } func (a apiGatewayService) Update(apiCode string, m map[string]interface{}) error { //TODO implement me panic("implement me") } func (a apiGatewayService) Patch(apiCode string, m map[string]interface{}) error { //TODO implement me panic("implement me") } func (a apiGatewayService) Delete(apiCode string, m map[string]interface{}) error { //TODO implement me panic("implement me") }