user

package
v0.0.0-...-d370aa6 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2016 License: MIT Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EmptyArgs

type EmptyArgs struct {
}

EmptyArgs - struct for empty args

type Service

type Service struct {
	Log     *log.Logger
	DB      *database.DB
	Field   string // Context field for Sessiondata
	IPField string // Context field for Real ip
}

Service holds service attributes

func New

func New(logger *log.Logger, db *database.DB, field, ipfield string) *Service

func (*Service) Profile

func (srv *Service) Profile(r *http.Request, args *EmptyArgs, result *token.Record) error

Profile - return current user's profile (from JWT)

func (*Service) UserSetPassword

func (srv *Service) UserSetPassword(r *http.Request, args *UserSetPasswordArgs, result *int64) error

UserSetPassword - set new password

type UserSetPasswordArgs

type UserSetPasswordArgs struct {
	Password, Password2 string
}

UserSetPasswordArgs - аргументы метода UserSetPassword

Jump to

Keyboard shortcuts

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