MCPcopy Create free account

hub / github.com/cdipaolo/sentiment-server / functions

Functions34 in github.com/cdipaolo/sentiment-server

↓ 12 callersFunctionpost
post takes a path and a json to post, performs a POST request, and returns the status, the body, and any errors
sentiment_test.go:101
↓ 6 callersFunctionGetHookResponse
GetHookResponse takes in a TaskJSON and returns the text of the response given by the hook. The text is found by returning the JSON field from the par
handler.go:181
↓ 5 callersFunctionHTTPHandlerWithMethod
HTTPHandlerWithMethod only allows the given method to a handler, else returning an http.StatusMethodNotAllowed status code as well as an error
wrapper.go:12
↓ 2 callersFunctionPost
Post only allows POST requests to a handler
wrapper.go:27
↓ 2 callersFunctionTurnTimeSeriesIntoText
TurnTimeSeriesIntoText compiles all the text values within an []TimeSeries into one string for use with regular analysis
handler.go:280
↓ 1 callersFunctionGet
Get only allows GET requests to a handler
wrapper.go:32
↓ 1 callersFunctionParseConfig
ParseConfig determines whether the config is at a URL or a file, unmarshals and munges the configuration, and returns any errors.
config.go:143
↓ 1 callersFunctionParseConfigFromFile
ParseConfigFromFile must be run after the flag.Parse() function has been run to set the global configuration variable
config.go:64
↓ 1 callersFunctionParseConfigFromURL
ParseConfigFromURL pulls the config from a URL by making a get request This expects that the config path is, in fact, a URL routing to either HTTP or
config.go:107
↓ 1 callersFunctionget
get makes a get request to the server at the specified path
sentiment_test.go:118
↓ 1 callersFunctionmain
()
sentiment.go:28
FunctionBenchmarkPOSTAnalyze
* Benchmarks * //
sentiment_test.go:526
FunctionDelete
Delete only allows DELETE requests to a handler
wrapper.go:42
FunctionHandleHookedRequest
HandleHookedRequest is an http.HandlerFunc which will take a POST request with some id string and a hook_id string, post a GET request to the hook num
handler.go:108
FunctionHandleSentiment
HandleSentiment takes in a POST with JSON containing a 'text' param. The handler runs sentiment analysis on the text and returns the results.
handler.go:58
FunctionHandleStatus
HandleStatus is a simple health-check endpoint that will tell the user the total number of successful analyses and the number of successful hooked req
handler.go:32
FunctionPatch
Patch only allows PATCH requests to a handler
wrapper.go:37
FunctionPut
Put only allows PUT requests to a handler
wrapper.go:47
FunctionTestHookedSentimentShouldFail1
(t *testing.T)
sentiment_test.go:495
FunctionTestHookedSentimentShouldFail2
(t *testing.T)
sentiment_test.go:511
FunctionTestHookedSentimentShouldPass1
* Hooked Requests * //
sentiment_test.go:265
FunctionTestHookedSentimentShouldPass2
(t *testing.T)
sentiment_test.go:307
FunctionTestHookedSentimentShouldPass3
test default hook settings
sentiment_test.go:350
FunctionTestHookedSentimentShouldPass4
test temporal data handling
sentiment_test.go:393
FunctionTestHookedSentimentShouldPass5
(t *testing.T)
sentiment_test.go:444
FunctionTestSentimentShouldFail1
(t *testing.T)
sentiment_test.go:230
FunctionTestSentimentShouldFail2
(t *testing.T)
sentiment_test.go:248
FunctionTestSentimentShouldPass1
* POST /analyze tests * //
sentiment_test.go:164
FunctionTestSentimentShouldPass2
use different language but should default to English
sentiment_test.go:197
FunctionTestStatusShouldPass1
* GET / tests * //
sentiment_test.go:135
Functioninit
()
handler.go:22
Functioninit
()
sentiment_test.go:61
Functioninit
init grabs the config from the expected command line args. Else initializes with defaults
config.go:54
Functioninit
()
sentiment.go:16