generator

package
v0.0.0-...-bde9826 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateKey

func GenerateKey(k Key) string

GenerateKey generates key

func GeneratePass

func GeneratePass(p Pass, s string) string

GeneratePass method

Types

type Access

type Access interface {
	Generate(i AccessInput) (TokenOutput, error)
}

Access interface

func AccessToken

func AccessToken() Access

AccessToken method

type AccessInput

type AccessInput struct {
	UserKey     string
	ClientKey   string
	SecretToken string
	Expiry      int64
}

AccessInput struct

type Key

type Key interface {
	Generate() string
}

Key interface

func XIDKey

func XIDKey() Key

XIDKey method

type Pass

type Pass interface {
	Generate(s string) string
}

Pass interface

func HashedPass

func HashedPass() Pass

HashedPass method

type Token

type Token interface {
	Generate() (TokenOutput, error)
}

Token interface

func APIToken

func APIToken(l int) Token

APIToken method

func RefreshToken

func RefreshToken(l int) Token

RefreshToken method

func SecretToken

func SecretToken(l int) Token

SecretToken method

type TokenOutput

type TokenOutput struct {
	Token     string
	CreatedOn int64
}

TokenOutput struct

func GenerateAccess

func GenerateAccess(a Access, i AccessInput) (TokenOutput, error)

GenerateAccess method

func GenerateToken

func GenerateToken(g Token) (TokenOutput, error)

GenerateToken method

Jump to

Keyboard shortcuts

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