storage

package
v0.0.0-...-c5558d5 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	MyDB
	// contains filtered or unexported fields
}

DB -

func NewClient

func NewClient() *DB

NewClient -

func (*DB) Delete

func (db *DB) Delete(ctx context.Context, key interface{}) error

Delete -

func (*DB) Get

func (db *DB) Get(ctx context.Context, key interface{}) (interface{}, error)

Get -

func (*DB) Set

func (db *DB) Set(ctx context.Context, key, value interface{}) error

Set -

type Iface

type Iface interface {
	CreateEmployeeAuth(ctx context.Context, ID string) (string, error)
	CheckAuth(ctx context.Context, ID string) error
}

Iface - storage interface

type MyDB

type MyDB interface {
	Set(ctx context.Context, key, value interface{}) error
	Get(key interface{}) (interface{}, error)
	Delete(key interface{}) error
}

MyDB - my in memory database

type Storage

type Storage struct {
	Iface
	// contains filtered or unexported fields
}

Storage - this is sti implementor

func GetClient

func GetClient() *Storage

GetClient -

func (*Storage) CheckAuth

func (s *Storage) CheckAuth(ctx context.Context, ID string) error

func (*Storage) CreateEmployeeAuth

func (s *Storage) CreateEmployeeAuth(ctx context.Context, ID string) (string, error)

Jump to

Keyboard shortcuts

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