dockership: Index | Files

package http

import ""


Package Files

emiters.go handle_connect.go handle_containers.go handle_deploy.go handle_status.go logger.go oauth.go server.go sockjs.go


const (
    CodeRedirect = 302
    KeyToken     = "oauth2_token"


var ErrProjectNotFound = errors.New("Project not found")

func Start Uses

func Start(version, build string)

type ContainersRecord Uses

type ContainersRecord struct {
    Project   *core.Project
    Container *core.Container
    Error     []error

type DeployResult Uses

type DeployResult struct {
    Done    bool
    Elapsed time.Duration
    Errors  []error `json:",omitempty"`

type Message Uses

type Message struct {
    Event   string
    Request map[string]string

type OAuth Uses

type OAuth struct {
    PathLogin    string // Path to handle OAuth 2.0 logins.
    PathLogout   string // Path to handle OAuth 2.0 logouts.
    PathCallback string // Path to handle callback from OAuth 2.0 backend
    PathError    string // Path to handle error cases.
    OAuthConfig  *oauth2.Config
    Config       *config.Config

    // contains filtered or unexported fields

func NewOAuth Uses

func NewOAuth(config *config.Config) *OAuth

func (*OAuth) HandleCallback Uses

func (o *OAuth) HandleCallback(w http.ResponseWriter, r *http.Request)

func (*OAuth) HandleLogin Uses

func (o *OAuth) HandleLogin(w http.ResponseWriter, r *http.Request)

func (*OAuth) HandleLogout Uses

func (o *OAuth) HandleLogout(w http.ResponseWriter, r *http.Request)

func (*OAuth) Handler Uses

func (o *OAuth) Handler(w http.ResponseWriter, r *http.Request) bool

type SockJS Uses

type SockJS struct {
    // contains filtered or unexported fields

func NewSockJS Uses

func NewSockJS() *SockJS

func (*SockJS) AddHandler Uses

func (s *SockJS) AddHandler(event string, handler SockJSHandler)

func (*SockJS) AddSessionAndRead Uses

func (s *SockJS) AddSessionAndRead(session sockjs.Session)

func (*SockJS) Read Uses

func (s *SockJS) Read(session sockjs.Session)

func (*SockJS) Send Uses

func (s *SockJS) Send(event, data interface{}, isJSON bool)

type SockJSHandler Uses

type SockJSHandler func(msg Message, session sockjs.Session)

type SockJSWriter Uses

type SockJSWriter struct {
    // contains filtered or unexported fields

func NewSockJSWriter Uses

func NewSockJSWriter(sockjs *SockJS, event string) *SockJSWriter

func (*SockJSWriter) SetFormater Uses

func (s *SockJSWriter) SetFormater(f SockJSWriterFormatter)

func (*SockJSWriter) Write Uses

func (s *SockJSWriter) Write(raw []byte) (int, error)

type SockJSWriterFormatter Uses

type SockJSWriterFormatter func(raw []byte) []byte

type StatusRecord Uses

type StatusRecord struct {
    LastRevisionLabel string

type StatusResult Uses

type StatusResult struct {
    Project *core.Project
    Status  map[string]*StatusRecord
    Error   []error

type User Uses

type User struct {
    Fullname string
    Avatar   string

Package http imports 18 packages (graph) and is imported by 4 packages. Updated 2016-07-16. Refresh now. Tools for package owners.