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 ¶
type Credentials ¶
type Crypter ¶
type Crypter interface {
// contains filtered or unexported methods
}
func NewCrypter ¶
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 ¶
func NewRegisterRequest ¶
func NewRegisterRequest(username, password, workTime string) RegisterRequest
type Tokenizer ¶
type Tokenizer interface {
// contains filtered or unexported methods
}
func NewTokenizer ¶
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)
Click to show internal directories.
Click to hide internal directories.