-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set-Cookie support in http #208
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
cadcb37
rpc http cookies
mhoeger fc6d5f0
take out log in nodejs worker
mhoeger b225c28
Updated subtree from https://github.com/azure/azure-functions-languag…
mhoeger 7e4302c
fixde merged conflict
mhoeger 9f761a4
add test
mhoeger e729e33
addressing cr comments
mhoeger e815f7a
add comment
mhoeger 76ccead
added comments
mhoeger 3eb543a
nit
mhoeger be1e959
unit tests
mhoeger 9254d96
start of e2e tests
mhoeger 1561699
tests and change behavior to throw instead of warn
mhoeger c49817c
add pst for machines... really should never use expire
mhoeger 266d7fb
http expires
mhoeger 4bfee3b
test
mhoeger File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
azure-functions-language-worker-protobuf/src/proto/identity/ClaimsIdentityRpc.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 0 additions & 8 deletions
8
azure-functions-language-worker-protobuf/src/proto/shared/NullableString.proto
This file was deleted.
Oops, something went wrong.
28 changes: 28 additions & 0 deletions
28
azure-functions-language-worker-protobuf/src/proto/shared/NullableTypes.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
syntax = "proto3"; | ||
// protobuf vscode extension: https://marketplace.visualstudio.com/items?itemName=zxh404.vscode-proto3 | ||
|
||
import "google/protobuf/timestamp.proto"; | ||
|
||
message NullableString { | ||
oneof string { | ||
string value = 1; | ||
} | ||
} | ||
|
||
message NullableDouble { | ||
oneof double { | ||
double value = 1; | ||
} | ||
} | ||
|
||
message NullableBool { | ||
oneof bool { | ||
bool value = 1; | ||
} | ||
} | ||
|
||
message NullableTimestamp { | ||
oneof timestamp { | ||
google.protobuf.Timestamp value = 1; | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import { AzureFunctionsRpcMessages as rpc } from '../../azure-functions-language-worker-protobuf/src/rpc'; | ||
import { FunctionInfo } from '../FunctionInfo'; | ||
import { Dict } from '../Context'; | ||
import { BindingDefinition } from '../public/Interfaces'; | ||
import { fromTypedData } from './RpcConverters'; | ||
|
||
type BindingDirection = 'in' | 'out' | 'inout' | undefined; | ||
|
||
export function getBindingDefinitions(info: FunctionInfo): BindingDefinition[] { | ||
let bindings = info.bindings; | ||
if (!bindings) { | ||
return []; | ||
} | ||
|
||
return Object.keys(bindings) | ||
.map(name => { return { | ||
name: name, | ||
type: bindings[name].type || "", | ||
direction: getDirectionName(bindings[name].direction) | ||
}; | ||
}); | ||
} | ||
|
||
export function getNormalizedBindingData(request: rpc.IInvocationRequest): Dict<any> { | ||
let bindingData: Dict<any> = { | ||
invocationId: request.invocationId | ||
}; | ||
// node binding data is camel cased due to language convention | ||
if (request.triggerMetadata) { | ||
Object.assign(bindingData, convertKeysToCamelCase(request.triggerMetadata)) | ||
} | ||
return bindingData; | ||
} | ||
|
||
function getDirectionName(direction: rpc.BindingInfo.Direction|null|undefined): BindingDirection { | ||
let directionName = Object.keys(rpc.BindingInfo.Direction).find(k => rpc.BindingInfo.Direction[k] === direction); | ||
return isBindingDirection(directionName)? directionName as BindingDirection : undefined; | ||
} | ||
|
||
function isBindingDirection(input: string | undefined): boolean { | ||
return (input == 'in' || input == 'out' || input == 'inout') | ||
} | ||
|
||
// Recursively convert keys of objects to camel case | ||
function convertKeysToCamelCase(obj: any) { | ||
var output = {}; | ||
for (var key in obj) { | ||
let value = fromTypedData(obj[key]) || obj[key]; | ||
let camelCasedKey = key.charAt(0).toLocaleLowerCase() + key.slice(1); | ||
// If the value is a JSON object (and not array and not http, which is already cased), convert keys to camel case | ||
if (!Array.isArray(value) && typeof value === 'object' && value && value.http == undefined) { | ||
output[camelCasedKey] = convertKeysToCamelCase(value); | ||
} else { | ||
output[camelCasedKey] = value; | ||
} | ||
} | ||
return output; | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Get the latest proto: https://github.com/Azure/azure-functions-language-worker-protobuf/releases/tag/v1.2.0-protofile