| iomodo | 3e1576e | 2021-02-23 01:27:56 +0400 | [diff] [blame^] | 1 | package rpc |
| 2 | |
| 3 | import ( |
| 4 | "context" |
| 5 | |
| 6 | "github.com/giolekva/pcloud/core/kg/app" |
| 7 | "github.com/giolekva/pcloud/core/kg/model/proto" |
| 8 | ) |
| 9 | |
| 10 | type userService struct { |
| 11 | proto.UnimplementedUserServiceServer |
| 12 | app *app.App |
| 13 | } |
| 14 | |
| 15 | // NewService returns new user service |
| 16 | func NewService(app *app.App) proto.UserServiceServer { |
| 17 | s := &userService{ |
| 18 | app: app, |
| 19 | } |
| 20 | |
| 21 | return s |
| 22 | } |
| 23 | |
| 24 | func (us *userService) GetUser(context.Context, *proto.GetUserRequest) (*proto.User, error) { |
| 25 | // us.app.getUser... |
| 26 | return nil, nil |
| 27 | } |
| 28 | func (us *userService) ListUsers(context.Context, *proto.ListUserRequest) (*proto.ListUserResponse, error) { |
| 29 | return nil, nil |
| 30 | } |
| 31 | func (us *userService) CreateUser(context.Context, *proto.CreateUserRequest) (*proto.User, error) { |
| 32 | return nil, nil |
| 33 | } |