doitserver

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2015 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

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

func NewAuth

func NewAuth(key string) *Auth

func (*Auth) ServeHTTP

func (a *Auth) ServeHTTP(w http.ResponseWriter, r *http.Request)

type AuthCallback

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

func NewAuthCallback

func NewAuthCallback(consumers *Consumers, key string) *AuthCallback

func (*AuthCallback) ServeHTTP

func (ac *AuthCallback) ServeHTTP(w http.ResponseWriter, r *http.Request)

type AuthCredentials

type AuthCredentials struct {
	ID string `json:"id"`
	CS string `json:"cs"`
}

type AuthMonitor

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

func NewAuthMonitor

func NewAuthMonitor(consumers *Consumers, key string) *AuthMonitor

func (*AuthMonitor) ServeHTTP

func (am *AuthMonitor) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Consumer

type Consumer struct {
	AccessToken string
	ID          string
	Err         string
	Message     string
}

type Consumers

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

func NewConsumers

func NewConsumers() *Consumers

func (*Consumers) Get

func (cc *Consumers) Get(id string) chan Consumer

func (*Consumers) Len

func (cc *Consumers) Len() int

func (*Consumers) Remove

func (cc *Consumers) Remove(id string)

type Server

type Server struct {
	Consumers *Consumers
	Mux       http.Handler
	// contains filtered or unexported fields
}

func NewServer

func NewServer(key string) *Server

type TokenGenerator

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

func NewTokenGenerator

func NewTokenGenerator(key string) *TokenGenerator

func (*TokenGenerator) ServeHTTP

func (tg *TokenGenerator) ServeHTTP(w http.ResponseWriter, r *http.Request)

type TokenResponse

type TokenResponse struct {
	AccessToken string `json:"access_token"`
	ID          string `json:"id"`
	Err         string `json:"err"`
	Message     string `json:"msg"`
}

type UnknownClientError

type UnknownClientError struct{}

UnknownClientError signifies that the client is unknown.

func (*UnknownClientError) Error

func (err *UnknownClientError) Error() string

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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