server

package
v0.0.0-...-ee81150 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2014 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultPort = 8080
)

Variables

This section is empty.

Functions

func Start

func Start(env core.Environment, bind string, port int, storage string)

Types

type Case

type Case struct {
	Id          int       `orm:"auto"`
	Description string    `orm:"default(""), type(text)"`
	Created     time.Time `orm:"auto_now_add;type(datetime)"`
	Updated     time.Time `orm:"auto_now_add;type(datetime)"`
	IsSigned    bool      `orm:"default(false)"`
	IsPrivate   bool      `orm:"default(false)"`
	Token       string
	Config      string  `orm:"default(""), type(text)"`
	Signed      string  `orm:"default(""), type(text)"`
	Files       []*File `orm:"reverse(many)"`
}

type CaseHandler

type CaseHandler struct {
	StoragePath string
}

func (*CaseHandler) Create

func (handler *CaseHandler) Create(request *restful.Request, response *restful.Response)

func (*CaseHandler) Get

func (handler *CaseHandler) Get(request *restful.Request, response *restful.Response)

func (*CaseHandler) GetFile

func (handler *CaseHandler) GetFile(request *restful.Request, response *restful.Response)

func (*CaseHandler) UploadFiles

func (handler *CaseHandler) UploadFiles(request *restful.Request, response *restful.Response)

type File

type File struct {
	Id      int `orm:"auto"`
	Path    string
	Created time.Time `orm:"auto_now_add;type(datetime)"`
	Case    *Case     `orm:"rel(fk)"`
}

type UploadFile

type UploadFile struct {
	Filename string
	Content  string
}

Jump to

Keyboard shortcuts

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