Documentation ¶
Overview ¶
Package telemetry ...
Index ¶
- func GetEncryptedKey(t *testing.T, key []byte) []byte
- func MockContactClient(ctx context.Context, url, method, token string, odataID string, ...) (*http.Response, error)
- func MockGetAllKeysFromTable(ctx context.Context, table string, dbType common.DbType) ([]string, error)
- func MockGetPluginData(pluginID string) (tmodel.Plugin, *errors.Error)
- func MockGetResource(ctx context.Context, table, key string, dbType common.DbType) (string, *errors.Error)
- func MockIsAuthorized(ctx context.Context, sessionToken string, privileges, oemPrivileges []string) (response.RPC, error)
- type DB
- type External
- type ExternalInterface
- func (e *ExternalInterface) GetMetricDefinition(ctx context.Context, req *teleproto.TelemetryRequest) response.RPC
- func (e *ExternalInterface) GetMetricDefinitionCollection(ctx context.Context, req *teleproto.TelemetryRequest) response.RPC
- func (e *ExternalInterface) GetMetricReport(ctx context.Context, req *teleproto.TelemetryRequest) response.RPC
- func (e *ExternalInterface) GetMetricReportCollection(ctx context.Context, req *teleproto.TelemetryRequest) response.RPC
- func (e *ExternalInterface) GetMetricReportDefinition(ctx context.Context, req *teleproto.TelemetryRequest) response.RPC
- func (e *ExternalInterface) GetMetricReportDefinitionCollection(ctx context.Context, req *teleproto.TelemetryRequest) response.RPC
- func (e *ExternalInterface) GetTelemetryService(ctx context.Context) response.RPC
- func (e *ExternalInterface) GetTrigger(ctx context.Context, req *teleproto.TelemetryRequest) response.RPC
- func (e *ExternalInterface) GetTriggerCollection(ctx context.Context, req *teleproto.TelemetryRequest) response.RPC
- func (e *ExternalInterface) UpdateTrigger(req *teleproto.TelemetryRequest) response.RPC
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetEncryptedKey ¶
GetEncryptedKey is used to encrypt device password using odimra public key for unit test
func MockContactClient ¶
func MockContactClient(ctx context.Context, url, method, token string, odataID string, body interface{}, loginCredential map[string]string) (*http.Response, error)
MockContactClient mocks ContactClient function
func MockGetAllKeysFromTable ¶
func MockGetAllKeysFromTable(ctx context.Context, table string, dbType common.DbType) ([]string, error)
MockGetAllKeysFromTable mocks GetAllKeysFromTable function
func MockGetPluginData ¶
MockGetPluginData mocks GetPluginData function
Types ¶
type DB ¶
type DB struct { GetAllKeysFromTable func(context.Context, string, common.DbType) ([]string, error) GetResource func(context.Context, string, string, common.DbType) (string, *errors.Error) }
DB struct holds the function pointers to database operations
type External ¶
type External struct { ContactClient func(context.Context, string, string, string, string, interface{}, map[string]string) (*http.Response, error) Auth func(context.Context, string, []string, []string) (response.RPC, error) DevicePassword func([]byte) ([]byte, error) GetPluginData func(string) (tmodel.Plugin, *errors.Error) ContactPlugin func(context.Context, tcommon.PluginContactRequest, string) ([]byte, string, tcommon.ResponseStatus, error) GetTarget func(context.Context, string) (*tmodel.Target, *errors.Error) GetSessionUserName func(context.Context, string) (string, error) GenericSave func(context.Context, []byte, string, string) error GetPluginStatus func(context.Context, tmodel.Plugin) bool }
External struct holds the function pointers all outboud services
type ExternalInterface ¶
ExternalInterface struct holds the structs to which hold function pointers to outboud calls
func GetExternalInterface ¶
func GetExternalInterface() *ExternalInterface
GetExternalInterface retrieves all the external connections update package functions uses
func MockGetExternalInterface ¶
func MockGetExternalInterface() *ExternalInterface
MockGetExternalInterface mocks ExternalInterface for unit test
func (*ExternalInterface) GetMetricDefinition ¶
func (e *ExternalInterface) GetMetricDefinition(ctx context.Context, req *teleproto.TelemetryRequest) response.RPC
GetMetricDefinition ...
func (*ExternalInterface) GetMetricDefinitionCollection ¶
func (e *ExternalInterface) GetMetricDefinitionCollection(ctx context.Context, req *teleproto.TelemetryRequest) response.RPC
GetMetricDefinitionCollection is a functioanlity to retrive all the available inventory resources from the added BMC's
func (*ExternalInterface) GetMetricReport ¶
func (e *ExternalInterface) GetMetricReport(ctx context.Context, req *teleproto.TelemetryRequest) response.RPC
GetMetricReport is for to get metric report from southbound resource
func (*ExternalInterface) GetMetricReportCollection ¶
func (e *ExternalInterface) GetMetricReportCollection(ctx context.Context, req *teleproto.TelemetryRequest) response.RPC
GetMetricReportCollection is a functioanlity to retrive all the available inventory resources from the added BMC's
func (*ExternalInterface) GetMetricReportDefinition ¶
func (e *ExternalInterface) GetMetricReportDefinition(ctx context.Context, req *teleproto.TelemetryRequest) response.RPC
GetMetricReportDefinition ...
func (*ExternalInterface) GetMetricReportDefinitionCollection ¶
func (e *ExternalInterface) GetMetricReportDefinitionCollection(ctx context.Context, req *teleproto.TelemetryRequest) response.RPC
GetMetricReportDefinitionCollection is a functioanlity to retrive all the available inventory resources from the added BMC's
func (*ExternalInterface) GetTelemetryService ¶
func (e *ExternalInterface) GetTelemetryService(ctx context.Context) response.RPC
GetTelemetryService defines the functionality for knowing whether the telemetry service is enabled or not
As return parameters RPC response, which contains status code, message, headers and data, error will be passed back.
func (*ExternalInterface) GetTrigger ¶
func (e *ExternalInterface) GetTrigger(ctx context.Context, req *teleproto.TelemetryRequest) response.RPC
GetTrigger ...
func (*ExternalInterface) GetTriggerCollection ¶
func (e *ExternalInterface) GetTriggerCollection(ctx context.Context, req *teleproto.TelemetryRequest) response.RPC
GetTriggerCollection is a functioanlity to retrive all the available inventory resources from the added BMC's
func (*ExternalInterface) UpdateTrigger ¶
func (e *ExternalInterface) UpdateTrigger(req *teleproto.TelemetryRequest) response.RPC
UpdateTrigger ...