ta

package
v0.0.0-...-0ba3bd2 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2015 License: Apache-2.0 Imports: 9 Imported by: 17

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Db

type Db interface {
	// 取得。
	Get(id string) (Element, error)
}

TA 情報の格納庫。

func NewMemoryDb

func NewMemoryDb(elems []Element) Db

func NewMongoDb

func NewMongoDb(pool *mgo.Session, db, coll string, webDb web.Db) Db

db: DB 名。 coll: コレクション名。

type Element

type Element interface {
	Id() string

	// 言語タグから表示名へのマップ。
	Names() map[string]string

	// リダイレクトエンドポイント。
	RedirectUris() map[string]bool

	// 鍵。
	Keys() []jwk.Key

	// セクタ固有のアカウント ID を使うかどうか。
	Pairwise() bool

	// セクタ固有のアカウント ID の計算に使うセクタ ID。
	Sector() string
}

TA 情報。

func New

func New(id string, names map[string]string, rediUris map[string]bool, keys []jwk.Key, pw bool, sect string) Element

主のテスト用。

Jump to

Keyboard shortcuts

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