storage

package
v0.0.0-...-89602ce Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2020 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DirectorydTableBlobstore is the table where blobstore stores directoryd's data.
	DirectorydTableBlobstore = "directoryd_blobstore"

	// DirectorydTypeHWIDToHostname is the blobstore type field for the hardware ID to hostname mapping.
	DirectorydTypeHWIDToHostname = "hwid_to_hostname"

	// DirectorydTypeSessionIDToIMSI is the blobstore type field for the session ID to IMSI mapping.
	DirectorydTypeSessionIDToIMSI = "sessionid_to_imsi"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DirectorydStorage

type DirectorydStorage interface {
	// GetHostnameForHWID returns the hostname mapped to by hardware ID.
	GetHostnameForHWID(hwid string) (string, error)

	// MapHWIDsToHostnames maps {hwid -> hostname}.
	MapHWIDsToHostnames(hwidToHostname map[string]string) error

	// GetIMSIForSessionID returns the IMSI mapped to by session ID.
	GetIMSIForSessionID(networkID, sessionID string) (string, error)

	// MapSessionIDsToIMSIs maps {session ID -> IMSI}.
	MapSessionIDsToIMSIs(networkID string, sessionIDToIMSI map[string]string) error
}

DirectorydStorage is the persistence service interface for location records. All Directoryd data accesses from directoryd service must go through this interface.

func NewDirectorydBlobstore

func NewDirectorydBlobstore(factory blobstore.BlobStorageFactory) DirectorydStorage

NewDirectorydBlobstore returns a directoryd storage implementation backed by the provided blobstore factory.

Jump to

Keyboard shortcuts

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