From 9c5086d1459a63cc74c4ea64be9037c97287ceab Mon Sep 17 00:00:00 2001 From: Andrey Ivanov Date: Thu, 1 Oct 2020 10:11:21 +0300 Subject: [PATCH] HW13 WIP --- hw12_13_14_15_calendar/Makefile | 7 +---- .../internal/server/grpc/grpc.go | 29 +++++++++++++++---- 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/hw12_13_14_15_calendar/Makefile b/hw12_13_14_15_calendar/Makefile index 400c362..84c3ed7 100644 --- a/hw12_13_14_15_calendar/Makefile +++ b/hw12_13_14_15_calendar/Makefile @@ -16,11 +16,6 @@ install-lint-deps: (which golangci-lint > /dev/null) || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell go env GOPATH)/bin v1.30.0 generate: - protoc --go_out=grpc:internal grpc/calendar.proto - -gen2: - protoc -I /usr/local/include -I ${cdir}/grpc --go_out=plugins=grpc:${cdir}/internal/grpc \ - --grpc-gateway_out=logtostderr=true:${cdir}/internal/grpc \ - ${cdir}/grpc/grpc.proto + protoc -I ./grpc --go_out=plugins=grpc:./internal/grpc --grpc-gateway_out=logtostderr=true:./internal/grpc ./grpc/grpc.proto .PHONY: build run test lint \ No newline at end of file diff --git a/hw12_13_14_15_calendar/internal/server/grpc/grpc.go b/hw12_13_14_15_calendar/internal/server/grpc/grpc.go index f08c952..d2faa57 100644 --- a/hw12_13_14_15_calendar/internal/server/grpc/grpc.go +++ b/hw12_13_14_15_calendar/internal/server/grpc/grpc.go @@ -8,9 +8,26 @@ import ( type Service struct{} -func (s Service) Create(context.Context, *grpc.Event) (*grpc.EventID, error) {} -func (s Service) Update(context.Context, *grpc.EventWthID) (*empty.Empty, error) {} -func (s Service) Delete(context.Context, *grpc.EventID) (*empty.Empty, error) {} -func (s Service) List(context.Context, *empty.Empty) (*grpc.EventList, error) {} -func (s Service) GetByID(context.Context, *grpc.EventID) (*grpc.EventList, error) {} -func (s Service) GetByDate(context.Context, *grpc.Date) (*grpc.EventList, error) {} +func (s Service) Create(context.Context, *grpc.Event) (*grpc.EventID, error) { + return nil, nil +} + +func (s Service) Update(context.Context, *grpc.EventWthID) (*empty.Empty, error) { + return nil, nil +} + +func (s Service) Delete(context.Context, *grpc.EventID) (*empty.Empty, error) { + return nil, nil +} + +func (s Service) List(context.Context, *empty.Empty) (*grpc.EventList, error) { + return nil, nil +} + +func (s Service) GetByID(context.Context, *grpc.EventID) (*grpc.EventList, error) { + return nil, nil +} + +func (s Service) GetByDate(context.Context, *grpc.Date) (*grpc.EventList, error) { + return nil, nil +}