Documentation
¶
Overview ¶
Copyright 2025 Comcast Cable Communications Management, LLC
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
SPDX-License-Identifier: Apache-2.0
Index ¶
- Constants
- Variables
- func DeleteOneLogFileList(id string) error
- func DeletePermanentTelemetryProfile(rowKey string)
- func DeleteTelemetryTwoProfile(rowKey string) error
- func DeleteTelemetryTwoRule(rowKey string) error
- func GetAllTelemetryTwoProfileList(appType string) []*logupload.TelemetryTwoProfile
- func GetOnePermanentTelemetryProfile(rowKey string) *logupload.PermanentTelemetryProfile
- func GetOneSettingProfile(id string) *logupload.SettingProfiles
- func GetOneTelemetryRule(id string) *logupload.TelemetryRule
- func GetOneTelemetryTwoProfile(rowKey string) *logupload.TelemetryTwoProfile
- func GetOneTelemetryTwoRule(rowKey string) *logupload.TelemetryTwoRule
- func GetPermanentTelemetryProfileList() []*logupload.PermanentTelemetryProfile
- func GetPermanentTelemetryProfileListByApplicationType(applicationType string) []*logupload.PermanentTelemetryProfile
- func GetTelemetryTwoProfileListByApplicationType(applicationType string) []*logupload.TelemetryTwoProfile
- func GetTimestampedRulesPointer() []*logupload.TimestampedRule
- func IsValidSettingType(str string) bool
- func IsValidUploadProtocol(p string) bool
- func IsValidUrl(str string) bool
- func NewDeviceSettingsInf() interface{}
- func NewEmptyPermanentTelemetryProfile() *logupload.PermanentTelemetryProfile
- func NewEmptyTelemetryTwoProfile() *logupload.TelemetryTwoProfile
- func NewLogFileInf() interface{}
- func NewLogFileListInf() interface{}
- func NewLogFilesGroupsInf() interface{}
- func NewLogUploadSettingsInf() interface{}
- func NewSettingProfilesInf() interface{}
- func NewSettingRulesInf() interface{}
- func NewUploadRepositoryInf() interface{}
- func NewVodSettingsInf() interface{}
- func SetLogFile(id string, logFile *LogFile) error
- func SetOneLogFile(id string, obj *LogFile) error
- func SetOneLogUploadSettings(id string, logUploadSettings *LogUploadSettings) error
- func SetOnePermanentTelemetryProfile(rowKey string, profile *logupload.PermanentTelemetryProfile) error
- func SetOneTelemetryProfile(rowKey string, telemetry *logupload.TelemetryProfile)
- func SetOneTelemetryTwoProfile(profile *logupload.TelemetryTwoProfile) error
- func SetOneTelemetryTwoRule(rowKey string, telemetry *logupload.TelemetryTwoRule) error
- func SettingTypeEnum(s string) int
- type ConfigurationServiceURL
- type DeviceSettings
- type FormulaWithSettings
- type LogFile
- type LogFileList
- type LogFilesGroups
- type LogUploadSettings
- type Schedule
- type SettingProfiles
- type SettingRule
- func (obj *SettingRule) Clone() (*SettingRule, error)
- func (r *SettingRule) GetApplicationType() string
- func (r *SettingRule) GetId() string
- func (r *SettingRule) GetName() string
- func (r *SettingRule) GetRule() *re.Rule
- func (r *SettingRule) GetRuleType() string
- func (r *SettingRule) GetTemplateId() string
- type Settings
- type SettingsResponse
- type UploadProtocol
- type UploadRepository
- type VodSettings
Constants ¶
const ( EstbIp string = "estbIP" EstbMacAddress string = "estbMacAddress" EcmMac string = "ecmMacAddress" Env string = "env" Model string = "model" AccountMgmt string = "accountMgmt" SerialNum string = "serialNum" PartnerId string = "partnerId" FirmwareVersion string = "firmwareVersion" ControllerId string = "controllerId" ChannelMapId string = "channelMapId" VodId string = "vodId" UploadImmediately string = "uploadImmediately" Timezone string = "timezone" AccountHash string = "accountHash" AccountId string = "accountId" ConfigSetHash string = "configSetHash" )
const ( EPON = iota + 1 PARTNER_SETTINGS )
Enum for SettingType
const ( MODE_TO_GET_LOG_FILES_0 = "LogFiles" MODE_TO_GET_LOG_FILES_1 = "LogFilesGroup" MODE_TO_GET_LOG_FILES_2 = "AllLogFiles" )
const ( WHOLE_DAY_RANDOMIZED = "Whole Day Randomized" UTC string = "UTC" LOCAL_TIME string = "Local time" )
const ( DEFAULT_TIME_ZONE = "US/Eastern" ONE_HOUR_SECONDS = 3600 DEFAULT_OFFSET_ROW = -5 )
const (
DEFAULT_LOG_UPLOAD_SETTINGS_MESSAGE = "Don't upload your logs, but check for updates on this schedule."
)
const PermanentTelemetryProfileConst = "PermanentTelemetryProfile"
Variables ¶
var SettingTypes = [...]string{"PARTNER_SETTINGS", "EPON", "partnersettings", "epon"}
Functions ¶
func DeleteOneLogFileList ¶
func DeletePermanentTelemetryProfile ¶
func DeletePermanentTelemetryProfile(rowKey string)
func DeleteTelemetryTwoRule ¶
func GetAllTelemetryTwoProfileList ¶
func GetAllTelemetryTwoProfileList(appType string) []*logupload.TelemetryTwoProfile
func GetOnePermanentTelemetryProfile ¶
func GetOnePermanentTelemetryProfile(rowKey string) *logupload.PermanentTelemetryProfile
func GetOneSettingProfile ¶
func GetOneSettingProfile(id string) *logupload.SettingProfiles
func GetOneTelemetryRule ¶
func GetOneTelemetryRule(id string) *logupload.TelemetryRule
func GetOneTelemetryTwoProfile ¶
func GetOneTelemetryTwoProfile(rowKey string) *logupload.TelemetryTwoProfile
func GetOneTelemetryTwoRule ¶
func GetOneTelemetryTwoRule(rowKey string) *logupload.TelemetryTwoRule
func GetPermanentTelemetryProfileList ¶
func GetPermanentTelemetryProfileList() []*logupload.PermanentTelemetryProfile
func GetPermanentTelemetryProfileListByApplicationType ¶
func GetPermanentTelemetryProfileListByApplicationType(applicationType string) []*logupload.PermanentTelemetryProfile
func GetTelemetryTwoProfileListByApplicationType ¶
func GetTelemetryTwoProfileListByApplicationType(applicationType string) []*logupload.TelemetryTwoProfile
func GetTimestampedRulesPointer ¶
func GetTimestampedRulesPointer() []*logupload.TimestampedRule
func IsValidSettingType ¶
func IsValidUploadProtocol ¶
func IsValidUrl ¶
func NewDeviceSettingsInf ¶
func NewDeviceSettingsInf() interface{}
NewDeviceSettingsInf constructor
func NewEmptyPermanentTelemetryProfile ¶
func NewEmptyPermanentTelemetryProfile() *logupload.PermanentTelemetryProfile
func NewEmptyTelemetryTwoProfile ¶
func NewEmptyTelemetryTwoProfile() *logupload.TelemetryTwoProfile
func NewLogFilesGroupsInf ¶
func NewLogFilesGroupsInf() interface{}
NewLogFilesGroupsInf constructor
func NewLogUploadSettingsInf ¶
func NewLogUploadSettingsInf() interface{}
NewLogUploadSettingsInf constructor
func NewSettingProfilesInf ¶
func NewSettingProfilesInf() interface{}
NewSettingProfilesInf constructor
func NewUploadRepositoryInf ¶
func NewUploadRepositoryInf() interface{}
NewUploadRepositoryInf constructor
func SetLogFile ¶
func SetOneLogFile ¶
func SetOneLogUploadSettings ¶
func SetOneLogUploadSettings(id string, logUploadSettings *LogUploadSettings) error
func SetOnePermanentTelemetryProfile ¶
func SetOnePermanentTelemetryProfile(rowKey string, profile *logupload.PermanentTelemetryProfile) error
func SetOneTelemetryProfile ¶
func SetOneTelemetryProfile(rowKey string, telemetry *logupload.TelemetryProfile)
func SetOneTelemetryTwoProfile ¶
func SetOneTelemetryTwoProfile(profile *logupload.TelemetryTwoProfile) error
func SetOneTelemetryTwoRule ¶
func SetOneTelemetryTwoRule(rowKey string, telemetry *logupload.TelemetryTwoRule) error
func SettingTypeEnum ¶
Types ¶
type ConfigurationServiceURL ¶
type DeviceSettings ¶
type DeviceSettings struct {
ID string `json:"id"`
Updated int64 `json:"updated"`
Name string `json:"name"`
CheckOnReboot bool `json:"checkOnReboot"`
ConfigurationServiceURL *ConfigurationServiceURL `json:"configurationServiceURL,omitempty"`
SettingsAreActive bool `json:"settingsAreActive"`
Schedule Schedule `json:"schedule"`
ApplicationType string `json:"applicationType"`
}
DeviceSettings DeviceSettings2 table
func GetOneDeviceSettings ¶
func GetOneDeviceSettings(id string) *DeviceSettings
func (*DeviceSettings) Clone ¶
func (obj *DeviceSettings) Clone() (*DeviceSettings, error)
type FormulaWithSettings ¶
type FormulaWithSettings struct {
Formula *common.DCMGenericRule `json:"formula"`
DeviceSettings *DeviceSettings `json:"deviceSettings"`
LogUpLoadSettings *LogUploadSettings `json:"logUploadSettings"`
VodSettings *VodSettings `json:"vodSettings"`
}
type LogFile ¶
type LogFile struct {
ID string `json:"id"`
Updated int64 `json:"updated"`
Name string `json:"name"`
DeleteOnUpload bool `json:"deleteOnUpload"`
}
LogFile table
func GetLogFileList ¶
type LogFileList ¶
LogFileList LogFileList table
func GetAllLogFileList ¶
func GetAllLogFileList(size int) []*LogFileList
func GetOneLogFileList ¶
func GetOneLogFileList(id string) (*LogFileList, error)
func (*LogFileList) Clone ¶
func (obj *LogFileList) Clone() (*LogFileList, error)
type LogFilesGroups ¶
type LogFilesGroups struct {
ID string `json:"id"`
Updated int64 `json:"updated"`
GroupName string `json:"groupName"`
LogFileIDs []string `json:"logFileIds"`
}
LogFilesGroups table
func GetLogFileGroupsList ¶
func GetLogFileGroupsList(size int) ([]*LogFilesGroups, error)
func (*LogFilesGroups) Clone ¶
func (obj *LogFilesGroups) Clone() (*LogFilesGroups, error)
type LogUploadSettings ¶
type LogUploadSettings struct {
ID string `json:"id"`
Updated int64 `json:"updated"`
Name string `json:"name"`
UploadOnReboot bool `json:"uploadOnReboot"`
NumberOfDays int `json:"numberOfDays"`
AreSettingsActive bool `json:"areSettingsActive"`
Schedule Schedule `json:"schedule"`
LogFileIds []string `json:"logFileIds"`
LogFilesGroupID string `json:"logFilesGroupId"`
ModeToGetLogFiles string `json:"modeToGetLogFiles"`
UploadRepositoryID string `json:"uploadRepositoryId"`
ActiveDateTimeRange bool `json:"activeDateTimeRange"`
FromDateTime string `json:"fromDateTime"`
ToDateTime string `json:"toDateTime"`
ApplicationType string `json:"applicationType"`
}
LogUploadSettings LogUploadSettings2 table
func GetAllLogUploadSettings ¶
func GetAllLogUploadSettings(size int) ([]*LogUploadSettings, error)
func GetOneLogUploadSettings ¶
func GetOneLogUploadSettings(id string) *LogUploadSettings
func (*LogUploadSettings) Clone ¶
func (obj *LogUploadSettings) Clone() (*LogUploadSettings, error)
type Schedule ¶
type Schedule struct {
Type string `json:"type,omitempty"`
Expression string `json:"expression,omitempty"`
TimeZone string `json:"timeZone,omitempty"`
ExpressionL1 string `json:"expressionL1,omitempty"`
ExpressionL2 string `json:"expressionL2,omitempty"`
ExpressionL3 string `json:"expressionL3,omitempty"`
StartDate string `json:"startDate,omitempty"`
EndDate string `json:"endDate,omitempty"`
TimeWindowMinutes json.Number `json:"timeWindowMinutes,omitempty"`
}
type SettingProfiles ¶
type SettingProfiles struct {
ID string `json:"id"`
Updated int64 `json:"updated"`
SettingProfileID string `json:"settingProfileId"`
SettingType string `json:"settingType"`
Properties map[string]string `json:"properties"`
ApplicationType string `json:"applicationType"`
}
SettingProfiles table
func (*SettingProfiles) Clone ¶
func (obj *SettingProfiles) Clone() (*SettingProfiles, error)
type SettingRule ¶
type SettingRule struct {
ID string `json:"id"`
Updated int64 `json:"updated"`
Name string `json:"name"`
Rule re.Rule `json:"rule"`
BoundSettingID string `json:"boundSettingId"`
ApplicationType string `json:"applicationType"`
}
SettingRule SettingRules table
func GetAllSettingRuleList ¶
func GetAllSettingRuleList() []*SettingRule
func (*SettingRule) Clone ¶
func (obj *SettingRule) Clone() (*SettingRule, error)
func (*SettingRule) GetApplicationType ¶
func (r *SettingRule) GetApplicationType() string
func (*SettingRule) GetRuleType ¶
func (r *SettingRule) GetRuleType() string
GetRuleType XRule interface
func (*SettingRule) GetTemplateId ¶
func (r *SettingRule) GetTemplateId() string
GetTemplateId XRule interface
type Settings ¶
type Settings struct {
//java: Set<String> ruleIDs
RuleIDs map[string]string
SchedulerType string
GroupName string
CheckOnReboot bool
ConfigurationServiceURL string
ScheduleCron string
ScheduleDurationMinutes int
ScheduleStartDate string
ScheduleEndDate string
LusMessage string
LusName string
LusNumberOfDay int
LusUploadRepositoryName string
LusUploadRepositoryURLNew string
LusUploadRepositoryUploadProtocol string
LusUploadRepositoryURL string
LusUploadOnReboot bool
UploadImmediately bool
//Upload flag to indicate if allowed to upload logs or not.
Upload bool
LusLogFiles []*LogFile
LusLogFilesStartDate string
LusLogFilesEndDate string
//For level one logging
LusScheduleCron string
LusScheduleCronL1 string
LusScheduleCronL2 string
LusScheduleCronL3 string
LusScheduleDurationMinutes int
LusScheduleStartDate string
LusScheduleEndDate string
VodSettingsName string
LocationUrl string
TelemetryProfile *logupload.PermanentTelemetryProfile
SrmIPList map[string]string
EponSettings map[string]string
PartnerSettings map[string]string
}
func NewSettings ¶
func (*Settings) CopyDeviceSettings ¶
func (*Settings) CopyLusSetting ¶
func (*Settings) CopyVodSettings ¶
func (*Settings) SetSettingProfiles ¶
func (s *Settings) SetSettingProfiles(settingProfiles []SettingProfiles)
type SettingsResponse ¶
type SettingsResponse struct {
GroupName interface{} `json:"urn:settings:GroupName"`
CheckOnReboot bool `json:"urn:settings:CheckOnReboot"`
ScheduleCron interface{} `json:"urn:settings:CheckSchedule:cron"`
ScheduleDurationMinutes int `json:"urn:settings:CheckSchedule:DurationMinutes"`
LusMessage interface{} `json:"urn:settings:LogUploadSettings:Message"`
LusName interface{} `json:"urn:settings:LogUploadSettings:Name"`
LusNumberOfDay int `json:"urn:settings:LogUploadSettings:NumberOfDays"`
LusUploadRepositoryName interface{} `json:"urn:settings:LogUploadSettings:UploadRepositoryName"`
LusUploadRepositoryURLNew string `json:"urn:settings:LogUploadSettings:UploadRepository:URL,omitempty"`
LusUploadRepositoryUploadProtocol string `json:"urn:settings:LogUploadSettings:UploadRepository:uploadProtocol,omitempty"`
LusUploadRepositoryURL string `json:"urn:settings:LogUploadSettings:RepositoryURL,omitempty"`
LusUploadOnReboot bool `json:"urn:settings:LogUploadSettings:UploadOnReboot"`
UploadImmediately bool `json:"urn:settings:LogUploadSettings:UploadImmediately"`
Upload bool `json:"urn:settings:LogUploadSettings:upload"`
LusScheduleCron interface{} `json:"urn:settings:LogUploadSettings:UploadSchedule:cron"`
LusScheduleCronL1 interface{} `json:"urn:settings:LogUploadSettings:UploadSchedule:levelone:cron"`
LusScheduleCronL2 interface{} `json:"urn:settings:LogUploadSettings:UploadSchedule:leveltwo:cron"`
LusScheduleCronL3 interface{} `json:"urn:settings:LogUploadSettings:UploadSchedule:levelthree:cron"`
LusScheduleDurationMinutes int `json:"urn:settings:LogUploadSettings:UploadSchedule:DurationMinutes"`
VodSettingsName interface{} `json:"urn:settings:VODSettings:Name"`
LocationUrl interface{} `json:"urn:settings:VODSettings:LocationsURL"`
SrmIPList interface{} `json:"urn:settings:VODSettings:SRMIPList"`
EponSettings map[string]string `json:"urn:settings:SettingType:epon,omitempty"`
TelemetryProfile *logupload.PermanentTelemetryProfile `json:"urn:settings:TelemetryProfile,omitempty"`
PartnerSettings map[string]string `json:"urn:settings:SettingType:partnersettings,omitempty"`
}
func CreateSettingsResponseObject ¶
func CreateSettingsResponseObject(settings *Settings) *SettingsResponse
type UploadProtocol ¶
type UploadProtocol string
UploadProtocol enum
const ( TFTP UploadProtocol = "TFTP" SFTP UploadProtocol = "SFTP" SCP UploadProtocol = "SCP" HTTP UploadProtocol = "HTTP" HTTPS UploadProtocol = "HTTPS" S3 UploadProtocol = "S3" )
type UploadRepository ¶
type UploadRepository struct {
ID string `json:"id"`
Updated int64 `json:"updated"`
Name string `json:"name"`
Description string `json:"description"`
URL string `json:"url"`
ApplicationType string `json:"applicationType"`
Protocol string `json:"protocol"`
}
UploadRepository table
func GetOneUploadRepository ¶
func GetOneUploadRepository(id string) *UploadRepository
func (*UploadRepository) Clone ¶
func (obj *UploadRepository) Clone() (*UploadRepository, error)
type VodSettings ¶
type VodSettings struct {
ID string `json:"id"`
Updated int64 `json:"updated"`
Name string `json:"name"`
LocationsURL string `json:"locationsURL"`
IPNames []string `json:"ipNames"`
IPList []string `json:"ipList"`
SrmIPList map[string]string `json:"srmIPList"`
ApplicationType string `json:"applicationType"`
}
VodSettings table
func GetOneVodSettings ¶
func GetOneVodSettings(id string) *VodSettings
func (*VodSettings) Clone ¶
func (obj *VodSettings) Clone() (*VodSettings, error)