repository

package
v0.0.0-...-cee1f35 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2020 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TestBlacklist = []string{}
View Source
var TestUser = map[string]string{
	"salt":       "25b072f201ef24e750dcc558eaf2d8f3",
	"hash":       "1743545c93d519060a72e5671a66cbe898163b41d8be2a92a57ac3b6a2650c8394cf4f009aa0df642721145694879ace89c1a9973ff601538220d6a59f665524022fc789a3f6512d7f4654ff8f39c7ba7ec5b12e93c08df97be9f8a4",
	"refresh":    "Uq_XJB5p5clZ_lAjFVND0oTYT9uFe8plBfGHFGMZ4RI=",
	"expiration": strconv.FormatInt(time.Now().Add(24*time.Hour).Unix(), 10),
}

Functions

This section is empty.

Types

type DepositWithdrawer

type DepositWithdrawer interface {
	Withdrawer
	Depositor
	SetBlacklist(token string, exp time.Duration) error
	IsBlacklisted(token string) (bool, error)
	RemoveRefreshToken(userId string) error
	WithContext(ctx context.Context)
}

type Depositor

type Depositor interface {
	SetRefreshToken(userId string, token string, exp time.Duration) error
	SetSalt(userId string, salt string) error
	SetHash(userId string, hash string) error
}

type Repository

type Repository interface {
	io.Closer
	DepositWithdrawer
}

func NewTestRepository

func NewTestRepository() Repository

type Withdrawer

type Withdrawer interface {
	GetRefreshToken(userId string) (string, error)
	GetSalt(userId string) (string, error)
	GetHash(userId string) (string, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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