cache

package
v0.0.0-...-7d2fa90 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

package github.com/HPInc/krypton-dsts/service/cache Author: Mahesh Unnikrishnan Component: Krypton Device Security Token Service (C) HP Development Company, LP

package github.com/HPInc/krypton-dsts/service/cache Author: Mahesh Unnikrishnan Component: Krypton Device Security Token Service (C) HP Development Company, LP

package github.com/HPInc/krypton-dsts/service/cache Author: Mahesh Unnikrishnan Component: Krypton Device Security Token Service (C) HP Development Company, LP

package github.com/HPInc/krypton-dsts/service/cache Author: Mahesh Unnikrishnan Component: Krypton Device Security Token Service (C) HP Development Company, LP

package github.com/HPInc/krypton-dsts/service/cache Author: Mahesh Unnikrishnan Component: Krypton Device Security Token Service (C) HP Development Company, LP

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCacheNotFound = errors.New("item not found in cache")
)

Functions

func AddDevice

func AddDevice(requestID string, deviceID string, device interface{})

AddDevice - cache information about the specified device. This function is typically called from a goroutine and errors adding to the cache are not surfaced to the caller.

func AddDeviceAuthenticationChallenge

func AddDeviceAuthenticationChallenge(requestID string, deviceID string,
	challenge string) (time.Time, error)

AddDeviceAuthenticationChallenge - Add the specified challenge code to the cache. The challenge code is later retrieved when completing the device authentication process.

func AddEnrollmentToken

func AddEnrollmentToken(requestID string, token string,
	enrollment_token interface{})

AddEnrollmentToken - Add a new enrollment token object to the cache.

func AddRegisteredApp

func AddRegisteredApp(requestID string, appID string, app interface{})

AddRegisteredApp - cache information about the specified app. This function is typically called from a goroutine and errors adding to the cache are not surfaced to the caller.

func GetDevice

func GetDevice(requestID string, deviceID string) ([]byte, error)

GetDevice - retrieve information about a device object from the cache.

func GetDeviceAuthenticationChallenge

func GetDeviceAuthenticationChallenge(requestID, deviceID string) (string,
	error)

GetDeviceAuthenticationChallenge - Retrieve the specified challenge code from the cache. This is used when completing the device authentication process and verifying that the signed assertion presented by the client has a valid challenge code.

func GetEnrollmentTokenInfo

func GetEnrollmentTokenInfo(requestID string, token string) ([]byte, error)

GetEnrollmentToken - retrieve information about an enrollment token object from the cache.

func GetRegisteredApp

func GetRegisteredApp(requestID string, appID string) ([]byte, error)

GetRegisteredApp - retrieve information about a registered app from the cache.

func Init

func Init(logger *zap.Logger, cfgMgr *config.ConfigMgr) error

Init - initialize a connection to the Redis based device cache.

func RemoveDevice

func RemoveDevice(requestID string, deviceID string)

RemoveDevice - remove cached information about the specified device. This function is typically called from within a goroutine and errors removing from the cache are not surfaced to the caller.

func RemoveEnrollmentToken

func RemoveEnrollmentToken(requestID string, tenantID string)

RemoveEnrollmentToken - remove the cached enrollment token for the specified tenant. This function is typically called from within a goroutine and errors removing from the cache are not surfaced to the caller.

func RemoveRegisteredApp

func RemoveRegisteredApp(requestID string, appID string)

RemoveDevice - remove cached information about the specified app. This function is typically called from within a goroutine and errors removing from the cache are not surfaced to the caller.

func Shutdown

func Shutdown()

Shutdown the device cache and cleanup Redis connections.

Types

This section is empty.

Jump to

Keyboard shortcuts

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