storage

package
v0.0.7 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter interface {
	Token(id string) (*Token, error)
}

Adapter represnt abstract interface for communication of storage tools.

type Store

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

Store helps to work with data by using abstact methods.

func New

func New(adapter Adapter) *Store

New creates new store.

func (*Store) Token

func (s *Store) Token(id string) (*Token, error)

Token returns full information about the auth method by uniqnue id.

type Token

type Token struct {
	ID      string `json:"id" db:"id"`
	Name    string `json:"name" db:"name"`
	Enabled bool   `json:"enabled" db:"enabled"`
}

Token represents full information about the auth-method of the request.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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