controller

package
v0.0.0-...-3ae992e Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2016 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthController

type AuthController interface {
	// contains filtered or unexported methods
}

func NewAuthController

func NewAuthController(tokenizer Tokenizer) AuthController

type AuthControllerImpl

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

type Config

type Config struct {
	TokenKey       string
	Salt           string
	EnableRegister bool
	MongoDb        struct {
		Host     string
		Port     int
		Database string
		User     string
		Password string
	}
}

func ReadConfig

func ReadConfig(path string) (Config, error)

type Credentials

type Credentials struct {
	Username string
	Password string
}

type Crypter

type Crypter interface {
	// contains filtered or unexported methods
}

func NewCrypter

func NewCrypter(salt []byte) Crypter

type CrypterImpl

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

type IntervalController

type IntervalController interface {
	Start(c web.C, w http.ResponseWriter, r *http.Request)
	Stop(c web.C, w http.ResponseWriter, r *http.Request)
}

func NewIntervalController

func NewIntervalController(intervalDao models.IntervalDao) IntervalController

type IntervalControllerImpl

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

func (*IntervalControllerImpl) Start

func (controller *IntervalControllerImpl) Start(c web.C, w http.ResponseWriter, r *http.Request)

func (*IntervalControllerImpl) Stop

func (controller *IntervalControllerImpl) Stop(c web.C, w http.ResponseWriter, r *http.Request)

type RegisterRequest

type RegisterRequest struct {
	Username string
	Password string
	WorkTime string
}

func NewRegisterRequest

func NewRegisterRequest(username, password, workTime string) RegisterRequest

type Tokenizer

type Tokenizer interface {
	// contains filtered or unexported methods
}

func NewTokenizer

func NewTokenizer(key []byte) Tokenizer

type TokenizerImpl

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

type UserController

type UserController interface {
	Register(c web.C, w http.ResponseWriter, r *http.Request)
	GetToken(c web.C, w http.ResponseWriter, r *http.Request)
}

func NewUserController

func NewUserController(userDao models.UserDao, crypter Crypter, tokenizer Tokenizer) UserController

type UserControllerImpl

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

func (*UserControllerImpl) GetToken

func (controller *UserControllerImpl) GetToken(c web.C, w http.ResponseWriter, r *http.Request)

func (*UserControllerImpl) Register

func (controller *UserControllerImpl) Register(c web.C, w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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