storage

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package storage はWebGoへLocal StorageとSession Storageを公開する。

Index

Constants

This section is empty.

Variables

View Source
var ErrUnavailable = errors.New("storage is unavailable")

Functions

This section is empty.

Types

type API

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

API はPageのLocal / Session Storageを明示的に分離する。

func New

func New(local, session *storagecore.Area) *API

New はPageに対応するWeb Storage APIを生成する。

func (*API) Local

func (api *API) Local() *Storage

func (*API) Session

func (api *API) Session() *Storage

type Storage

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

Storage はWebGoから操作する1つのStorage Areaである。

func (*Storage) Clear

func (storage *Storage) Clear() error

func (*Storage) Get

func (storage *Storage) Get(key string) (string, bool, error)

func (*Storage) Key

func (storage *Storage) Key(index int) (string, bool)

func (*Storage) Length

func (storage *Storage) Length() int

func (*Storage) Remove

func (storage *Storage) Remove(key string) error

func (*Storage) Set

func (storage *Storage) Set(key, value string) error

Jump to

Keyboard shortcuts

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