| package main |
| |
| import ( |
| "context" |
| "flag" |
| |
| "github.com/golang/glog" |
| "google.golang.org/grpc/codes" |
| "google.golang.org/grpc/status" |
| |
| pb "code.hackerspace.pl/hscloud/bgpwtf/cccampix/proto" |
| "code.hackerspace.pl/hscloud/go/mirko" |
| ) |
| |
| type service struct { |
| } |
| |
| func (s *service) KeyInfo(ctx context.Context, req *pb.KeyInfoRequest) (*pb.KeyInfoResponse, error) { |
| return nil, status.Error(codes.Unimplemented, "not implemented yet") |
| } |
| |
| func (s *service) Encrypt(stream pb.PGPEncryptor_EncryptServer) error { |
| return status.Error(codes.Unimplemented, "not implemented yet") |
| } |
| |
| func main() { |
| flag.Parse() |
| mi := mirko.New() |
| |
| if err := mi.Listen(); err != nil { |
| glog.Exitf("Listen failed: %v", err) |
| } |
| |
| s := &service{} |
| pb.RegisterPGPEncryptorServer(mi.GRPC(), s) |
| |
| if err := mi.Serve(); err != nil { |
| glog.Exitf("Serve failed: %v", err) |
| } |
| |
| <-mi.Done() |
| } |