Documentation ¶
Index ¶
- func Get(rp RequestProcessFunc) http.HandlerFunc
- func Login(oAuth *service.OAuth) http.HandlerFunc
- func OAuthCallback(oAuth *service.OAuth, jwt *service.JWT, userRepo *repository.Users, ...) http.HandlerFunc
- type Export
- type RequestProcessFunc
- func GetAssignmentsForUserExperiment(repo *repository.Assignments) RequestProcessFunc
- func GetExperimentDetails(repo *repository.Experiments, assignmentsRepo *repository.Assignments) RequestProcessFunc
- func GetExperiments(repo *repository.Experiments, assignmentsRepo *repository.Assignments) RequestProcessFunc
- func GetFeatures(repo *repository.Features) RequestProcessFunc
- func GetFilePairAnnotations(repo *repository.Assignments) RequestProcessFunc
- func GetFilePairDetails(repo *repository.FilePairs) RequestProcessFunc
- func GetFilePairs(repo *repository.FilePairs) RequestProcessFunc
- func Me(usersRepo *repository.Users) RequestProcessFunc
- func SaveAssignment(repo *repository.Assignments) RequestProcessFunc
- func Version(version string) RequestProcessFunc
- type Static
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Get ¶
func Get(rp RequestProcessFunc) http.HandlerFunc
Get returns an http.HandlerFunc that will serve the user request taking the serializer.Response and errors from the passed RequestProcessFunc
func Login ¶
func Login(oAuth *service.OAuth) http.HandlerFunc
Login handler redirects user to oauth provider
func OAuthCallback ¶
func OAuthCallback( oAuth *service.OAuth, jwt *service.JWT, userRepo *repository.Users, uiDomain string, logger logrus.FieldLogger, ) http.HandlerFunc
OAuthCallback makes exchange with oauth provider, gets&creates user and redirects to index page with JWT token
Types ¶
type Export ¶
type Export struct {
// contains filtered or unexported fields
}
Export contains handlers for file export
func (*Export) Create ¶
Create creates new export file and returns a *serializer.Response with the name of new file
type RequestProcessFunc ¶
type RequestProcessFunc func(*http.Request) (*serializer.Response, error)
RequestProcessFunc is a function that takes an http.Request, and returns a serializer.Response and an error
func GetAssignmentsForUserExperiment ¶
func GetAssignmentsForUserExperiment(repo *repository.Assignments) RequestProcessFunc
GetAssignmentsForUserExperiment returns a function that returns a *serializer.Response with the assignments for the logged user and a passed experiment if these assignments do not already exist, they are created in advance
func GetExperimentDetails ¶
func GetExperimentDetails(repo *repository.Experiments, assignmentsRepo *repository.Assignments) RequestProcessFunc
GetExperimentDetails returns a function that returns a *serializer.Response with the details of a requested experiment
func GetExperiments ¶ added in v0.0.2
func GetExperiments(repo *repository.Experiments, assignmentsRepo *repository.Assignments) RequestProcessFunc
GetExperiments returns a function that returns a *serializer.Response with the list of existing experiments
func GetFeatures ¶
func GetFeatures(repo *repository.Features) RequestProcessFunc
GetFeatures returns a function that returns a *serializer.Response with the list of features for blobId
func GetFilePairAnnotations ¶
func GetFilePairAnnotations(repo *repository.Assignments) RequestProcessFunc
GetFilePairAnnotations returns a function that returns a *serializer.Response with the Annotation results for the given File Pair and Experiment IDs
func GetFilePairDetails ¶
func GetFilePairDetails(repo *repository.FilePairs) RequestProcessFunc
GetFilePairDetails returns a function that returns a *serializer.Response with the details of the requested FilePair
func GetFilePairs ¶
func GetFilePairs(repo *repository.FilePairs) RequestProcessFunc
GetFilePairs returns a function that returns a *serializer.Response with the list of file pairs for the given experiment ID
func Me ¶
func Me(usersRepo *repository.Users) RequestProcessFunc
Me handler returns a function that returns a *serializer.Response with the information about the current user
func SaveAssignment ¶
func SaveAssignment(repo *repository.Assignments) RequestProcessFunc
SaveAssignment returns a function that saves the user answers as passed in the body request
func Version ¶ added in v0.0.1
func Version(version string) RequestProcessFunc
Version returns a function that returns a *serializer.Response with a current version of server
type Static ¶ added in v0.0.1
type Static struct {
// contains filtered or unexported fields
}
Static contains handlers to serve static using go-bindata
func (*Static) ServeHTTP ¶ added in v0.0.1
func (s *Static) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP serves any static file from static directory or fallbacks on index.hml
func (*Static) ServeIndexHTML ¶ added in v0.0.1
func (s *Static) ServeIndexHTML(initialState interface{}) http.HandlerFunc
ServeIndexHTML serves index.html file with initial state