account

package
v0.0.0-...-8644ba8 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2020 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandlePath

func HandlePath(paths spec.Paths, ar security.AccountReader)

HandlePath registers http.HandleFunc and spec.Operation for paths

Types

type Store

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

Store manages various storage mechanisms

func StoreMem

func StoreMem() *Store

StoreMem development use only. Default user admin:nimda

func StoreMongo

func StoreMongo(session *mgo.Session) *Store

StoreMongo initializes store, call once

func StorePostgres

func StorePostgres(db *sql.DB) *Store

StorePostgres initializes store, call once

func StoreRedis

func StoreRedis(c redis.Conn) *Store

StoreRedis initializes store, call once

func (*Store) ReadAccount

func (s *Store) ReadAccount(name string) (*security.Account, error)

ReadAccount name = Account.name

Jump to

Keyboard shortcuts

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