api

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: May 9, 2017 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version = "(development)"

Functions

func AuthHandler

func AuthHandler(cookieSession *sessions.CookieStore, h http.Handler) http.Handler

Types

type Api

type Api struct {
	Web *WebServer /* Webserver that gets spawned to handle http requests */

}

func NewApi

func NewApi() *Api

func (*Api) ReadConfig

func (a *Api) ReadConfig(path string) error

func (*Api) Run

func (a *Api) Run() error

type BOSHHandler

type BOSHHandler struct {
	CookieSession *sessions.CookieStore
	BOSHClient    *bosh.Client
}

type Config

type Config struct {
	Addr              string `yaml:"listen_addr"`
	BoshAddr          string `yaml:"bosh_addr"`
	UAA               UAA    `yaml:"uaa"`
	WebRoot           string `yaml:"web_root"`
	CookieSecret      string `yaml:"cookie_secret"`
	SkipSSLValidation bool   `yaml:"skip_ssl_validation"`
}

type ErrorResponse

type ErrorResponse struct {
	Error       string `json:"error,omitempty"`
	Description string `json:"description"`
}

type Params

type Params struct {
	User      string `json:"user"`
	Password  string `json:"password"`
	PublicKey string `json:"public_key"`
}

type SSHRequest

type SSHRequest struct {
	Command        string `json:"command"`
	DeploymentName string `json:"deployment_name"`
	Target         Target `json:"target"`
	Params         Params `json:"params"`
}

type Target

type Target struct {
	Job     string   `json:"job"`
	Indexes []string `json:"indexes"`
	Ids     []string `json:"ids"`
}

type UAA added in v0.2.0

type UAA struct {
	ClientID     string `yaml:"client_id"`
	ClientSecret string `yaml:"client_secret"`
}

type WebServer

type WebServer struct {
	Addr          string
	WebRoot       string
	Api           *Api
	CookieSession *sessions.CookieStore
	BOSHClient    *bosh.Client
}

func (*WebServer) Setup

func (ws *WebServer) Setup() error

Setup webserver

func (*WebServer) Start

func (ws *WebServer) Start()

Start webserver

Jump to

Keyboard shortcuts

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