datastore

package
v0.0.0-...-c78652d Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// NotMatchKey はキーにマッチする値が見つからなかった場合のエラーです。
	NotMatchKey error
)

Functions

This section is empty.

Types

type DataStore

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

DataStore はデータを管理します。

func NewDataStore

func NewDataStore(collectionname string) *DataStore

NewDataStore は DataStore を生成します。

func (*DataStore) Delete

func (d *DataStore) Delete(r *http.Request, key string) error

Delete はキーのデータを削除します。

func (*DataStore) Get

func (d *DataStore) Get(r *http.Request, key string) (string, error)

Get はキーに対しての値を取得します。

func (*DataStore) GetMap

func (d *DataStore) GetMap(r *http.Request, key string) (map[string]string, error)

GetMap はキーに対してのマップを取得します。

func (*DataStore) Keys

func (d *DataStore) Keys() []string

Keys はキーの一覧を返します。

func (*DataStore) Set

func (d *DataStore) Set(r *http.Request, key, value string) error

Set はキーに対する値を記録します。

func (*DataStore) SetCache

func (d *DataStore) SetCache(r *http.Request, key, value string) error

SetCache はキーに対する値を記録します。

func (*DataStore) SetCacheMap

func (d *DataStore) SetCacheMap(r *http.Request, key string, data map[string]string) error

SetCacheMap はキーに対するマップを記録します。

func (*DataStore) SetMap

func (d *DataStore) SetMap(r *http.Request, key string, data map[string]string) error

SetMap はキーに対するマップを記録します。

Jump to

Keyboard shortcuts

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