storage_handler

package
v0.0.0-...-d7b753e Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StorageHandler

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

func NewStorageHandler

func NewStorageHandler(storageInstance StorageInterface, locationConfig map[string]string) (sh *StorageHandler, err error)

func (*StorageHandler) EraseDeviceSettings

func (sh *StorageHandler) EraseDeviceSettings() error

func (*StorageHandler) ExperimentKeys

func (sh *StorageHandler) ExperimentKeys() []string

func (*StorageHandler) Get

func (sh *StorageHandler) Get(key string) (val string, err error)

func (*StorageHandler) GetCookies

func (sh *StorageHandler) GetCookies() (cookies *string, err error)

func (*StorageHandler) GetExperiments

func (sh *StorageHandler) GetExperiments() (experiments map[string]map[string]string, err error)

func (*StorageHandler) IsMaybeLoggedIn

func (sh *StorageHandler) IsMaybeLoggedIn() (bl bool)

func (*StorageHandler) KeepKeysWhenErasingDevice

func (sh *StorageHandler) KeepKeysWhenErasingDevice() []string

func (*StorageHandler) PersistentKeys

func (sh *StorageHandler) PersistentKeys() []string

func (*StorageHandler) Set

func (sh *StorageHandler) Set(key, val string) (err error)

func (*StorageHandler) SetActiveUser

func (sh *StorageHandler) SetActiveUser(username string) (err error)

func (*StorageHandler) SetCookies

func (sh *StorageHandler) SetCookies(rawData *string) (err error)

func (*StorageHandler) SetExperiments

func (sh *StorageHandler) SetExperiments(experiments map[string]map[string]string) (filtered map[string]map[string]string, err error)

func (*StorageHandler) SetRewriteRules

func (sh *StorageHandler) SetRewriteRules(rules map[string]string) (err error)

type StorageHandlerVars

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

type StorageInterface

type StorageInterface interface {
	/*SetSettings(key, value string) error
	SetUsername(username string) error
	SetActiveUser(username string) error*/
	OpenLocation(config map[string]string) error
	HasUser(username string) bool
	MoveUser(oldUsername, newUsername string) error
	DeleteUser(username string) error
	OpenUser(username string) error
	LoadUserSettings() (map[string]string, error)
	SaveUserSettings(userSettings *map[string]string, key string) error
	HasUserCookies() bool
	GetUserCookiesFilePath() string
	LoadUserCookies() (*string, error)
	SaveUserCookies(rawData string) error
	CloseUser()
	CloseLocation() error
}

Jump to

Keyboard shortcuts

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