controller

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2014 License: BSD-2-Clause Imports: 20 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogRequest

func LogRequest(req *http.Request)

func ParseMultipartForm

func ParseMultipartForm(r *http.Request) (params map[string]string, files core.FormFiles, err error)

helper function for create & update

func PrintLogo()

func RawDir

func RawDir(cx *goweb.Context)

func ResourceDescription

func ResourceDescription(cx *goweb.Context)

func RespondTokenInHeader

func RespondTokenInHeader(cx *goweb.Context, token string)

func SiteDir

func SiteDir(cx *goweb.Context)

Types

type AwfController

type AwfController struct{}

func (*AwfController) Options

func (cr *AwfController) Options(cx *goweb.Context)

OPTIONS: /awf

func (*AwfController) Read

func (cr *AwfController) Read(id string, cx *goweb.Context)

GET: /awf/{name} get a workflow by name, read-only

func (*AwfController) ReadMany

func (cr *AwfController) ReadMany(cx *goweb.Context)

GET: /awf get all loaded workflows

type ClientController

type ClientController struct{}

func (*ClientController) Create

func (cr *ClientController) Create(cx *goweb.Context)

POST: /client

func (*ClientController) Delete

func (cr *ClientController) Delete(id string, cx *goweb.Context)

DELETE: /client/{id}

func (*ClientController) DeleteMany

func (cr *ClientController) DeleteMany(cx *goweb.Context)

DELETE: /client

func (*ClientController) Options

func (cr *ClientController) Options(cx *goweb.Context)

OPTIONS: /client

func (*ClientController) Read

func (cr *ClientController) Read(id string, cx *goweb.Context)

GET: /client/{id}

func (*ClientController) ReadMany

func (cr *ClientController) ReadMany(cx *goweb.Context)

GET: /client

func (*ClientController) Update

func (cr *ClientController) Update(id string, cx *goweb.Context)

PUT: /client/{id} -> status update

func (*ClientController) UpdateMany

func (cr *ClientController) UpdateMany(cx *goweb.Context)

PUT: /client

type JobController

type JobController struct{}

func (*JobController) Create

func (cr *JobController) Create(cx *goweb.Context)

POST: /job

func (*JobController) Delete

func (cr *JobController) Delete(id string, cx *goweb.Context)

DELETE: /job/{id}

func (*JobController) DeleteMany

func (cr *JobController) DeleteMany(cx *goweb.Context)

DELETE: /job?suspend

func (*JobController) Options

func (cr *JobController) Options(cx *goweb.Context)

OPTIONS: /job

func (*JobController) Read

func (cr *JobController) Read(id string, cx *goweb.Context)

GET: /job/{id}

func (*JobController) ReadMany

func (cr *JobController) ReadMany(cx *goweb.Context)

GET: /job To do: - Iterate job queries

func (*JobController) Update

func (cr *JobController) Update(id string, cx *goweb.Context)

PUT: /job/{id} -> used for job manipulation

func (*JobController) UpdateMany

func (cr *JobController) UpdateMany(cx *goweb.Context)

PUT: /job

type ProxyController

type ProxyController struct {
	Client *ClientController
	Work   *WorkController
}

func NewProxyController

func NewProxyController() *ProxyController

type Query

type Query struct {
	Li map[string][]string
}

func (*Query) All

func (q *Query) All() map[string][]string

func (*Query) Has

func (q *Query) Has(key string) bool

func (*Query) List

func (q *Query) List(key string) []string

func (*Query) Value

func (q *Query) Value(key string) string

type QueueController

type QueueController struct{}

func (*QueueController) Create

func (cr *QueueController) Create(cx *goweb.Context)

POST: /queue

func (*QueueController) Delete

func (cr *QueueController) Delete(id string, cx *goweb.Context)

DELETE: /queue/{id}

func (*QueueController) DeleteMany

func (cr *QueueController) DeleteMany(cx *goweb.Context)

DELETE: /queue

func (*QueueController) Options

func (cr *QueueController) Options(cx *goweb.Context)

OPTIONS: /queue

func (*QueueController) Read

func (cr *QueueController) Read(id string, cx *goweb.Context)

GET: /queue/{id}

func (*QueueController) ReadMany

func (cr *QueueController) ReadMany(cx *goweb.Context)

GET: /queue get status from queue manager

func (*QueueController) Update

func (cr *QueueController) Update(id string, cx *goweb.Context)

PUT: /queue/{id} -> status update

func (*QueueController) UpdateMany

func (cr *QueueController) UpdateMany(cx *goweb.Context)

PUT: /queue

type ServerController

type ServerController struct {
	Awf    *AwfController
	Client *ClientController
	Job    *JobController
	Queue  *QueueController
	Work   *WorkController
	User   *UserController
}

func NewServerController

func NewServerController() *ServerController

type UserController

type UserController struct{}

func (*UserController) Create

func (cr *UserController) Create(cx *goweb.Context)

POST: /user To create a new user make a empty POST to /user with user:password Basic Auth encoded in the header. Return new user object.

func (*UserController) Delete

func (cr *UserController) Delete(id string, cx *goweb.Context)

DELETE: /user/{id}

func (*UserController) DeleteMany

func (cr *UserController) DeleteMany(cx *goweb.Context)

DELETE: /user

func (*UserController) Options

func (cr *UserController) Options(cx *goweb.Context)

OPTIONS: /user

func (*UserController) Read

func (cr *UserController) Read(id string, cx *goweb.Context)

GET: /user/{id}

func (*UserController) ReadMany

func (cr *UserController) ReadMany(cx *goweb.Context)

GET: /user

func (*UserController) Update

func (cr *UserController) Update(id string, cx *goweb.Context)

PUT: /user/{id}

func (*UserController) UpdateMany

func (cr *UserController) UpdateMany(cx *goweb.Context)

PUT: /user

type WorkController

type WorkController struct{}

func (*WorkController) Options

func (cr *WorkController) Options(cx *goweb.Context)

OPTIONS: /work

func (*WorkController) Read

func (cr *WorkController) Read(id string, cx *goweb.Context)

GET: /work/{id} get a workunit by id, read-only

func (*WorkController) ReadMany

func (cr *WorkController) ReadMany(cx *goweb.Context)

GET: /work checkout a workunit with earliest submission time to-do: to support more options for workunit checkout

func (*WorkController) Update

func (cr *WorkController) Update(id string, cx *goweb.Context)

PUT: /work/{id} -> status update

Jump to

Keyboard shortcuts

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