(projectId string, instanceId string, databaseId string, credential []byte, priority pb.RequestOptions_Priority, role string, endpoint string, directedRead *pb.DirectedReadOptions, skipTLSVerify bool, protoDescriptor []byte)
| 320 | } |
| 321 | |
| 322 | func createSession(projectId string, instanceId string, databaseId string, credential []byte, |
| 323 | priority pb.RequestOptions_Priority, role string, endpoint string, directedRead *pb.DirectedReadOptions, |
| 324 | skipTLSVerify bool, protoDescriptor []byte) (*Session, error) { |
| 325 | var opts []option.ClientOption |
| 326 | if credential != nil { |
| 327 | opts = append(opts, option.WithCredentialsJSON(credential)) |
| 328 | } |
| 329 | if endpoint != "" { |
| 330 | opts = append(opts, option.WithEndpoint(endpoint)) |
| 331 | } |
| 332 | if skipTLSVerify { |
| 333 | creds := credentials.NewTLS(&tls.Config{InsecureSkipVerify: true}) |
| 334 | opts = append(opts, option.WithGRPCDialOption(grpc.WithTransportCredentials(creds))) |
| 335 | } |
| 336 | return NewSession(projectId, instanceId, databaseId, priority, role, directedRead, protoDescriptor, opts...) |
| 337 | } |
| 338 | |
| 339 | func readInteractiveInput(rl *readline.Instance, prompt string) (*inputStatement, error) { |
| 340 | defer rl.SetPrompt(prompt) |
no test coverage detected