package
0.0.0-20201009145100-02be50dc5d05
Repository: https://github.com/googleinterns/recomator.git
Documentation: pkg.go.dev
# Functions
NewApplyRequestHandler creates new applyRequestHandler.
NewAuthorizationService creates new AuthorizationService to access GoogleAPIs.
NewCheckRequestHandler creates new checkRequestHandler.
NewConfig creates the configuration of oauth2 using given clientID, clientSecret and redirectURL.
NewListRequestHandler creates new listRequestHandler.
NewRequestsMap creates new RequestsMap.
NewSharedService creates new sharedService to access GoogleAPIs.
SetUpRouter creates new router using SharedService.
StartProcessingWithNewRequestID finds unused request ID and calls StartProcessing method of RequestsMap.
# Structs
CheckRequest contains the body of POST /requirements.
CheckRequirementsResponse is response to /requirements method.
CheckStatusResponse is the response to recommendations/name/checkStatus method.
ErrorResponse is response with error containing error message.
ListRecommendationsResponse is response to list/recommendations method.
ListRequest contains the body of POST /recommendations request.
Progress is the structure that stores the fraction of work done for some request.
ProjectsResponse is the response to projects.list method.
RequestInfo contains information needed to indentify the request.
RequestsMap contains current requests and handles getting response for them, deleting, adding new requests.
Response contains response that should be sent in response to the request.
SharedService is the struct that contains authorization service and information about currently processed requests.
User contains fields describing authorized user: Email and GoogleService with required access to Google APIs.
# Interfaces
AuthorizationService creates the user using authentication code and returns idToken.
RequestHandler is the type that can start request processing and get results.