http

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2015 License: MIT Imports: 18 Imported by: 4

Documentation

Index

Constants

View Source
const (
	CodeRedirect = 302
	KeyToken     = "oauth2_token"
)

Variables

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

Functions

func Start added in v0.1.0

func Start(version, build string)

Types

type ContainersRecord

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

type DeployResult added in v0.4.3

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

type Message added in v0.2.0

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

type OAuth

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

	sync.Mutex
	// contains filtered or unexported fields
}

func NewOAuth

func NewOAuth(config *config.Config) *OAuth

func (*OAuth) HandleCallback

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

func (*OAuth) HandleLogin

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

func (*OAuth) HandleLogout

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

func (*OAuth) Handler

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

type SockJS added in v0.2.0

type SockJS struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewSockJS added in v0.2.0

func NewSockJS() *SockJS

func (*SockJS) AddHandler added in v0.2.0

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

func (*SockJS) AddSessionAndRead added in v0.2.0

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

func (*SockJS) Read added in v0.2.0

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

func (*SockJS) Send added in v0.2.0

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

type SockJSHandler added in v0.2.0

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

type SockJSWriter added in v0.2.0

type SockJSWriter struct {
	// contains filtered or unexported fields
}

func NewSockJSWriter added in v0.2.0

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

func (*SockJSWriter) SetFormater added in v0.2.0

func (s *SockJSWriter) SetFormater(f SockJSWriterFormatter)

func (*SockJSWriter) Write added in v0.2.0

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

type SockJSWriterFormatter added in v0.2.0

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

type StatusRecord

type StatusRecord struct {
	LastRevisionLabel string
	*core.ProjectStatus
}

type StatusResult

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

type User

type User struct {
	Fullname string
	Avatar   string
}

Jump to

Keyboard shortcuts

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