CheckIt

package module
v0.0.0-...-921f8aa Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2016 License: Apache-2.0, MIT Imports: 18 Imported by: 1

Documentation

Overview

Copyright 2015 Steven Labrum

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AboutPage

func AboutPage(w http.ResponseWriter, r *http.Request)

func CombinedRun

func CombinedRun(timeout time.Duration, runPath string, args ...string) (out []byte, err error)

func FrontPage

func FrontPage(w http.ResponseWriter, r *http.Request)
FrontPage is an HTTP handler that displays the basecase

unless a stored page is being loaded.

func InterfaceRun

func InterfaceRun(box Box, textareas []string) (out []byte, err error)

golang Runs commands specified in args using input as Stdin

func Lang

func Lang(this []*BoxStruct, name string) string

func PipeCompile

func PipeCompile(w http.ResponseWriter, req *http.Request)

Compile is an HTTP handler that reads Source code from the request, runs the program (returning any errors), and sends the program's output as the HTTP response.

func Run

func Run(timeout time.Duration, runPath string, args ...string) (out []byte, stderr []byte, err error)

func Save

func Save(path string, folderName string)

func Serve

func Serve(config *Config, boxs ...Box) (err error)

func Share

func Share(page Page) string

Types

type AboutStruct

type AboutStruct struct {
	Text          string
	SecondaryText string
}

type Box

type Box interface {
	Desc() (heading string, description string, text string, syntax string)
	Run(textAreas []string, runPath string) ([]byte, error)
}

type BoxStruct

type BoxStruct struct {
	Id       string
	Position string
	Total    int
	Head     string
	Text     string
	Lang     string
	Body     string
}

func ReadBox

func ReadBox(filename string) *BoxStruct

type Boxes

type Boxes []*BoxStruct

func (Boxes) Len

func (this Boxes) Len() int

func (Boxes) Swap

func (this Boxes) Swap(i, j int)

type Config

type Config struct {
	Path      string
	Port      string
	About     string
	AboutSide string
	Heading   string
}

func ReadConfig

func ReadConfig(filename string) *Config

type Page

type Page struct {
	Heading string
}

Directories

Path Synopsis
Examples

Jump to

Keyboard shortcuts

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