controller

package
v0.0.0-...-67a34a8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 22, 2019 License: MIT Imports: 9 Imported by: 1

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL