Skip to content
Snippets Groups Projects
Commit ea006d09 authored by Anton Sattarov's avatar Anton Sattarov :cucumber:
Browse files

Merge branch 'feature/PRXS-1074-Account' into 'feature/1004-AddPublicEntities'

Перенесён в репозиторий services/account

See merge request perxis/perxis-go!36
parents 4b3a8015 4eadae77
No related branches found
No related tags found
No related merge requests found
// Code generated by microgen 0.9.1. DO NOT EDIT.
// It is better for you if you do not change functions names!
// This file will never be overwritten.
package transportgrpc
import (
collaborators "git.perx.ru/perxis/perxis-go/pkg/collaborators"
pbcommon "git.perx.ru/perxis/perxis-go/proto/common"
)
func PtrCollaboratorsCollaboratorToProto(collaborator *collaborators.Collaborator) (*pbcommon.Collaborator, error) {
if collaborator == nil {
return nil, nil
}
return &pbcommon.Collaborator{
SpaceId: collaborator.SpaceID,
Subject: collaborator.Subject,
Role: collaborator.Role,
}, nil
}
func ProtoToPtrCollaboratorsCollaborator(protoCollaborator *pbcommon.Collaborator) (*collaborators.Collaborator, error) {
if protoCollaborator == nil {
return nil, nil
}
return &collaborators.Collaborator{
SpaceID: protoCollaborator.SpaceId,
Subject: protoCollaborator.Subject,
Role: protoCollaborator.Role,
}, nil
}
// Code generated by microgen 0.9.1. DO NOT EDIT.
// DO NOT EDIT.
package transportgrpc
import (
transport "git.perx.ru/perxis/perxis-go/pkg/members/observer/transport"
pb "git.perx.ru/perxis/perxis-go/proto/members"
grpc "github.com/go-kit/kit/transport/grpc"
context "golang.org/x/net/context"
)
type observerServer struct {
onCollaboratorSet grpc.Handler
pb.UnimplementedObserverServer
}
func NewGRPCServer(endpoints *transport.EndpointsSet, opts ...grpc.ServerOption) pb.ObserverServer {
return &observerServer{onCollaboratorSet: grpc.NewServer(
endpoints.OnCollaboratorSetEndpoint,
_Decode_OnCollaboratorSet_Request,
_Encode_OnCollaboratorSet_Response,
opts...,
)}
}
func (S *observerServer) OnCollaboratorSet(ctx context.Context, req *pb.OnCollaboratorSetRequest) (*pb.OnCollaboratorSetResponse, error) {
_, resp, err := S.onCollaboratorSet.ServeGRPC(ctx, req)
if err != nil {
return nil, err
}
return resp.(*pb.OnCollaboratorSetResponse), nil
}
// Code generated by microgen 0.9.1. DO NOT EDIT.
package transport
import (
"context"
observer "git.perx.ru/perxis/perxis-go/pkg/members/observer"
endpoint "github.com/go-kit/kit/endpoint"
)
func Endpoints(svc observer.Observer) EndpointsSet {
return EndpointsSet{OnCollaboratorSetEndpoint: OnCollaboratorSetEndpoint(svc)}
}
func OnCollaboratorSetEndpoint(svc observer.Observer) endpoint.Endpoint {
return func(arg0 context.Context, request interface{}) (interface{}, error) {
req := request.(*OnCollaboratorSetRequest)
res0, res1 := svc.OnCollaboratorSet(arg0, req.Collaborator)
return &OnCollaboratorSetResponse{DelayedTaskID: res0}, res1
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment