Documentation ¶
Index ¶
- type ApplicationController
- func (ac *ApplicationController) BadRequest(w http.ResponseWriter, err error)
- func (ac *ApplicationController) DefaultResponse(w http.ResponseWriter, result interface{}, err error)
- func (ac *ApplicationController) ErrorOutput(w http.ResponseWriter, result ErrorResponse)
- func (ac *ApplicationController) InternalError(w http.ResponseWriter, err error)
- func (ac *ApplicationController) Output(w http.ResponseWriter, result interface{})
- type DirectoryController
- type ErrorResponse
- type FileController
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApplicationController ¶
type ApplicationController struct {
// contains filtered or unexported fields
}
ApplicationController for general application functions
func NewApplicationController ¶
func NewApplicationController( ctx *utils.Context) *ApplicationController
NewApplicationController creates a new app controller instance
func (*ApplicationController) BadRequest ¶
func (ac *ApplicationController) BadRequest(w http.ResponseWriter, err error)
BadRequest sends an error for badly formed requests to the client
func (*ApplicationController) DefaultResponse ¶
func (ac *ApplicationController) DefaultResponse(w http.ResponseWriter, result interface{}, err error)
DefaultResponse returns a bad request error to the client or a formatted JSON output.
func (*ApplicationController) ErrorOutput ¶
func (ac *ApplicationController) ErrorOutput(w http.ResponseWriter, result ErrorResponse)
ErrorOutput writes a error response to the client
func (*ApplicationController) InternalError ¶
func (ac *ApplicationController) InternalError(w http.ResponseWriter, err error)
InternalError sends an error for server errors to the client
func (*ApplicationController) Output ¶
func (ac *ApplicationController) Output(w http.ResponseWriter, result interface{})
Output marshals a struct into JSON format for output
type DirectoryController ¶
type DirectoryController struct { ApplicationController // contains filtered or unexported fields }
DirectoryController is for handling directory actions
func NewDirectoryController ¶
func NewDirectoryController(ctx *utils.Context) *DirectoryController
NewDirectoryController returns a new controller instance
func (*DirectoryController) AtTime ¶
func (dc *DirectoryController) AtTime(w http.ResponseWriter, r *http.Request)
AtTime handles requests for a directory listing at a given time
func (*DirectoryController) Compare ¶
func (dc *DirectoryController) Compare(w http.ResponseWriter, r *http.Request)
Compare handles requests for comparing directory states at different times
func (*DirectoryController) Register ¶
func (dc *DirectoryController) Register(router *mux.Router)
Register registers the directory endpoint with the router
func (*DirectoryController) Show ¶
func (dc *DirectoryController) Show(w http.ResponseWriter, r *http.Request)
Show handles requests for showing a directory listing
type ErrorResponse ¶
ErrorResponse contains error information for the client
type FileController ¶
type FileController struct { ApplicationController // contains filtered or unexported fields }
FileController is for handling file actions
func NewFileController ¶
func NewFileController(ctx *utils.Context) *FileController
NewFileController returns a new controller instance
func (*FileController) AtTime ¶
func (fc *FileController) AtTime(w http.ResponseWriter, r *http.Request)
AtTime handles requests for getting a file version at a point in time.
func (*FileController) History ¶
func (fc *FileController) History(w http.ResponseWriter, r *http.Request)
History handles requests for showing file version history.
func (*FileController) Register ¶
func (fc *FileController) Register(router *mux.Router)
Register registers the file endpoint with the router
func (*FileController) Show ¶
func (fc *FileController) Show(w http.ResponseWriter, r *http.Request)
Show handles requests for showing file information