-
Notifications
You must be signed in to change notification settings - Fork 12
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
Initial skeleton for Tr1d1um (WIP) #1
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1 +/- ##
=====================================
Coverage ? 0%
=====================================
Files ? 1
Lines ? 98
Branches ? 0
=====================================
Hits ? 0
Misses ? 98
Partials ? 0
Continue to review full report at Codecov.
|
src/tr1d1um/http.go
Outdated
@@ -2,23 +2,262 @@ package main | |||
|
|||
import ( | |||
"net/http" | |||
ts "github.comcast.com/webpa/tscommon" |
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.
We do not want to use tscommon.
src/tr1d1um/http.go
Outdated
timeOut time.Duration | ||
targetUlr string | ||
} | ||
|
||
func (sh *ConversionHandler) ServeHTTP(response http.ResponseWriter, request *http.Request) { | ||
func (sh ConversionHandler) ServeHTTP(response http.ResponseWriter, request *http.Request) { | ||
_ , err := HttpRequestToWRP(request, ioutil.ReadAll) |
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.
We shouldn't convert directly to WRP, but instead convert from the WDMP format into a WRP.
src/tr1d1um/http.go
Outdated
@@ -52,8 +51,30 @@ func (sh ConversionHandler) ServeHTTP(response http.ResponseWriter, request *htt | |||
} | |||
} | |||
*/ | |||
func ConversionHandler(resp http.ResponseWriter, req *http.Request){ |
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.
@schmidtw, I added this just to double check I am on the right track with respect to the process of getting the data from the request to the WDMP format to finally WRP.
src/tr1d1um/getSync.go
Outdated
} | ||
syncList, exists = (*gs)[syncName] | ||
return | ||
} |
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.
The sync list functionality didn't gain acceptance & can/should be removed.
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.
Sounds good.
src/tr1d1um/http.go
Outdated
|
||
//todo: place it into wrp? | ||
wrpMessage := wrp.Message{} | ||
wrpMessage.Type = wrp.SimpleEventMessageType |
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.
The wrpMessage should be a wrp.SimpleRequestResponseMessageType
type since you will expect a response.
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.
@schmidtw That is correct. I have fixed that. Currently, I have rearranged a few things and I am writing unit tests for the functions I have for the new commits below.
… tests and support for the rest of the commands.
src/tr1d1um/helper_functions.go
Outdated
**command**: the final command based on the analysis of the parameters | ||
**err**: it is non-nil if any required property is violated | ||
*/ | ||
func validateSETParams(checkingForSetAttr bool, wdmp *SetWDMP, override string) (command string, err error){ |
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.
No description provided.