Documentation ¶
Overview ¶
Package controller refers to controll part of mvc. It performs validation, errorhandling and buisness logic
Package controller refers to controll part of mvc. It performs validation, errorhandling and buisness logic
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CodeSnippetController ¶
type CodeSnippetController struct { }
CodeSnippetController represents a section of code in a given file.
func (CodeSnippetController) GetImplementation ¶
func (codeSnippet CodeSnippetController) GetImplementation(w http.ResponseWriter, r *http.Request)
GetImplementation fetch implementation of data structure based upon query parameters.
type RepoController ¶
type RepoController struct {
URI string // Where the repository was found
}
RepoController represents metadata for a git repository.
func (RepoController) GetAllRepos ¶
func (repo RepoController) GetAllRepos(w http.ResponseWriter, r *http.Request)
GetAllRepos gets all repositories stored.
func (RepoController) NewRepoFromURI ¶
func (repo RepoController) NewRepoFromURI(w http.ResponseWriter, r *http.Request)
NewRepoFromURI upgrades a getrequest to a websocket expecting the client to send a json with uri field and saves the git repository it refers to.
func (RepoController) ParseInitial ¶
func (repo RepoController) ParseInitial(w http.ResponseWriter, r *http.Request)
ParseInitial parse a repository for functions of a certain project in repos directory.
type WebsocketResponse ¶
type WebsocketResponse struct { StatusCode int `json:"statuscode"` // StatusCode is http equivalent of websocket status. StatusText string `json:"statustext"` // StatusText is http equivalent of websocket status. Body interface{} `json:"body"` // Body is the content expected by the client. }
WebsocketResponse is the response format of a websocket