Documentation
¶
Index ¶
- Constants
- type ByteSlice
- type DeviceManager
- func (d *DeviceManager) Database() string
- func (d *DeviceManager) DeviceCheckCert(cert *x509.Certificate) (*uuid.UUID, error)
- func (d *DeviceManager) DeviceCheckCertHash(hash []byte) (*uuid.UUID, error)
- func (d *DeviceManager) DeviceClear() error
- func (d *DeviceManager) DeviceGet(u *uuid.UUID) (*x509.Certificate, *x509.Certificate, string, error)
- func (d *DeviceManager) DeviceList() ([]*uuid.UUID, error)
- func (d *DeviceManager) DeviceRegister(unew uuid.UUID, cert, onboard *x509.Certificate, serial string, conf []byte) error
- func (d *DeviceManager) DeviceRemove(u *uuid.UUID) error
- func (d *DeviceManager) GetCerts(u uuid.UUID) ([]byte, error)
- func (d *DeviceManager) GetConfig(u uuid.UUID) ([]byte, error)
- func (d *DeviceManager) GetDeviceOptions(u uuid.UUID) ([]byte, error)
- func (d *DeviceManager) GetGlobalOptions() ([]byte, error)
- func (d *DeviceManager) GetInfoReader(u uuid.UUID) (common.ChunkReader, error)
- func (d *DeviceManager) GetLogsReader(u uuid.UUID) (common.ChunkReader, error)
- func (d *DeviceManager) GetRequestsReader(u uuid.UUID) (common.ChunkReader, error)
- func (d *DeviceManager) GetStorageKeys(u uuid.UUID) ([]byte, error)
- func (d *DeviceManager) GetUUID(u uuid.UUID) ([]byte, error)
- func (d *DeviceManager) Init(s string, sizes common.MaxSizes) (bool, error)
- func (d *DeviceManager) MaxAppLogsSize() int
- func (d *DeviceManager) MaxFlowMessageSize() int
- func (d *DeviceManager) MaxInfoSize() int
- func (d *DeviceManager) MaxLogSize() int
- func (d *DeviceManager) MaxMetricSize() int
- func (d *DeviceManager) MaxRequestsSize() int
- func (d *DeviceManager) Name() string
- func (d *DeviceManager) OnboardCheck(cert *x509.Certificate, serial string) error
- func (d *DeviceManager) OnboardClear() error
- func (d *DeviceManager) OnboardGet(cn string) (*x509.Certificate, []string, error)
- func (d *DeviceManager) OnboardList() ([]string, error)
- func (d *DeviceManager) OnboardRegister(cert *x509.Certificate, serial []string) error
- func (d *DeviceManager) OnboardRemove(cn string) error
- func (d *DeviceManager) SetCacheTimeout(timeout int)
- func (d *DeviceManager) SetConfig(u uuid.UUID, b []byte) error
- func (d *DeviceManager) SetDeviceOptions(u uuid.UUID, b []byte) error
- func (d *DeviceManager) SetGlobalOptions(b []byte) error
- func (d *DeviceManager) WriteAppInstanceLogs(instanceID uuid.UUID, deviceID uuid.UUID, b []byte) error
- func (d *DeviceManager) WriteCerts(u uuid.UUID, b []byte) error
- func (d *DeviceManager) WriteFlowMessage(u uuid.UUID, b []byte) error
- func (d *DeviceManager) WriteInfo(u uuid.UUID, b []byte) error
- func (d *DeviceManager) WriteLogs(u uuid.UUID, b []byte) error
- func (d *DeviceManager) WriteMetrics(u uuid.UUID, b []byte) error
- func (d *DeviceManager) WriteRequest(u uuid.UUID, b []byte) error
- func (d *DeviceManager) WriteStorageKeys(u uuid.UUID, b []byte) error
Constants ¶
const (
MB = common.MB
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ByteSlice ¶
type ByteSlice struct {
// contains filtered or unexported fields
}
type DeviceManager ¶
type DeviceManager struct {
// contains filtered or unexported fields
}
DeviceManager implementation of DeviceManager with an ephemeral memory backing store
func (*DeviceManager) Database ¶
func (d *DeviceManager) Database() string
Database return database path
func (*DeviceManager) DeviceCheckCert ¶
func (d *DeviceManager) DeviceCheckCert(cert *x509.Certificate) (*uuid.UUID, error)
DeviceCheckCert see if a particular certificate is a valid registered device certificate
func (*DeviceManager) DeviceCheckCertHash ¶
func (d *DeviceManager) DeviceCheckCertHash(hash []byte) (*uuid.UUID, error)
DeviceCheckCertHash see if a particular certificate hash is a valid registered device certificate
func (*DeviceManager) DeviceClear ¶
func (d *DeviceManager) DeviceClear() error
DeviceClear remove all devices
func (*DeviceManager) DeviceGet ¶
func (d *DeviceManager) DeviceGet(u *uuid.UUID) (*x509.Certificate, *x509.Certificate, string, error)
DeviceGet get an individual device by UUID
func (*DeviceManager) DeviceList ¶
func (d *DeviceManager) DeviceList() ([]*uuid.UUID, error)
DeviceList list all of the known UUIDs for devices
func (*DeviceManager) DeviceRegister ¶
func (d *DeviceManager) DeviceRegister(unew uuid.UUID, cert, onboard *x509.Certificate, serial string, conf []byte) error
DeviceRegister register a new device cert
func (*DeviceManager) DeviceRemove ¶
func (d *DeviceManager) DeviceRemove(u *uuid.UUID) error
DeviceRemove remove a device
func (*DeviceManager) GetCerts ¶
func (d *DeviceManager) GetCerts(u uuid.UUID) ([]byte, error)
GetCerts retrieve the attest certs for a particular device
func (*DeviceManager) GetConfig ¶
func (d *DeviceManager) GetConfig(u uuid.UUID) ([]byte, error)
GetConfig retrieve the config for a particular device
func (*DeviceManager) GetDeviceOptions ¶
func (d *DeviceManager) GetDeviceOptions(u uuid.UUID) ([]byte, error)
func (*DeviceManager) GetGlobalOptions ¶
func (d *DeviceManager) GetGlobalOptions() ([]byte, error)
func (*DeviceManager) GetInfoReader ¶
func (d *DeviceManager) GetInfoReader(u uuid.UUID) (common.ChunkReader, error)
GetInfoReader get the info for a given uuid
func (*DeviceManager) GetLogsReader ¶
func (d *DeviceManager) GetLogsReader(u uuid.UUID) (common.ChunkReader, error)
GetLogsReader get the logs for a given uuid
func (*DeviceManager) GetRequestsReader ¶
func (d *DeviceManager) GetRequestsReader(u uuid.UUID) (common.ChunkReader, error)
GetRequestsReader get the requests for a given uuid
func (*DeviceManager) GetStorageKeys ¶
func (d *DeviceManager) GetStorageKeys(u uuid.UUID) ([]byte, error)
GetStorageKeys retrieve storage keys for a particular device
func (*DeviceManager) GetUUID ¶
func (d *DeviceManager) GetUUID(u uuid.UUID) ([]byte, error)
GetUUID get UuidResponse for device by uuid
func (*DeviceManager) MaxAppLogsSize ¶
func (d *DeviceManager) MaxAppLogsSize() int
MaxAppLogsSize return the maximum app logs size in bytes for this device manager
func (*DeviceManager) MaxFlowMessageSize ¶
func (d *DeviceManager) MaxFlowMessageSize() int
MaxFlowMessageSize return the maximum FlowMessage logs size in bytes for this device manager
func (*DeviceManager) MaxInfoSize ¶
func (d *DeviceManager) MaxInfoSize() int
MaxInfoSize return the maximum info size in bytes for this device manager
func (*DeviceManager) MaxLogSize ¶
func (d *DeviceManager) MaxLogSize() int
MaxLogSize return the default maximum log size in bytes for this device manager
func (*DeviceManager) MaxMetricSize ¶
func (d *DeviceManager) MaxMetricSize() int
MaxMetricSize return the maximum metrics size in bytes for this device manager
func (*DeviceManager) MaxRequestsSize ¶
func (d *DeviceManager) MaxRequestsSize() int
MaxRequestsSize return the maximum request logs size in bytes for this device manager
func (*DeviceManager) OnboardCheck ¶
func (d *DeviceManager) OnboardCheck(cert *x509.Certificate, serial string) error
OnboardCheck see if a particular certificate plus serial combinaton is valid
func (*DeviceManager) OnboardClear ¶
func (d *DeviceManager) OnboardClear() error
OnboardClear remove all onboarding certs
func (*DeviceManager) OnboardGet ¶
func (d *DeviceManager) OnboardGet(cn string) (*x509.Certificate, []string, error)
OnboardGet get the onboard certificate and serials based on Common Name
func (*DeviceManager) OnboardList ¶
func (d *DeviceManager) OnboardList() ([]string, error)
OnboardList list all of the known Common Names for onboard
func (*DeviceManager) OnboardRegister ¶
func (d *DeviceManager) OnboardRegister(cert *x509.Certificate, serial []string) error
OnboardRegister register a new onboard certificate and its serials or update an existing one
func (*DeviceManager) OnboardRemove ¶
func (d *DeviceManager) OnboardRemove(cn string) error
OnboardRemove remove an onboard certificate based on Common Name
func (*DeviceManager) SetCacheTimeout ¶
func (d *DeviceManager) SetCacheTimeout(timeout int)
SetCacheTimeout set the timeout for refreshing the cache, unused in memory
func (*DeviceManager) SetConfig ¶
func (d *DeviceManager) SetConfig(u uuid.UUID, b []byte) error
SetConfig set the config for a particular device
func (*DeviceManager) SetDeviceOptions ¶
func (d *DeviceManager) SetDeviceOptions(u uuid.UUID, b []byte) error
func (*DeviceManager) SetGlobalOptions ¶
func (d *DeviceManager) SetGlobalOptions(b []byte) error
func (*DeviceManager) WriteAppInstanceLogs ¶
func (d *DeviceManager) WriteAppInstanceLogs(instanceID uuid.UUID, deviceID uuid.UUID, b []byte) error
WriteAppInstanceLogs write a message of AppInstanceLogBundle
func (*DeviceManager) WriteCerts ¶
func (d *DeviceManager) WriteCerts(u uuid.UUID, b []byte) error
WriteCerts write an attestation certs information
func (*DeviceManager) WriteFlowMessage ¶
func (d *DeviceManager) WriteFlowMessage(u uuid.UUID, b []byte) error
WriteFlowMessage write FlowMessage
func (*DeviceManager) WriteInfo ¶
func (d *DeviceManager) WriteInfo(u uuid.UUID, b []byte) error
WriteInfo write an info message
func (*DeviceManager) WriteLogs ¶
func (d *DeviceManager) WriteLogs(u uuid.UUID, b []byte) error
WriteLogs write a message of logs
func (*DeviceManager) WriteMetrics ¶
func (d *DeviceManager) WriteMetrics(u uuid.UUID, b []byte) error
WriteMetrics write a metrics message
func (*DeviceManager) WriteRequest ¶
func (d *DeviceManager) WriteRequest(u uuid.UUID, b []byte) error
WriteRequest record a request
func (*DeviceManager) WriteStorageKeys ¶
func (d *DeviceManager) WriteStorageKeys(u uuid.UUID, b []byte) error
WriteStorageKeys write storage keys information