server

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunServer

func RunServer()

RunServer is the http listener/server

Types

type MockSession

type MockSession struct{}

MockSession define mock receiver

func (MockSession) Check

Check if session is active

func (MockSession) CheckToken

func (ms MockSession) CheckToken(conn *redigomock.Conn, inputVal string) bool

CheckToken mocks the CheckToken method on Session receiver

func (MockSession) CreateToken

func (ms MockSession) CreateToken(conn *redigomock.Conn, inputVal string)

CreateToken mocks token generation

func (MockSession) Start

func (ms MockSession) Start(mc *redigomock.Conn) http.HandlerFunc

Start mocks machine ID and hashing http response

type Runner

type Runner interface {
	Start() http.HandlerFunc
}

Runner is the main server interface

type Session

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

Session management object

func (Session) Check

func (s Session) Check(c redis.Conn) http.HandlerFunc

Check if session is active

func (Session) NewRole

func (s Session) NewRole(c redis.Conn) http.HandlerFunc

NewRole is an admin function to build new rule

func (Session) Start

func (s Session) Start(c redis.Conn) http.HandlerFunc

Start creates the memory token

Jump to

Keyboard shortcuts

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