web

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: 6 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Db

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

web 上のデータを取って来る。

func NewDirectDb

func NewDirectDb() Db

func NewMemoryDb

func NewMemoryDb(elems []Element) Db

func NewRedisCache

func NewRedisCache(base Db, pool *redis.Pool, tag string, expIn time.Duration) Db

type Element

type Element interface {
	// 取得元 URI
	Uri() string

	// 生のデータ。
	Data() []byte
}

web データ。

func New

func New(uri string, data []byte) Element

主にテスト用。

Jump to

Keyboard shortcuts

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