request

package
v0.0.0-...-51d629d Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2016 License: BSD-3-Clause, BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authenticate

type Authenticate struct {
	*stamp.Timestamp
	Token string
}

func NewAuthenticate

func NewAuthenticate() *Authenticate

func (*Authenticate) Check

func (r *Authenticate) Check() error

type Login

type Login struct {
	*stamp.Timestamp
	Login    string
	Password string
}

The login structure is passed for every login request. It is usually encoded into json in the request package. All fields are required and are tested by the check() routine.

func NewLogin

func NewLogin() *Login

Create a new login request with the time set to 'now'

func (*Login) Check

func (r *Login) Check() error

Check to see that all login elements are correct. Time must be within a window in order for it to pass (within 2 minutes of play)

func (*Login) GetLogin

func (r *Login) GetLogin() string

func (*Login) GetPassword

func (r *Login) GetPassword() string

type Logout

type Logout struct {
	*stamp.Timestamp
	Token string
}

func NewLogout

func NewLogout() *Logout

func (*Logout) Check

func (r *Logout) Check() error

type Register

type Register struct {
	*stamp.Timestamp
	Login    string
	Name     string
	Email    string
	Password string
}

func NewRegister

func NewRegister() *Register

func (*Register) Check

func (r *Register) Check() error

type Test

type Test struct {
	*stamp.Timestamp
}

func NewTest

func NewTest() *Test

func (*Test) Check

func (r *Test) Check() error

type Update

type Update struct {
	*stamp.Timestamp
	Token       string
	Login       string
	Name        string
	Email       string
	NewPassword string
	OldPassword string
}

func NewUpdate

func NewUpdate() *Update

func (*Update) Check

func (r *Update) Check() error

Jump to

Keyboard shortcuts

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