handlers

package
v0.4.8 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2016 License: Apache-2.0 Imports: 4 Imported by: 2

README

handlers

import "github.com/coralproject/shelf/cmd/corald/handlers"

Overview

Package handlers contains the handler logic for processing requests.

Index

Package files

action.go proxy.go version.go

Variables

var (
    // ErrParameterNotFound is action not found error.
    ErrParameterNotFound = errors.New("Parameter not found")

    // ErrActionNotFound is action not found error.
    ErrActionNotFound = errors.New("Action not found")

    //ErrActionNotAllowed is an error when the action is not allowed.
    ErrActionNotAllowed = errors.New("Action not allowed")

    //ErrTypeNotExpected comes when the type asserted was not expected.
    ErrTypeNotExpected = errors.New("Type not expected")
)
var Action actionHandle

Action fronts the access to the action service functionality.

var Version verHandle

Version fronts the access to the ver service functionality.

func Proxy

func Proxy(targetURL string, rewrite func(*web.Context) string) web.Handler

Proxy will setup a direct proxy inbetween this service and the destination service using the rewrite function if specified. If the rewrite function is not specified, the path on the target will be set to the target path concatenated with the request path.


Generated by godoc2md

Documentation

Overview

Package handlers contains the handler logic for processing requests.

Index

Constants

This section is empty.

Variables

View Source
var (

	// ErrParameterNotFound is action not found error.
	ErrParameterNotFound = errors.New("Parameter not found")

	// ErrActionNotFound is action not found error.
	ErrActionNotFound = errors.New("Action not found")

	//ErrActionNotAllowed is an error when the action is not allowed.
	ErrActionNotAllowed = errors.New("Action not allowed")

	//ErrTypeNotExpected comes when the type asserted was not expected.
	ErrTypeNotExpected = errors.New("Type not expected")
)
View Source
var Action actionHandle

Action fronts the access to the action service functionality.

View Source
var Version verHandle

Version fronts the access to the ver service functionality.

Functions

func Proxy added in v0.4.1

func Proxy(targetURL string, rewrite func(*web.Context) string) web.Handler

Proxy will setup a direct proxy inbetween this service and the destination service using the rewrite function if specified. If the rewrite function is not specified, the path on the target will be set to the target path concatenated with the request path.

Types

This section is empty.

Jump to

Keyboard shortcuts

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