uj      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~None246( http-conduit exceptions http-conduit exceptions overloading lens lens lens lens  lens  lens  lens  lens  lens lens lens exception exception exception exception exception exception exception exception exception exception  exception! exception" exception# exception$ exception% exception& exception' exception( exception) exception* exception+  !"#$%&'()*(  !"#$%&'()*(  !"#$%&'()**  !"#$%&'()*None !"(*+0234=+Python response format-XML response format/JSON response format1Response format singleton type2Response formats3 Method types6#Jenkins RESTFul API method encoding7Convert  to 68Convert  to 69Combine 2 paths:Combine 2 queries;Make a field-value pair<Choose response format=Combine path and query>$List-to-query convenience combinatorIrender (query [("foo", Nothing), ("bar", Just "baz"), ("quux", Nothing)])"foo&bar=baz&quux"render (query [])""?Render 6, to something that can be sent over the wirerender ("" `as` xml) "api/xml" render xml "api/xml"render ("job" -/- 7 `as` xml)"job/7/api/xml"render ("job" -/- 7 `as` xml)"job/7/api/xml"render ("job" -/- 7 `as` json)"job/7/api/json"render (text "restart") "restart"9render ("job" -?- "name" -=- "foo" -&- "title" -=- "bar")"job?name=foo&title=bar"/render ("job" -?- "name" -&- "title" -=- "bar")"job?name&title=bar"?render ("job" -/- 7 `as` json -?- "name" -&- "title" -=- "bar")"job/7/api/json?name&title=bar"%render ("job" -/- "" " `as` xml)8"job/%D0%94%D0%9C%D0%98%D0%A2%D0%A0%D0%98%D0%99/api/xml"%Render unicode text as a query stringrenderText "foo-bar-baz" "foo-bar-baz"renderText "foo bar baz""foo%20bar%20baz"renderText ""  "Y"%D0%94%D0%9C%D0%98%D0%A2%D0%A0%D0%98%D0%99%20%D0%9C%D0%90%D0%9B%D0%98%D0%9A%D0%9E%D0%92"@Insert "/" between two (-like things and concatenate everything.Insert "=" between two (-like things and concatenate everything.Insert "&" between two (-like things and concatenate everything.Insert "?" between two (-like things and concatenate everything.Insert -like thing between two (-like things and concatenate everything."foo" `slash` "bar" "foo/bar""" `ampersand` "foo""&foo""foo" `question` """foo?"AJob API methodrender (job "name" `as` json)"job/name/api/json"BJob build API method!render (build "name" 4 `as` json)"job/name/4/api/json"CView API methodrender (view "name" `as` xml)"view/name/api/xml"DQueue API methodrender (queue `as` python)"queue/api/python"EStatistics API methodrender (overallLoad `as` xml)"overallLoad/api/xml"FNode API methodrender (computer `as` python)"computer/api/python"Only to support number literals8+,-./0123456789:;<=>?@ABCDEF+,-./0123456789:;<=>?@ABCDEF63542178=9;:></0-.+,ABCDEF?@&+,-./0123546789:;<=>?@ABCDEF 9:;<=None  !"(+0BHMTGkConvenience class aimed at elimination of long chains of lenses to access jenkins connection configurationDFor example, if you have a configuration record in your application: Pdata Config = Config { ... , _jenkinsConnectInfo :: ConnectInfo , ... } you can make it an instance of G: |instance HasConnectInfo Config where connectInfo f x = (p -> x { _jenkinsConnectInfo = p }) <$> f (_jenkinsConnectInfo x) and then use e.g. view jenkinsUrl config. to get the url part of the jenkins connectionK&The result of Jenkins REST API queriesL.Querying successfully finished the with value vM&The client was explicitly disconnectedN Exception e" was thrown while querying JenkinsOJenkins connection settingsTV may be user's password, Jenkins does not make any distinction between these conceptsQJenkins URL, e.g. http://example.com/jenkinsRJenkins port, e.g. 8080SJenkins user, e.g. jenkinsTJenkins user API tokenUJenkins REST API query]+Jenkins REST API query sequence description`Lift U to ]aQuery Jenkins API using ] descriptionSuccessful result is either M or  K v If  was thrown by  http-conduit, a catches it and wraps in N. Other exceptions are not catchedcA prism into Jenkins errordA prism into disconnecteA prism into resultf Interpret U AST in g Tear down U AST with a U-algebrahU AST interpretern#Default Jenkins connection settings defaultConnectInfo = ConnectInfo { _jenkinsUrl = "http://example.com/jenkins" , _jenkinsPort = 8080 , _jenkinsUser = "jenkins" , _jenkinsApiToken = "" } oA lens into Jenkins URLpA lens into Jenkins portqA lens into Jenkins userr"A lens into Jenkins user API tokensA lens into Jenkins password "jenkinsPassword = jenkinsApiToken 1GHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvw-GHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrs1]^_wU\[ZYXWVv`OPQRSTKNMLIJuabcdefghijklmnGHtopqrsGHIJKNMLOPQRSTU\[ZYXWV]^_`abcdefghijklmnopqrstuvwNone(HM xGET querylWhile the return type is a lazy bytestring, the entire response sits in memory anyway: lazy I/O is not usedyGET queryBIf you don't close the source eventually (either explicitly with : or implicitly by reading from it) it will leak a socket.zPOST query (with a payload){POST query (without payload)|Do both queries |} orElse a b runs a and only runs b if a has thrown a JenkinsException~Make local changes to the POST job's  config.xml (or any other xml, really) in  xml-conduit formatMake a bunch of queries |Make a bunch of queries | ignoring their results&Reload jenkins configuration from diskCalls /reload and disconnectsRestart jenkins safelyCalls  /safeRestart and disconnects /safeRestart$ allows all running jobs to completeCForce jenkins to restart without waiting for running jobs to finishCalls /restart and disconnectsxyz{|}~E+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRST]acdenopqrsxyz{|}~)]GHOPQRSTnKNMLaxyz{|}~opqrscdeIJxyz{|}~NoneJenkins informationDiscover Jenkins on the network$Parse Jenkins discovery response XMLThe "Scheme" is as follows:  hudson  version... /version  url... /url  server-id... /server-id  /hudson timeout     !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWWXYZZ[\]^_`abcdefgghijklmnopqrstuvwxyz{|}~                 !                     blibjenkins-0.5.0 Jenkins.RestNetwork.HTTP.Conduit.LensJenkins.Rest.MethodJenkins.Rest.InternalJenkins.Discover Data.ConduitcloseResumableSourcehttp-client-0.4.0Network.HTTP.Client.Types HttpExceptionRequesttransformers-0.3.0.0Control.Monad.IO.ClassliftIOAsHttpException_HttpExceptionmethodsecurehostportpath queryString requestBodyrequestHeadersproxy hostAddressrawBody decompress redirectCount checkStatusresponseTimeout cookieJargetConnectionWrapper_StatusCodeException_InvalidUrlException_TooManyRedirects_UnparseableRedirect_TooManyRetries_HttpParserException_HandshakeFailed_OverlongHeaders_ResponseTimeout_FailedConnectionException_ExpectedBlankAfter100Continue_InvalidStatusLine_InvalidHeader_InternalIOException_ProxyConnectException_NoResponseDataReceived _TlsException_TlsNotSupported_ResponseBodyTooShort_InvalidChunkHeaders_IncompleteHeadersPythonypythonXMLyxmlJSONyjsonAsFormatTypeCompleteQueryMethodtextint-/--&--=-as-?-queryrenderslashjobbuildviewqueue overallLoadcomputerHasConnectInfo connectInfoJenkinsExceptionJenkinsHttpExceptionResult DisconnectError ConnectInfo _jenkinsUrl _jenkinsPort _jenkinsUser_jenkinsApiTokenJenkinsFDconWithIOOrConcPostGetJenkins unJenkinsliftJ runJenkinsrunJenkinsInternal_Error _Disconnect_Result iterJenkinsIO iterJenkins interpreterintoIOoutoIO prepareGet preparePost withExceptiondefaultConnectInfo jenkinsUrl jenkinsPort jenkinsUserjenkinsApiTokenjenkinsPassword$fHasConnectInfoConnectInfo$fExceptionJenkinsException$fFunctorJenkinsF$fMonadIOJenkinsgetgetSpostpost_ concurrentlyorElsewithpostXML traverseC traverseC_reloadrestart forceRestartDiscoverversionurl server_iddiscoverStatusCodeExceptionInvalidUrlExceptionTooManyRedirectsUnparseableRedirectTooManyRetriesHttpParserExceptionHandshakeFailedOverlongHeadersResponseTimeoutFailedConnectionExceptionExpectedBlankAfter100ContinueInvalidStatusLine InvalidHeaderInternalIOExceptionProxyConnectExceptionNoResponseDataReceived TlsExceptionTlsNotSupportedResponseBodyTooShortInvalidChunkHeadersIncompleteHeadersuncurry3$fAsHttpExceptionSomeException$fAsHttpExceptionHttpException text-1.2.0.0Data.Text.InternalText integer-gmpGHC.Integer.TypeInteger renderTextbaseGHC.BaseStringequals ampersandquestioninsert $fNumMethodAsPythonAsXMLAsJSONPythonXMLJSON:~?:~&:~=:~@:~/Empty renderFormat$fPythonyMethod $fPythonyAs $fXMLyMethod$fXMLyAs $fJSONyMethod $fJSONyAs$fIsStringMethod$fIsStringMethod0ghc-prim GHC.Types disconnectparsebroadcastSocket readAnswer