element/server/service.go
Evan Hazlett 2eba8d6511
wip: grpc api
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2017-08-14 08:39:37 -04:00

20 lines
580 B
Go

package server
import (
configurationapi "github.com/ehazlett/element/api/services/configuration"
"golang.org/x/net/context"
)
func (s *Server) CreateService(ctx context.Context, req *configurationapi.CreateServiceRequest) (*configurationapi.CreateServiceResponse, error) {
// TODO
// save to datastore
if err := s.store.SaveService(req.Service); err != nil {
return nil, err
}
return nil, nil
}
func (s *Server) ListServices(ctx context.Context, req *configurationapi.ListServicesRequest) (*configurationapi.ListServicesResponse, error) {
// TODO
return nil, nil
}