(ctx context.Context, in *pb.HTTPConfig)
| 39 | } |
| 40 | |
| 41 | func (sm *SessionsManager) CreateOneHTTP(ctx context.Context, in *pb.HTTPConfig) (*pb.HTTPConfig, error) { |
| 42 | err := authOpenIoTHubGrpc(ctx, in.RunId) |
| 43 | if err != nil { |
| 44 | return in, status.Errorf(codes.Unauthenticated, err.Error()) |
| 45 | } |
| 46 | log.Println("CreateOneHTTP:", in.Domain) |
| 47 | return in, sm.AddOrUpdateHttpProxy(&HttpProxy{ |
| 48 | Domain: in.Domain, |
| 49 | RunId: in.RunId, |
| 50 | RemoteIP: in.RemoteIP, |
| 51 | RemotePort: int(in.RemotePort), |
| 52 | UserName: in.UserName, |
| 53 | Password: in.Password, |
| 54 | IfHttps: in.IfHttps, |
| 55 | Description: in.Description, |
| 56 | }) |
| 57 | } |
| 58 | |
| 59 | func (sm *SessionsManager) UpdateOneHTTP(ctx context.Context, in *pb.HTTPConfig) (*pb.HTTPConfig, error) { |
| 60 | err := authOpenIoTHubGrpc(ctx, in.RunId) |
nothing calls this directly
no test coverage detected