Documentation
¶
Overview ¶
*
- Copyright 2022 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
*
- Copyright 2022 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
*
- Copyright 2022 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
*
- Copyright 2022 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
*
- Copyright 2022 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
*
- Copyright 2022 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
*
- Copyright 2022 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
*
- Copyright 2022 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
*
- Copyright 2022 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
*
- Copyright 2022 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
*
- Copyright 2022 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 ConvertIntoActivationVersion(fwRule *firmware.FirmwareRule) *firmware.ActivationVersion
- func ConvertIntoGlobalPercentage(percentFilterValue *PercentFilterValue, applicationType string) *firmware.FirmwareRule
- func ConvertIntoPercentRange(configEntries []firmware.ConfigEntry) []*firmware.ConfigEntry
- func ConvertIntoRule(activationVersion *firmware.ActivationVersion) *firmware.FirmwareRule
- func ConvertIpFilterToFirmwareRule(ipFilter *IpFilter) *firmware.FirmwareRule
- func ConvertIpRuleBeanToFirmwareRule(bean *IpRuleBean) *firmware.FirmwareRule
- func ConvertPercentageBeanToFirmwareRule(bean PercentageBean) *firmware.FirmwareRule
- func CreateDownloadLocationRoundRobinFilterValOneDB(dl *DownloadLocationRoundRobinFilterValue) error
- func CreateFirmwareConfigOneDB(fc *FirmwareConfig) error
- func DeleteOneFirmwareConfig(id string) error
- func GetCurrentId(mac string) (string, error)
- func GetFirmwareVersion(id string) string
- func GetIpAddressGroup(cond *re.Condition) *shared.IpAddressGroup
- func GetRoundRobinIdByApplication(applicationType string) string
- func GetWhitelistName(ipAddressGroup *shared.IpAddressGroup) string
- func IsLegacyIpCondition(condition re.Condition) bool
- func IsLegacyIpFreeArg(freeArg *re.FreeArg) bool
- func IsLegacyLocalTimeFreeArg(freeArg re.FreeArg) bool
- func IsLegacyMacFreeArg(freeArg re.FreeArg) bool
- func IsLetter(s string) bool
- func IsLower(s string) bool
- func IsRedundantEntry(key string) bool
- func NewConfigChangeLogInf() interface{}
- func NewDownloadLocationRoundRobinFilterValue() interface{}
- func NewFirmwareConfigInf() interface{}
- func NewGlobalPercentFilter(rule *re.Rule) *firmware.FirmwareRule
- func NewMacRule(macListName string) re.Rule
- func NewSingletonFilterValueInf() interface{}
- func ParseEnvModelRule(bean *PercentageBean, envModelRule *firmware.FirmwareRule)
- func SetConfigChangeLog(mac string, configChangeLog *ConfigChangeLog) error
- func SetLastConfigLog(mac string, configChangeLog *ConfigChangeLog) error
- type BseConfiguration
- type Capabilities
- type ConfigChangeLog
- type ConfigNames
- type ConvertedContext
- func (c *ConvertedContext) AddBypassFiltersConverted(bypassFilter string)
- func (c *ConvertedContext) AddForceFiltersConverted(forceFilter string)
- func (c *ConvertedContext) CreateCapabilitiesList() []Capabilities
- func (c *ConvertedContext) GetAccountHash() string
- func (c *ConvertedContext) GetAccountId() string
- func (c *ConvertedContext) GetAccountIdConverted() string
- func (c *ConvertedContext) GetBypassFilters() string
- func (c *ConvertedContext) GetBypassFiltersConverted() map[string]struct{}
- func (c *ConvertedContext) GetCapabilities() []string
- func (c *ConvertedContext) GetCapabilitiesConverted() []Capabilities
- func (c *ConvertedContext) GetChannelMapId() string
- func (c *ConvertedContext) GetChannelMapIdConverted() int64
- func (c *ConvertedContext) GetControllerId() string
- func (c *ConvertedContext) GetControllerIdConverted() int64
- func (c *ConvertedContext) GetECMMac() string
- func (c *ConvertedContext) GetEStbMac() string
- func (c *ConvertedContext) GetEcmMacConverted() string
- func (c *ConvertedContext) GetEnv() string
- func (c *ConvertedContext) GetEnvConverted() string
- func (c *ConvertedContext) GetEstbMacConverted() string
- func (c *ConvertedContext) GetFirmwareVersion() string
- func (c *ConvertedContext) GetFirmwareVersionConverted() string
- func (c *ConvertedContext) GetForceFilters() string
- func (c *ConvertedContext) GetForceFiltersConverted() map[string]struct{}
- func (c *ConvertedContext) GetIpAddress() string
- func (c *ConvertedContext) GetIpAddressConverted() string
- func (c *ConvertedContext) GetModel() string
- func (c *ConvertedContext) GetModelConverted() string
- func (c *ConvertedContext) GetPartnerId() string
- func (c *ConvertedContext) GetProperties() map[string]string
- func (c *ConvertedContext) GetRawTimeZoneConverted() string
- func (c *ConvertedContext) GetReceiverId() string
- func (c *ConvertedContext) GetReceiverIdConverted() string
- func (c *ConvertedContext) GetTime() *time.Time
- func (c *ConvertedContext) GetTimeConverted() *time.Time
- func (c *ConvertedContext) GetTimeZone() string
- func (c *ConvertedContext) GetTimeZoneConverted() *time.Location
- func (c *ConvertedContext) GetTimeZoneOffset() string
- func (c *ConvertedContext) GetVodId() string
- func (c *ConvertedContext) GetVodIdConverted() int64
- func (c *ConvertedContext) GetXconfHttpHeader() string
- func (c *ConvertedContext) GetXconfHttpHeaderConverted() string
- func (c *ConvertedContext) IsRcdl() bool
- func (c *ConvertedContext) IsRebootDecoupled() bool
- func (c *ConvertedContext) IsSupportsFullHttpUrl() bool
- func (c *ConvertedContext) IsUTCConverted() bool
- func (c *ConvertedContext) IsXconfHttpHeaderSecureConnection() bool
- func (c *ConvertedContext) SetAccountHash(accountHash string)
- func (c *ConvertedContext) SetAccountId(accountId string)
- func (c *ConvertedContext) SetAccountIdConverted(accountId string)
- func (c *ConvertedContext) SetBypassFilters(bypassFilters string)
- func (c *ConvertedContext) SetBypassFiltersConverted(bypassFilters map[string]struct{})
- func (c *ConvertedContext) SetCapabilities(capabilities []string)
- func (c *ConvertedContext) SetCapabilitiesConverted(capabilities []Capabilities)
- func (c *ConvertedContext) SetChannelMapId(channelMapId string)
- func (c *ConvertedContext) SetChannelMapIdConverted(channelMapId int64)
- func (c *ConvertedContext) SetControllerId(controllerId string)
- func (c *ConvertedContext) SetControllerIdConverted(controllerId int64)
- func (c *ConvertedContext) SetECMMac(eCMMac string)
- func (c *ConvertedContext) SetEStbMac(eStbMac string)
- func (c *ConvertedContext) SetEcmMacConverted(ecmMac string)
- func (c *ConvertedContext) SetEnv(env string)
- func (c *ConvertedContext) SetEnvConverted(env string)
- func (c *ConvertedContext) SetEstbMacConverted(estbMac string)
- func (c *ConvertedContext) SetFirmwareVersion(firmwareVersion string)
- func (c *ConvertedContext) SetFirmwareVersionConverted(firmwareVersion string)
- func (c *ConvertedContext) SetForceFilters(forceFilters string)
- func (c *ConvertedContext) SetForceFiltersConverted(forceFilters map[string]struct{})
- func (c *ConvertedContext) SetIpAddress(ipAddress string)
- func (c *ConvertedContext) SetIpAddressConverted(ipAddress string)
- func (c *ConvertedContext) SetModel(model string)
- func (c *ConvertedContext) SetModelConverted(model string)
- func (c *ConvertedContext) SetPartnerId(partnerId string)
- func (c *ConvertedContext) SetReceiverId(receiverId string)
- func (c *ConvertedContext) SetReceiverIdConverted(receiverId string)
- func (c *ConvertedContext) SetTime(t time.Time)
- func (c *ConvertedContext) SetTimeConverted(t *time.Time)
- func (c *ConvertedContext) SetTimeZone(tz string)
- func (c *ConvertedContext) SetTimeZoneConverted(timeZone *time.Location)
- func (c *ConvertedContext) SetTimeZoneOffset(timeZoneOffset string)
- func (c *ConvertedContext) SetVodId(vodId string)
- func (c *ConvertedContext) SetVodIdConverted(vodId int64)
- func (c *ConvertedContext) SetXconfHttpHeader(xconfHttpHeader string)
- func (c *ConvertedContext) SetXconfHttpHeaderConverted(xconfHttpHeader string)
- func (c *ConvertedContext) ToString() string
- func (cc *ConvertedContext) UnmarshalJSON(bytes []byte) error
- type DownloadLocationFilter
- type DownloadLocationRoundRobinFilterValue
- func GetDefaultDownloadLocationRoundRobinFilterValOneDB() (*DownloadLocationRoundRobinFilterValue, error)
- func GetDownloadLocationRoundRobinFilterValOneDB(filterId string) (*DownloadLocationRoundRobinFilterValue, error)
- func NewEmptyDownloadLocationRoundRobinFilterValue() *DownloadLocationRoundRobinFilterValue
- func (obj *DownloadLocationRoundRobinFilterValue) GetApplicationType() string
- func (d *DownloadLocationRoundRobinFilterValue) GetDownloadLocations() []string
- func (obj *DownloadLocationRoundRobinFilterValue) SetApplicationType(appType string)
- func (obj *DownloadLocationRoundRobinFilterValue) Validate() error
- type EnvModelBean
- type EnvModelPercentage
- type EnvModelRuleBean
- type Expression
- type FirmwareConfig
- func (obj *FirmwareConfig) Clone() (*FirmwareConfig, error)
- func (fc *FirmwareConfig) CreateFirmwareConfigResponse() *FirmwareConfigResponse
- func (obj *FirmwareConfig) GetApplicationType() string
- func (obj *FirmwareConfig) SetApplicationType(appType string)
- func (fc *FirmwareConfig) ToFirmwareConfigResponseMap() map[string]interface{}
- func (fc *FirmwareConfig) ToPropertiesMap() map[string]interface{}
- func (obj *FirmwareConfig) Validate() error
- func (obj *FirmwareConfig) ValidateName() error
- type FirmwareConfigFacade
- func (ff *FirmwareConfigFacade) GetFirmwareDownloadProtocol() string
- func (ff *FirmwareConfigFacade) GetFirmwareFilename() string
- func (ff *FirmwareConfigFacade) GetFirmwareLocation() string
- func (ff *FirmwareConfigFacade) GetFirmwareVersion() string
- func (ff *FirmwareConfigFacade) GetIpv6FirmwareLocation() string
- func (ff *FirmwareConfigFacade) GetRebootImmediately() bool
- func (ff *FirmwareConfigFacade) GetStringValue(key string) string
- func (ff *FirmwareConfigFacade) GetUpgradeDelay() int
- func (ff *FirmwareConfigFacade) GetValue(key string) interface{}
- func (fcf *FirmwareConfigFacade) MarshalJSON() ([]byte, error)
- func (ff *FirmwareConfigFacade) PutAll(nmap map[string]interface{})
- func (ff *FirmwareConfigFacade) PutIfPresent(key string, value interface{})
- func (ff *FirmwareConfigFacade) SetFirmwareDownloadProtocol(protocol string)
- func (ff *FirmwareConfigFacade) SetFirmwareLocation(location string)
- func (ff *FirmwareConfigFacade) SetRebootImmediately(flag bool)
- func (ff *FirmwareConfigFacade) SetStringValue(key string, value string)
- func (fcf *FirmwareConfigFacade) UnmarshalJSON(bytes []byte) error
- type FirmwareConfigFacadeResponse
- type FirmwareConfigForMacRuleBeanResponse
- type FirmwareConfigResponse
- type GlobalPercentage
- type IpFilter
- type IpRuleBean
- type Location
- type MacRuleBean
- type MacRuleBeanResponse
- type MinimumFirmwareCheckBean
- type ModelFirmwareConfiguration
- type PercentFilterValue
- type PercentFilterVo
- type PercentFilterWrapper
- type PercentageBean
- type RebootImmediatelyFilter
- type RuleFactory
- func (f *RuleFactory) NewActivationVersionRule(model string, partnerId string) re.Rule
- func (f *RuleFactory) NewDownloadLocationFilter(ipList string, downloadProtocol string) *re.Rule
- func (f *RuleFactory) NewEnvModelRule(env string, model string) re.Rule
- func (f *RuleFactory) NewGlobalPercentFilter(percent float64, ipList string) *re.Rule
- func (f *RuleFactory) NewGlobalPercentFilterTemplate(percent float64, ipList string) *re.Rule
- func (f *RuleFactory) NewIntermediateVersionRule(env string, model string, version string) re.Rule
- func (f *RuleFactory) NewIpFilter(listName string) *re.Rule
- func (f *RuleFactory) NewIpRule(listName string, environment string, model string) re.Rule
- func (f *RuleFactory) NewMinVersionCheckRule(env string, model string, versions []string) re.Rule
- func (f *RuleFactory) NewModelRule(model string) re.Rule
- func (f *RuleFactory) NewRiFilter(ipAddressGroups []string, macAddresses []string, environments []string, ...) *re.Rule
- func (f *RuleFactory) NewRiFilterTemplate() *re.Rule
- func (f *RuleFactory) NewTimeFilter(neverBlockRebootDecoupled bool, neverBlockHttpDownload bool, isLocalTime bool, ...) *re.Rule
- func (f *RuleFactory) NewTimeFilterTemplate(neverBlockRebootDecoupled bool, neverBlockHttpDownload bool, isLocalTime bool, ...) *re.Rule
- type RuleInfo
- type SingletonFilterClass
- type SingletonFilterValue
- func (obj *SingletonFilterValue) Clone() (*SingletonFilterValue, error)
- func (sfv *SingletonFilterValue) IsDownloadLocationRoundRobinFilterValue() bool
- func (sfv *SingletonFilterValue) IsPercentFilterValue() bool
- func (sfv *SingletonFilterValue) MarshalJSON() ([]byte, error)
- func (sfv *SingletonFilterValue) UnmarshalJSON(bytes []byte) error
- type TemplateFactory
- type TimeFilter
Constants ¶
const ( DEFAULT_PREFIX string = "XCONF" BOUNDS int = 5 LAST_CONFIG_LOG_ID = "0" )
const ( MAC_RULE = "MAC_RULE" IP_RULE = "IP_RULE" ENV_MODEL_RULE = "ENV_MODEL_RULE" IP_FILTER = "IP_FILTER" TIME_FILTER = "TIME_FILTER" REBOOT_IMMEDIATELY_FILTER = "REBOOT_IMMEDIATELY_FILTER" DOWNLOAD_LOCATION_FILTER = "DOWNLOAD_LOCATION_FILTER" IV_RULE = "IV_RULE" MIN_CHECK_RULE = "MIN_CHECK_RULE" MIN_CHECK_RI = "MIN_CHECK_RI" GLOBAL_PERCENT = "GLOBAL_PERCENT" ACTIVATION_VERSION = "ACTIVATION_VERSION" HTTP_SUFFIX = "_http" TFTP_SUFFIX = "_tftp" )
const ( DATE_TIME_FORMATTER = "1/2/2006 15:04" DATE_TIME_SEC_FORMATTER = "01/02/2006 15:04:05" )
const ( ID = "id" UPDATED = "updated" DESCRIPTION = "description" SUPPORTED_MODEL_IDS = "supportedModelIds" FIRMWARE_DOWNLOAD_PROTOCOL = "firmwareDownloadProtocol" FIRMWARE_FILENAME = "firmwareFilename" FIRMWARE_LOCATION = "firmwareLocation" FIRMWARE_VERSION = "firmwareVersion" IPV6_FIRMWARE_LOCATION = "ipv6FirmwareLocation" UPGRADE_DELAY = "upgradeDelay" REBOOT_IMMEDIATELY = "rebootImmediately" APPLICATION_TYPE = "applicationType" MANDATORY_UPDATE = "mandatoryUpdate" MAX_ALLOWED_NUMBER_OF_PROPERTIES = 20 )
const ( /** * RCDL indicates that the STB is capable of performing HTTP firmware downloads using DNS resolved URIs. * The download will run in the eSTB. Until this, the eCM performed the download. eCM does not have * DNS and thus requires an IP address. * <p> * Warning!!! Due to a bug in STB code, we have RNG150 boxes that send this parameter but they are NOT * able to do HTTP firmware downloads. To handle this situation we are implementing a hack where * RNG150 boxes will always be told to do TFTP. Once we are confident that all RNG150s have been updated * to versions that actually do support HTTP, we will turn off the hack. */ RCDL Capabilities = "RCDL" /** * lets Xconf know that reboot has been decoupled from firmware download. If not specified in the * rebootImmediately response, the STB will still reboot immediately after firmware download. */ RebootDecoupled = "rebootDecoupled" RebootCoupled = "rebootDecoupled" /** * Lets Xconf know that the STB can accept a full URL for location rather than just an IP address or * domain name. */ SupportsFullHttpUrl = "supportsFullHttpUrl" )
const ( EMPTY_NAME = "" DEFAULT_PERCENT = 0 TRUE = "true" )
const ( PERCENT_FILTER_SINGLETON_ID = "PERCENT_FILTER_VALUE" ROUND_ROBIN_FILTER_SINGLETON_ID = "DOWNLOAD_LOCATION_ROUND_ROBIN_FILTER_VALUE" )
Variables ¶
var ( RuleFactoryMAC = re.NewFreeArg("STRING", common.ESTB_MAC) RuleFactoryIP = re.NewFreeArg("STRING", common.IP_ADDRESS) RuleFactoryVERSION = re.NewFreeArg("STRING", common.FIRMWARE_VERSION) RuleFactoryENV = re.NewFreeArg("STRING", common.ENV) RuleFactoryMODEL = re.NewFreeArg("STRING", common.MODEL) RuleFactoryFIRMWARE_VERSION = re.NewFreeArg("STRING", common.FIRMWARE_VERSION) RuleFactoryREGEX = re.NewFreeArg("STRING", common.FIRMWARE_VERSION) RuleFactoryMATCHED_RULE_TYPE = re.NewFreeArg("STRING", common.MATCHED_RULE_TYPE) RuleFactoryTIME_ZONE = re.NewFreeArg("STRING", common.TIME_ZONE) // may be "UTC" RuleFactoryTIME = re.NewFreeArg("TIME", common.TIME) RuleFactoryLOCAL_TIME = re.NewFreeArg("STRING", common.TIME) RuleFactoryCERT_EXPIRY_DURATION = re.NewFreeArg("LONG", common.CERT_EXPIRY_DURATION) // required for TimeFilter. it must be added after rules matching RuleFactoryFIRMWARE_DOWNLOAD_PROTOCOL = re.NewFreeArg("STRING", common.DOWNLOAD_PROTOCOL) // tftp or http RuleFactoryREBOOT_DECOUPLED = re.NewFreeArg("ANY", common.REBOOT_DECOUPLED) RuleFactoryPARTNER_ID = re.NewFreeArg("STRING", common.PARTNER_ID) RuleFactoryHTTP = re.NewFixedArg("http") RuleFactoryUTC = re.NewFixedArg("UTC") RuleFactoryIN_LIST = "IN_LIST" /** MATCH = re.Operation.forName("MATCH") RANGE = re.Operation.forName("RANGE") **/ GlbRuleFactory *RuleFactory )
var ( EMPTY_LIST = []string{} EMPTY_SET = map[string]struct{}{} GlbTemplateFactory *TemplateFactory )
Functions ¶
func ConvertIntoActivationVersion ¶
func ConvertIntoActivationVersion(fwRule *firmware.FirmwareRule) *firmware.ActivationVersion
func ConvertIntoGlobalPercentage ¶
func ConvertIntoGlobalPercentage(percentFilterValue *PercentFilterValue, applicationType string) *firmware.FirmwareRule
func ConvertIntoPercentRange ¶
func ConvertIntoPercentRange(configEntries []firmware.ConfigEntry) []*firmware.ConfigEntry
func ConvertIntoRule ¶
func ConvertIntoRule(activationVersion *firmware.ActivationVersion) *firmware.FirmwareRule
func ConvertIpFilterToFirmwareRule ¶
func ConvertIpFilterToFirmwareRule(ipFilter *IpFilter) *firmware.FirmwareRule
func ConvertIpRuleBeanToFirmwareRule ¶
func ConvertIpRuleBeanToFirmwareRule(bean *IpRuleBean) *firmware.FirmwareRule
convertIpRuleBeanToFirmwareRule ...
func ConvertPercentageBeanToFirmwareRule ¶
func ConvertPercentageBeanToFirmwareRule(bean PercentageBean) *firmware.FirmwareRule
convertIntoRule
func CreateDownloadLocationRoundRobinFilterValOneDB ¶
func CreateDownloadLocationRoundRobinFilterValOneDB(dl *DownloadLocationRoundRobinFilterValue) error
func CreateFirmwareConfigOneDB ¶
func CreateFirmwareConfigOneDB(fc *FirmwareConfig) error
func DeleteOneFirmwareConfig ¶
func GetCurrentId ¶
func GetFirmwareVersion ¶
func GetIpAddressGroup ¶
func GetIpAddressGroup(cond *re.Condition) *shared.IpAddressGroup
func GetWhitelistName ¶
func GetWhitelistName(ipAddressGroup *shared.IpAddressGroup) string
func IsLegacyIpCondition ¶
isLegacyIpCondition ...
func IsLegacyIpFreeArg ¶
func IsLegacyMacFreeArg ¶
func IsRedundantEntry ¶
func NewConfigChangeLogInf ¶
func NewConfigChangeLogInf() interface{}
NewConfigChangeLogInf constructor
func NewDownloadLocationRoundRobinFilterValue ¶
func NewDownloadLocationRoundRobinFilterValue() interface{}
func NewFirmwareConfigInf ¶
func NewFirmwareConfigInf() interface{}
NewFirmwareConfigInf constructor
func NewGlobalPercentFilter ¶
func NewGlobalPercentFilter(rule *re.Rule) *firmware.FirmwareRule
func NewMacRule ¶
func NewSingletonFilterValueInf ¶
func NewSingletonFilterValueInf() interface{}
func ParseEnvModelRule ¶
func ParseEnvModelRule(bean *PercentageBean, envModelRule *firmware.FirmwareRule)
func SetConfigChangeLog ¶
func SetConfigChangeLog(mac string, configChangeLog *ConfigChangeLog) error
func SetLastConfigLog ¶
func SetLastConfigLog(mac string, configChangeLog *ConfigChangeLog) error
Types ¶
type BseConfiguration ¶
type BseConfiguration struct {
Location string `json:"location"`
Ipv6Location string `json:"ipv6Location"`
Protocol string `json:"protocol"`
ModelConfigurations []*ModelFirmwareConfiguration `json:"modelConfigurations"`
}
BseConfiguration ...
type Capabilities ¶
type Capabilities string
type ConfigChangeLog ¶
type ConfigChangeLog struct {
ID string `json:"id,omitempty"`
Updated int64 `json:"updated,omitempty"`
Input *ConvertedContext `json:"input"`
Rule *RuleInfo `json:"rule"`
Filters []*RuleInfo `json:"filters"`
Explanation string `json:"explanation,omitempty"`
FirmwareConfig *FirmwareConfigFacade `json:"config"`
HasMinimumFirmware bool `json:"hasMinimumFirmware"`
}
ConfigChangeLog Logs2 table
func GetConfigChangeLogsOnly ¶
func GetConfigChangeLogsOnly(mac string) []*ConfigChangeLog
func GetLastConfigLog ¶
func GetLastConfigLog(mac string) *ConfigChangeLog
func NewConfigChangeLog ¶
func NewConfigChangeLog(convertedContext *ConvertedContext, explanation string, firmwareConfig *FirmwareConfigFacade, appliedFilters []interface{}, evaluatedRule *firmware.FirmwareRule, isLastLog bool) *ConfigChangeLog
type ConvertedContext ¶
type ConvertedContext struct {
Context map[string]string `json:"-"` // orignal Context
EstbMac string `json:"estbMac,omitempty"`
Env string `json:"env,omitempty"`
Model string `json:"model,omitempty"`
FirmwareVersion string `json:"firmwareVersion,omitempty"`
EcmMac string `json:"ecmMac,omitempty"`
ReceiverId string `json:"receiverId,omitempty"`
ControllerId int64 `json:"controllerId,omitempty"`
ChannelMapId int64 `json:"channelMapId,omitempty"`
VodId int64 `json:"vodId,omitempty"`
BypassFilters map[string]struct{} `json:"-"`
RawBypassFilters []string `json:"bypassFilters,omitempty"` // custom unmarshal for BypassFilters
ForceFilters map[string]struct{} `json:"-"`
RawForceFilters []string `json:"forceFilters,omitempty"` // custom unmarshal for ForceFilters
XconfHttpHeader string `json:"xconfHttpHeader,omitempty"`
AccountId string `json:"accountId,omitempty"`
Capabilities []Capabilities `json:"capabilities"`
TimeZone *time.Location `json:"-"`
RawTimeZone string `json:"timeZone"` // custom unmarshal for TimeZone
Time *time.Time `json:"-"`
RawTime string `json:"time"` // custom unmarshal for Time
IpAddress string `json:"ipAddress,omitempty"`
Rcdl bool `json:"rcdl"`
SupportsFullHttpUrl bool `json:"supportsFullHttpUrl"`
RebootDecoupled bool `json:"rebootDecoupled"`
}
ConvertedContext ... convert the map string to type based context
func GetContextConverted ¶
func GetContextConverted(ctx map[string]string) *ConvertedContext
func NewConvertedContext ¶
func NewConvertedContext(ctx map[string]string) *ConvertedContext
NewConvertedContext ...
func (*ConvertedContext) AddBypassFiltersConverted ¶
func (c *ConvertedContext) AddBypassFiltersConverted(bypassFilter string)
func (*ConvertedContext) AddForceFiltersConverted ¶
func (c *ConvertedContext) AddForceFiltersConverted(forceFilter string)
func (*ConvertedContext) CreateCapabilitiesList ¶
func (c *ConvertedContext) CreateCapabilitiesList() []Capabilities
func (*ConvertedContext) GetAccountHash ¶
func (c *ConvertedContext) GetAccountHash() string
func (*ConvertedContext) GetAccountId ¶
func (c *ConvertedContext) GetAccountId() string
func (*ConvertedContext) GetAccountIdConverted ¶
func (c *ConvertedContext) GetAccountIdConverted() string
func (*ConvertedContext) GetBypassFilters ¶
func (c *ConvertedContext) GetBypassFilters() string
func (*ConvertedContext) GetBypassFiltersConverted ¶
func (c *ConvertedContext) GetBypassFiltersConverted() map[string]struct{}
func (*ConvertedContext) GetCapabilities ¶
func (c *ConvertedContext) GetCapabilities() []string
func (*ConvertedContext) GetCapabilitiesConverted ¶
func (c *ConvertedContext) GetCapabilitiesConverted() []Capabilities
func (*ConvertedContext) GetChannelMapId ¶
func (c *ConvertedContext) GetChannelMapId() string
func (*ConvertedContext) GetChannelMapIdConverted ¶
func (c *ConvertedContext) GetChannelMapIdConverted() int64
func (*ConvertedContext) GetControllerId ¶
func (c *ConvertedContext) GetControllerId() string
func (*ConvertedContext) GetControllerIdConverted ¶
func (c *ConvertedContext) GetControllerIdConverted() int64
func (*ConvertedContext) GetECMMac ¶
func (c *ConvertedContext) GetECMMac() string
func (*ConvertedContext) GetEStbMac ¶
func (c *ConvertedContext) GetEStbMac() string
func (*ConvertedContext) GetEcmMacConverted ¶
func (c *ConvertedContext) GetEcmMacConverted() string
func (*ConvertedContext) GetEnv ¶
func (c *ConvertedContext) GetEnv() string
func (*ConvertedContext) GetEnvConverted ¶
func (c *ConvertedContext) GetEnvConverted() string
func (*ConvertedContext) GetEstbMacConverted ¶
func (c *ConvertedContext) GetEstbMacConverted() string
func (*ConvertedContext) GetFirmwareVersion ¶
func (c *ConvertedContext) GetFirmwareVersion() string
func (*ConvertedContext) GetFirmwareVersionConverted ¶
func (c *ConvertedContext) GetFirmwareVersionConverted() string
func (*ConvertedContext) GetForceFilters ¶
func (c *ConvertedContext) GetForceFilters() string
func (*ConvertedContext) GetForceFiltersConverted ¶
func (c *ConvertedContext) GetForceFiltersConverted() map[string]struct{}
func (*ConvertedContext) GetIpAddress ¶
func (c *ConvertedContext) GetIpAddress() string
func (*ConvertedContext) GetIpAddressConverted ¶
func (c *ConvertedContext) GetIpAddressConverted() string
func (*ConvertedContext) GetModel ¶
func (c *ConvertedContext) GetModel() string
func (*ConvertedContext) GetModelConverted ¶
func (c *ConvertedContext) GetModelConverted() string
func (*ConvertedContext) GetPartnerId ¶
func (c *ConvertedContext) GetPartnerId() string
func (*ConvertedContext) GetProperties ¶
func (c *ConvertedContext) GetProperties() map[string]string
func (*ConvertedContext) GetRawTimeZoneConverted ¶
func (c *ConvertedContext) GetRawTimeZoneConverted() string
func (*ConvertedContext) GetReceiverId ¶
func (c *ConvertedContext) GetReceiverId() string
func (*ConvertedContext) GetReceiverIdConverted ¶
func (c *ConvertedContext) GetReceiverIdConverted() string
func (*ConvertedContext) GetTime ¶
func (c *ConvertedContext) GetTime() *time.Time
func (*ConvertedContext) GetTimeConverted ¶
func (c *ConvertedContext) GetTimeConverted() *time.Time
func (*ConvertedContext) GetTimeZone ¶
func (c *ConvertedContext) GetTimeZone() string
* * Tells us the STB offset from UTC * http://joda-time.sourceforge.net/timezones.html Will be a string like * "-04:00". From this we can derive the SBT local time. * <p> * The normal case will be that "time" parameter is NOT sent and * "timeZoneOffset" parameter IS specified. In this case we will derive STB * local time from current UTC plus this offset. * <p> * For testing "time" parameter may be set. If it is set, it is assumed to * be local time, we do not apply time zone offset to it.
func (*ConvertedContext) GetTimeZoneConverted ¶
func (c *ConvertedContext) GetTimeZoneConverted() *time.Location
func (*ConvertedContext) GetTimeZoneOffset ¶
func (c *ConvertedContext) GetTimeZoneOffset() string
func (*ConvertedContext) GetVodId ¶
func (c *ConvertedContext) GetVodId() string
func (*ConvertedContext) GetVodIdConverted ¶
func (c *ConvertedContext) GetVodIdConverted() int64
func (*ConvertedContext) GetXconfHttpHeader ¶
func (c *ConvertedContext) GetXconfHttpHeader() string
func (*ConvertedContext) GetXconfHttpHeaderConverted ¶
func (c *ConvertedContext) GetXconfHttpHeaderConverted() string
func (*ConvertedContext) IsRcdl ¶
func (c *ConvertedContext) IsRcdl() bool
func (*ConvertedContext) IsRebootDecoupled ¶
func (c *ConvertedContext) IsRebootDecoupled() bool
func (*ConvertedContext) IsSupportsFullHttpUrl ¶
func (c *ConvertedContext) IsSupportsFullHttpUrl() bool
func (*ConvertedContext) IsUTCConverted ¶
func (c *ConvertedContext) IsUTCConverted() bool
func (*ConvertedContext) IsXconfHttpHeaderSecureConnection ¶
func (c *ConvertedContext) IsXconfHttpHeaderSecureConnection() bool
func (*ConvertedContext) SetAccountHash ¶
func (c *ConvertedContext) SetAccountHash(accountHash string)
func (*ConvertedContext) SetAccountId ¶
func (c *ConvertedContext) SetAccountId(accountId string)
func (*ConvertedContext) SetAccountIdConverted ¶
func (c *ConvertedContext) SetAccountIdConverted(accountId string)
func (*ConvertedContext) SetBypassFilters ¶
func (c *ConvertedContext) SetBypassFilters(bypassFilters string)
func (*ConvertedContext) SetBypassFiltersConverted ¶
func (c *ConvertedContext) SetBypassFiltersConverted(bypassFilters map[string]struct{})
func (*ConvertedContext) SetCapabilities ¶
func (c *ConvertedContext) SetCapabilities(capabilities []string)
func (*ConvertedContext) SetCapabilitiesConverted ¶
func (c *ConvertedContext) SetCapabilitiesConverted(capabilities []Capabilities)
func (*ConvertedContext) SetChannelMapId ¶
func (c *ConvertedContext) SetChannelMapId(channelMapId string)
func (*ConvertedContext) SetChannelMapIdConverted ¶
func (c *ConvertedContext) SetChannelMapIdConverted(channelMapId int64)
func (*ConvertedContext) SetControllerId ¶
func (c *ConvertedContext) SetControllerId(controllerId string)
func (*ConvertedContext) SetControllerIdConverted ¶
func (c *ConvertedContext) SetControllerIdConverted(controllerId int64)
func (*ConvertedContext) SetECMMac ¶
func (c *ConvertedContext) SetECMMac(eCMMac string)
func (*ConvertedContext) SetEStbMac ¶
func (c *ConvertedContext) SetEStbMac(eStbMac string)
func (*ConvertedContext) SetEcmMacConverted ¶
func (c *ConvertedContext) SetEcmMacConverted(ecmMac string)
func (*ConvertedContext) SetEnv ¶
func (c *ConvertedContext) SetEnv(env string)
func (*ConvertedContext) SetEnvConverted ¶
func (c *ConvertedContext) SetEnvConverted(env string)
func (*ConvertedContext) SetEstbMacConverted ¶
func (c *ConvertedContext) SetEstbMacConverted(estbMac string)
func (*ConvertedContext) SetFirmwareVersion ¶
func (c *ConvertedContext) SetFirmwareVersion(firmwareVersion string)
func (*ConvertedContext) SetFirmwareVersionConverted ¶
func (c *ConvertedContext) SetFirmwareVersionConverted(firmwareVersion string)
func (*ConvertedContext) SetForceFilters ¶
func (c *ConvertedContext) SetForceFilters(forceFilters string)
func (*ConvertedContext) SetForceFiltersConverted ¶
func (c *ConvertedContext) SetForceFiltersConverted(forceFilters map[string]struct{})
func (*ConvertedContext) SetIpAddress ¶
func (c *ConvertedContext) SetIpAddress(ipAddress string)
func (*ConvertedContext) SetIpAddressConverted ¶
func (c *ConvertedContext) SetIpAddressConverted(ipAddress string)
func (*ConvertedContext) SetModel ¶
func (c *ConvertedContext) SetModel(model string)
func (*ConvertedContext) SetModelConverted ¶
func (c *ConvertedContext) SetModelConverted(model string)
func (*ConvertedContext) SetPartnerId ¶
func (c *ConvertedContext) SetPartnerId(partnerId string)
func (*ConvertedContext) SetReceiverId ¶
func (c *ConvertedContext) SetReceiverId(receiverId string)
func (*ConvertedContext) SetReceiverIdConverted ¶
func (c *ConvertedContext) SetReceiverIdConverted(receiverId string)
func (*ConvertedContext) SetTime ¶
func (c *ConvertedContext) SetTime(t time.Time)
func (*ConvertedContext) SetTimeConverted ¶
func (c *ConvertedContext) SetTimeConverted(t *time.Time)
func (*ConvertedContext) SetTimeZone ¶
func (c *ConvertedContext) SetTimeZone(tz string)
func (*ConvertedContext) SetTimeZoneConverted ¶
func (c *ConvertedContext) SetTimeZoneConverted(timeZone *time.Location)
func (*ConvertedContext) SetTimeZoneOffset ¶
func (c *ConvertedContext) SetTimeZoneOffset(timeZoneOffset string)
func (*ConvertedContext) SetVodId ¶
func (c *ConvertedContext) SetVodId(vodId string)
func (*ConvertedContext) SetVodIdConverted ¶
func (c *ConvertedContext) SetVodIdConverted(vodId int64)
func (*ConvertedContext) SetXconfHttpHeader ¶
func (c *ConvertedContext) SetXconfHttpHeader(xconfHttpHeader string)
func (*ConvertedContext) SetXconfHttpHeaderConverted ¶
func (c *ConvertedContext) SetXconfHttpHeaderConverted(xconfHttpHeader string)
func (*ConvertedContext) ToString ¶
func (c *ConvertedContext) ToString() string
func (*ConvertedContext) UnmarshalJSON ¶
func (cc *ConvertedContext) UnmarshalJSON(bytes []byte) error
type DownloadLocationFilter ¶
type DownloadLocationFilter struct {
IpAddressGroup *shared.IpAddressGroup `json:"ipAddressGroup" xml:"ipAddressGroup"`
Environments []string `json:"environments" xml:"environments"`
Models []string `json:"models" xml:"models"`
FirmwareDownloadProtocol string `json:"firmwareDownloadProtocol,omitempty" xml:"firmwareDownloadProtocol,omitempty"`
// tftp location
FirmwareLocation *shared.IpAddress `json:"ipv4FirmwareLocation,omitempty" xml:"ipv4FirmwareLocation,omitempty"`
Ipv6FirmwareLocation *shared.IpAddress `json:"ipv6FirmwareLocation,omitempty" xml:"ipv6FirmwareLocation,omitempty"`
HttpLocation string `json:"httpLocation,omitempty" xml:"httpLocation,omitempty"`
ForceHttp bool `json:"forceHttp" xml:"forceHttp"`
Id string `json:"id" xml:"id"`
Name string `json:"name" xml:"name"`
BoundConfigId string `json:"boundConfigId,omitempty" xml:"boundConfigId,omitempty"`
}
func DownloadLocationFiltersByApplicationType ¶
func DownloadLocationFiltersByApplicationType(applicationType string) ([]*DownloadLocationFilter, error)
func DownloadLocationFiltersByName ¶
func DownloadLocationFiltersByName(applicationType string, name string) (*DownloadLocationFilter, error)
func NewEmptyDownloadLocationFilter ¶
func NewEmptyDownloadLocationFilter() *DownloadLocationFilter
type DownloadLocationRoundRobinFilterValue ¶
type DownloadLocationRoundRobinFilterValue struct {
ID string `json:"id" xml:"id"`
Updated int64 `json:"updated" xml:"updated"`
Type SingletonFilterClass `json:"type,omitempty" xml:"type"`
ApplicationType string `json:"applicationType" xml:"applicationType"`
Locations []Location `json:"locations" xml:"locations"`
Ipv6locations []Location `json:"ipv6locations" xml:"ipv6locations"`
HttpLocation string `json:"httpLocation" xml:"httpLocation"` // regexp = "(?=^.{1,254}$)(^(?:(?!\\d+\\.|-)[a-zA-Z0-9_\\-]{1,63}(?<!-)\\.)+(?:[a-zA-Z]{2,})$)"
HttpFullUrlLocation string `json:"httpFullUrlLocation" xml:"httpFullUrlLocation"`
}
DownloadLocationRoundRobinFilterValue a subtype in SingletonFilterValue table
func GetDefaultDownloadLocationRoundRobinFilterValOneDB ¶
func GetDefaultDownloadLocationRoundRobinFilterValOneDB() (*DownloadLocationRoundRobinFilterValue, error)
func GetDownloadLocationRoundRobinFilterValOneDB ¶
func GetDownloadLocationRoundRobinFilterValOneDB(filterId string) (*DownloadLocationRoundRobinFilterValue, error)
func NewEmptyDownloadLocationRoundRobinFilterValue ¶
func NewEmptyDownloadLocationRoundRobinFilterValue() *DownloadLocationRoundRobinFilterValue
func (*DownloadLocationRoundRobinFilterValue) GetApplicationType ¶
func (obj *DownloadLocationRoundRobinFilterValue) GetApplicationType() string
func (*DownloadLocationRoundRobinFilterValue) GetDownloadLocations ¶
func (d *DownloadLocationRoundRobinFilterValue) GetDownloadLocations() []string
func (*DownloadLocationRoundRobinFilterValue) SetApplicationType ¶
func (obj *DownloadLocationRoundRobinFilterValue) SetApplicationType(appType string)
func (*DownloadLocationRoundRobinFilterValue) Validate ¶
func (obj *DownloadLocationRoundRobinFilterValue) Validate() error
type EnvModelBean ¶
type EnvModelBean struct {
Id string `json:"id,omitempty" xml:"id,omitempty"`
Name string `json:"name,omitempty" xml:"name,omitempty"`
EnvironmentId string `json:"environmentId,omitempty" xml:"environmentId,omitempty"`
ModelId string `json:"modelId,omitempty" xml:"modelId,omitempty"`
FirmwareConfig *FirmwareConfig `json:"firmwareConfig,omitempty" xml:"firmwareConfig,omitempty"`
Noop bool `json:"-"`
}
func ConvertFirmwareRuleToEnvModelRuleBean ¶
func ConvertFirmwareRuleToEnvModelRuleBean(firmwareRule *firmware.FirmwareRule) *EnvModelBean
type EnvModelPercentage ¶
type EnvModelPercentage struct {
Percentage float32 `json:"percentage"`
Active bool `json:"active"`
FirmwareCheckRequired bool `json:"firmwareCheckRequired"`
RebootImmediately bool `json:"rebootImmediately"`
LastKnownGood string `json:"lastKnownGood"`
IntermediateVersion string `json:"intermediateVersion"`
Whitelist *shared.IpAddressGroup `json:"whitelist"`
FirmwareVersions []string `json:"firmwareVersions"`
Name string `json:"name,omitempty"` // Only used as part of response for REST API
}
func NewEnvModelPercentage ¶
func NewEnvModelPercentage() *EnvModelPercentage
type EnvModelRuleBean ¶
type EnvModelRuleBean struct {
Id string `json:"id,omitempty" xml:"id,omitempty"`
Name string `json:"name,omitempty" xml:"name,omitempty"`
EnvironmentId string `json:"environmentId,omitempty" xml:"environmentId,omitempty"`
ModelId string `json:"modelId,omitempty" xml:"modelId,omitempty"`
FirmwareConfig *FirmwareConfig `json:"firmwareConfig,omitempty" xml:"firmwareConfig,omitempty"`
}
type Expression ¶
type Expression struct {
TargetedModelIds []string `json:"targetedModelIds"`
EnvironmentId string `json:"environmentId,omitempty"`
ModelId string `json:"modelId,omitempty"`
IpAddressGroup *shared.IpAddressGroup `json:"ipAddressGroup,omitempty"`
}
type FirmwareConfig ¶
type FirmwareConfig struct {
ID string `json:"id"`
Updated int64 `json:"updated,omitempty"`
Description string `json:"description"`
SupportedModelIds []string `json:"supportedModelIds"`
FirmwareFilename string `json:"firmwareFilename"`
FirmwareVersion string `json:"firmwareVersion"`
ApplicationType string `json:"applicationType,omitempty"`
FirmwareDownloadProtocol string `json:"firmwareDownloadProtocol,omitempty"`
FirmwareLocation string `json:"firmwareLocation,omitempty"`
Ipv6FirmwareLocation string `json:"ipv6FirmwareLocation,omitempty"`
UpgradeDelay int64 `json:"upgradeDelay,omitempty"`
RebootImmediately bool `json:"rebootImmediately"`
MandatoryUpdate bool `json:"mandatoryUpdate,omitempty"`
Properties map[string]string `json:"properties,omitempty"`
}
FirmwareConfig table
func GetFirmwareConfigAsListDB ¶
func GetFirmwareConfigAsListDB() ([]*FirmwareConfig, error)
func GetFirmwareConfigOneDB ¶
func GetFirmwareConfigOneDB(id string) (*FirmwareConfig, error)
func NewEmptyFirmwareConfig ¶
func NewEmptyFirmwareConfig() *FirmwareConfig
func NewFirmwareConfigFromMap ¶
func NewFirmwareConfigFromMap(dataMap map[string]interface{}) *FirmwareConfig
func (*FirmwareConfig) Clone ¶
func (obj *FirmwareConfig) Clone() (*FirmwareConfig, error)
func (*FirmwareConfig) CreateFirmwareConfigResponse ¶
func (fc *FirmwareConfig) CreateFirmwareConfigResponse() *FirmwareConfigResponse
func (*FirmwareConfig) GetApplicationType ¶
func (obj *FirmwareConfig) GetApplicationType() string
func (*FirmwareConfig) SetApplicationType ¶
func (obj *FirmwareConfig) SetApplicationType(appType string)
func (*FirmwareConfig) ToFirmwareConfigResponseMap ¶
func (fc *FirmwareConfig) ToFirmwareConfigResponseMap() map[string]interface{}
func (*FirmwareConfig) ToPropertiesMap ¶
func (fc *FirmwareConfig) ToPropertiesMap() map[string]interface{}
func (*FirmwareConfig) Validate ¶
func (obj *FirmwareConfig) Validate() error
func (*FirmwareConfig) ValidateName ¶
func (obj *FirmwareConfig) ValidateName() error
type FirmwareConfigFacade ¶
type FirmwareConfigFacade struct {
Properties map[string]interface{}
CustomProperties map[string]string
}
FirmwareConfigFacade ...
func NewDefaulttFirmwareConfigFacade ¶
func NewDefaulttFirmwareConfigFacade() *FirmwareConfigFacade
NewFirmwareConfigFacade ...
func NewFirmwareConfigFacade ¶
func NewFirmwareConfigFacade(firmwareConfig *FirmwareConfig) *FirmwareConfigFacade
func NewFirmwareConfigFacadeEmptyProperties ¶
func NewFirmwareConfigFacadeEmptyProperties() *FirmwareConfigFacade
NewEmptyFirmwareConfigFacade ...
func (*FirmwareConfigFacade) GetFirmwareDownloadProtocol ¶
func (ff *FirmwareConfigFacade) GetFirmwareDownloadProtocol() string
GetFirmwareDownloadProtocol ...
func (*FirmwareConfigFacade) GetFirmwareFilename ¶
func (ff *FirmwareConfigFacade) GetFirmwareFilename() string
func (*FirmwareConfigFacade) GetFirmwareLocation ¶
func (ff *FirmwareConfigFacade) GetFirmwareLocation() string
func (*FirmwareConfigFacade) GetFirmwareVersion ¶
func (ff *FirmwareConfigFacade) GetFirmwareVersion() string
func (*FirmwareConfigFacade) GetIpv6FirmwareLocation ¶
func (ff *FirmwareConfigFacade) GetIpv6FirmwareLocation() string
func (*FirmwareConfigFacade) GetRebootImmediately ¶
func (ff *FirmwareConfigFacade) GetRebootImmediately() bool
func (*FirmwareConfigFacade) GetStringValue ¶
func (ff *FirmwareConfigFacade) GetStringValue(key string) string
func (*FirmwareConfigFacade) GetUpgradeDelay ¶
func (ff *FirmwareConfigFacade) GetUpgradeDelay() int
func (*FirmwareConfigFacade) GetValue ¶
func (ff *FirmwareConfigFacade) GetValue(key string) interface{}
func (*FirmwareConfigFacade) MarshalJSON ¶
func (fcf *FirmwareConfigFacade) MarshalJSON() ([]byte, error)
func (*FirmwareConfigFacade) PutAll ¶
func (ff *FirmwareConfigFacade) PutAll(nmap map[string]interface{})
func (*FirmwareConfigFacade) PutIfPresent ¶
func (ff *FirmwareConfigFacade) PutIfPresent(key string, value interface{})
func (*FirmwareConfigFacade) SetFirmwareDownloadProtocol ¶
func (ff *FirmwareConfigFacade) SetFirmwareDownloadProtocol(protocol string)
SetFirmwareDownloadProtocol ...
func (*FirmwareConfigFacade) SetFirmwareLocation ¶
func (ff *FirmwareConfigFacade) SetFirmwareLocation(location string)
func (*FirmwareConfigFacade) SetRebootImmediately ¶
func (ff *FirmwareConfigFacade) SetRebootImmediately(flag bool)
func (*FirmwareConfigFacade) SetStringValue ¶
func (ff *FirmwareConfigFacade) SetStringValue(key string, value string)
func (*FirmwareConfigFacade) UnmarshalJSON ¶
func (fcf *FirmwareConfigFacade) UnmarshalJSON(bytes []byte) error
type FirmwareConfigFacadeResponse ¶
type FirmwareConfigFacadeResponse map[string]interface{}
func CreateFirmwareConfigFacadeResponse ¶
func CreateFirmwareConfigFacadeResponse(firmwareConfigFacade FirmwareConfigFacade) FirmwareConfigFacadeResponse
type FirmwareConfigForMacRuleBeanResponse ¶
type FirmwareConfigForMacRuleBeanResponse struct {
ID string `json:"id"`
Updated int64 `json:"updated,omitempty"`
Description string `json:"description"`
SupportedModelIds []string `json:"supportedModelIds"`
FirmwareFilename string `json:"firmwareFilename"`
FirmwareVersion string `json:"firmwareVersion"`
ApplicationType string `json:"applicationType,omitempty"`
FirmwareDownloadProtocol string `json:"firmwareDownloadProtocol,omitempty"`
FirmwareLocation string `json:"firmwareLocation,omitempty"`
Ipv6FirmwareLocation string `json:"ipv6FirmwareLocation,omitempty"`
UpgradeDelay int64 `json:"upgradeDelay,omitempty"`
RebootImmediately bool `json:"rebootImmediately,omitempty"`
MandatoryUpdate bool `json:"-"`
Properties map[string]string `json:"properties,omitempty"`
}
func FirmwareConfigToFirmwareConfigForMacRuleBeanResponse ¶
func FirmwareConfigToFirmwareConfigForMacRuleBeanResponse(firmwareConfig *FirmwareConfig) *FirmwareConfigForMacRuleBeanResponse
type FirmwareConfigResponse ¶
type FirmwareConfigResponse struct {
ID string `json:"id"`
Description string `json:"description,omitempty"`
SupportedModelIds []string `json:"supportedModelIds,omitempty"`
FirmwareFilename string `json:"firmwareFilename,omitempty"`
FirmwareVersion string `json:"firmwareVersion,omitempty"`
Properties map[string]string `json:"properties,omitempty"`
}
type GlobalPercentage ¶
type GlobalPercentage struct {
Whitelist string `json:"whitelist,omitempty"`
Percentage float32 `json:"percentage,omitempty"`
ApplicationType string `json:"applicationType,omitempty"`
}
func ConvertIntoGlobalPercentageFirmwareRule ¶
func ConvertIntoGlobalPercentageFirmwareRule(firmwareRule *firmware.FirmwareRule) *GlobalPercentage
func NewGlobalPercentage ¶
func NewGlobalPercentage() *GlobalPercentage
type IpFilter ¶
type IpFilter struct {
Id string `json:"id" xml:"id"`
Name string `json:"name" xml:"name"`
IpAddressGroup *shared.IpAddressGroup `json:"ipAddressGroup" xml:"ipAddressGroup"`
Warehouse bool `json:"warehouse" xml:"warehouse"`
}
func ConvertFirmwareRuleToIpFilter ¶
func ConvertFirmwareRuleToIpFilter(firmwareRule *firmware.FirmwareRule) *IpFilter
func NewEmptyIpFilter ¶
func NewEmptyIpFilter() *IpFilter
func (*IpFilter) IsWarehouse ¶
*
- Quick and dirty way to tell if this filter is tied to a warehouse or not.
- If it is we don't want to allow editing/deleting
type IpRuleBean ¶
type IpRuleBean struct {
Id string `json:"id"`
FirmwareConfig *FirmwareConfig `json:"firmwareConfig"`
Name string `json:"name"`
IpAddressGroup *shared.IpAddressGroup `json:"ipAddressGroup"`
EnvironmentId string `json:"environmentId"`
ModelId string `json:"modelId"`
Expression *Expression `json:"expression"`
Noop bool `json:"noop"`
}
IpRuleBean ...
func ConvertFirmwareRuleToIpRuleBean ¶
func ConvertFirmwareRuleToIpRuleBean(firmwareRule *firmware.FirmwareRule) *IpRuleBean
convertFirmwareRuleToIpRuleBean ...
func ConvertFirmwareRuleToIpRuleBeanAddFirmareConfig ¶
func ConvertFirmwareRuleToIpRuleBeanAddFirmareConfig(firmwareRule *firmware.FirmwareRule) (bean *IpRuleBean, err error)
type Location ¶
type Location struct {
LocationIp string `json:"locationIp" xml:"locationIp"`
Percentage float64 `json:"percentage" xml:"percentage"`
}
func NewLocation ¶
type MacRuleBean ¶
type MacRuleBean struct {
Id string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
MacAddresses string `json:"macAddresses,omitempty"`
MacListRef string `json:"macListRef,omitempty"`
FirmwareConfig *FirmwareConfig `json:"firmwareConfig"`
TargetedModelIds *[]string `json:"targetedModelIds,omitempty"`
//in JAva, MacList is in MacRuleBeanWrapper that extends MacRuleBean
MacList *[]string `json:"macList,omitempty"`
}
MacRuleBean ...
func ConvertFirmwareRuleToMacRuleBeanWrapper ¶
func ConvertFirmwareRuleToMacRuleBeanWrapper(firmwareRule *firmware.FirmwareRule) *MacRuleBean
type MacRuleBeanResponse ¶
type MacRuleBeanResponse struct {
Id string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
MacAddresses string `json:"macAddresses,omitempty"`
MacListRef string `json:"macListRef,omitempty"`
FirmwareConfig *FirmwareConfigForMacRuleBeanResponse `json:"firmwareConfig"`
TargetedModelIds *[]string `json:"targetedModelIds,omitempty"`
MacList *[]string `json:"macList,omitempty"`
}
func MacRuleBeanToMacRuleBeanResponse ¶
func MacRuleBeanToMacRuleBeanResponse(macRuleBean *MacRuleBean) *MacRuleBeanResponse
type MinimumFirmwareCheckBean ¶
type MinimumFirmwareCheckBean struct {
HasMinimumFirmware bool `json:"hasMinimumFirmware"`
}
MinimumFirmwareCheckBean ...
type ModelFirmwareConfiguration ¶
type ModelFirmwareConfiguration struct {
Model string `json:"model"`
FirmwareFilename string `json:"firmwareFilename"`
FirmwareVersion string `json:"firmwareVersion"`
}
ModelFirmwareConfiguration ...
func NewModelFirmwareConfiguration ¶
func NewModelFirmwareConfiguration(model string, firmwareFilename string, firmwareVersion string) *ModelFirmwareConfiguration
NewModelFirmwareConfiguration ... new model config struct
func (*ModelFirmwareConfiguration) ToString ¶
func (m *ModelFirmwareConfiguration) ToString() string
type PercentFilterValue ¶
type PercentFilterValue struct {
ID string `json:"id"`
Updated int64 `json:"updated"`
Type SingletonFilterClass `json:"type"`
Whitelist *shared.IpAddressGroup `json:"whitelist"`
Percentage float32 `json:"percentage"`
Percent int `json:"percent"`
EnvModelPercentages map[string]EnvModelPercentage `json:"envModelPercentages"`
}
PercentFilterValue a subtype in SingletonFilterValue table
func GetDefaultPercentFilterValueOneDB ¶
func GetDefaultPercentFilterValueOneDB() (*PercentFilterValue, error)
func NewEmptyPercentFilterValue ¶
func NewEmptyPercentFilterValue() *PercentFilterValue
func NewPercentFilterValue ¶
func NewPercentFilterValue(whiteList *shared.IpAddressGroup, percentage float32, envModelPercentages map[string]EnvModelPercentage) *PercentFilterValue
func (*PercentFilterValue) GetEnvModelPercentage ¶
func (p *PercentFilterValue) GetEnvModelPercentage(name string) *EnvModelPercentage
func (*PercentFilterValue) GetId ¶
func (p *PercentFilterValue) GetId() string
func (*PercentFilterValue) SetId ¶
func (p *PercentFilterValue) SetId(id string) error
type PercentFilterVo ¶
type PercentFilterVo struct {
GlobalPercentage *GlobalPercentage `json:"globalPercentage,omitempty"`
PercentageBeans []PercentageBean `json:"percentageBeans"`
}
func NewDefaultPercentFilterVo ¶
func NewDefaultPercentFilterVo() *PercentFilterVo
func NewPercentFilterVo ¶
func NewPercentFilterVo(globalPercentage *GlobalPercentage, percentageBeans []PercentageBean) *PercentFilterVo
type PercentFilterWrapper ¶
type PercentFilterWrapper struct {
ID string `json:"id"`
Type SingletonFilterClass `json:"type"`
Whitelist *shared.IpAddressGroup `json:"whitelist,omitempty"`
Percentage float64 `json:"percentage"`
EnvModelPercentages []EnvModelPercentage `json:"EnvModelPercentages"`
}
REST API response
func (*PercentFilterWrapper) ToPercentFilterValue ¶
func (wrapper *PercentFilterWrapper) ToPercentFilterValue() *PercentFilterValue
type PercentageBean ¶
type PercentageBean struct {
ID string `json:"id"`
Name string `json:"name,omitempty"`
Whitelist string `json:"whitelist,omitempty"`
Active bool `json:"active"`
FirmwareCheckRequired bool `json:"firmwareCheckRequired"`
RebootImmediately bool `json:"rebootImmediately"`
LastKnownGood string `json:"lastKnownGood,omitempty"`
IntermediateVersion string `json:"intermediateVersion,omitempty"`
FirmwareVersions []string `json:"firmwareVersions"`
Distributions []*firmware.ConfigEntry `json:"distributions"`
ApplicationType string `json:"applicationType,omitempty"`
Environment string `json:"environment,omitempty"`
Model string `json:"model,omitempty"`
OptionalConditions *re.Rule `json:"optionalConditions,omitempty"`
UseAccountIdPercentage bool `json:"useAccountIdPercentage"`
}
func ConvertFirmwareRuleToPercentageBean ¶
func ConvertFirmwareRuleToPercentageBean(firmwareRule *firmware.FirmwareRule) *PercentageBean
func NewPercentageBean ¶
func NewPercentageBean() *PercentageBean
func ReplaceConfigIdWithFirmwareVersion ¶
func ReplaceConfigIdWithFirmwareVersion(bean *PercentageBean) *PercentageBean
func (*PercentageBean) GetRuleType ¶
func (p *PercentageBean) GetRuleType() string
func (*PercentageBean) GetTemplateId ¶
func (p *PercentageBean) GetTemplateId() string
func (*PercentageBean) Validate ¶
func (p *PercentageBean) Validate() error
func (*PercentageBean) ValidateAll ¶
func (p *PercentageBean) ValidateAll(beans []*PercentageBean) error
func (*PercentageBean) ValidateForAS ¶
func (p *PercentageBean) ValidateForAS() error
type RebootImmediatelyFilter ¶
type RebootImmediatelyFilter struct {
IpAddressGroup []*shared.IpAddressGroup `json:"ipAddressGroup" xml:"ipAddressGroup"`
Environments []string `json:"environments" xml:"environments"`
Models []string `json:"models" xml:"models"`
MacAddress string `json:"macAddresses" xml:"macAddresses"`
Id string `json:"id" xml:"id"`
Name string `json:"name" xml:"name"`
}
func RebootImmediatelyFiltersByApplicationType ¶
func RebootImmediatelyFiltersByApplicationType(applicationType string) ([]*RebootImmediatelyFilter, error)
type RuleFactory ¶
type RuleFactory struct {
}
func (*RuleFactory) NewActivationVersionRule ¶
func (f *RuleFactory) NewActivationVersionRule(model string, partnerId string) re.Rule
func (*RuleFactory) NewDownloadLocationFilter ¶
func (f *RuleFactory) NewDownloadLocationFilter(ipList string, downloadProtocol string) *re.Rule
NewDownloadLocationFilter
func (*RuleFactory) NewEnvModelRule ¶
func (f *RuleFactory) NewEnvModelRule(env string, model string) re.Rule
NewEnvModelRule
func (*RuleFactory) NewGlobalPercentFilter ¶
func (f *RuleFactory) NewGlobalPercentFilter(percent float64, ipList string) *re.Rule
NewGlobalPercentFilter
func (*RuleFactory) NewGlobalPercentFilterTemplate ¶
func (f *RuleFactory) NewGlobalPercentFilterTemplate(percent float64, ipList string) *re.Rule
func (*RuleFactory) NewIntermediateVersionRule ¶
NewIntermediateVersionRule
func (*RuleFactory) NewIpFilter ¶
func (f *RuleFactory) NewIpFilter(listName string) *re.Rule
NEWIpFilter ...
func (*RuleFactory) NewMinVersionCheckRule ¶
NewMinVersionCheckRule
func (*RuleFactory) NewModelRule ¶
func (f *RuleFactory) NewModelRule(model string) re.Rule
NewModelRule
func (*RuleFactory) NewRiFilter ¶
func (f *RuleFactory) NewRiFilter(ipAddressGroups []string, macAddresses []string, environments []string, models []string) *re.Rule
NewRiFilter
func (*RuleFactory) NewRiFilterTemplate ¶
func (f *RuleFactory) NewRiFilterTemplate() *re.Rule
NewRiFilter
type RuleInfo ¶
type RuleInfo struct {
ID string `json:"id,omitempty"`
Type string `json:"type,omitempty"`
Name string `json:"name,omitempty"`
NoOp bool `json:"noop"`
Blocking bool `json:"blocking,omitempty"`
}
RuleInfo ...
func NewRuleInfo ¶
func NewRuleInfo(filterOrRule interface{}) *RuleInfo
type SingletonFilterClass ¶
type SingletonFilterClass string
const ( PercentFilterClass SingletonFilterClass = "com.comcast.xconf.estbfirmware.PercentFilterValue" PercentFilterWrapperClass SingletonFilterClass = "com.comcast.xconf.queries.beans.PercentFilterWrapper" RoundRobinFilterClass SingletonFilterClass = "com.comcast.xconf.estbfirmware.DownloadLocationRoundRobinFilterValue" )
type SingletonFilterValue ¶
type SingletonFilterValue struct {
ID string `json:"id"`
PercentFilterValue *PercentFilterValue `json:"-"`
DownloadLocationRoundRobinFilterValue *DownloadLocationRoundRobinFilterValue `json:"-"`
}
SingletonFilterValue table - this struct serves as a container for the two subtypes
func (*SingletonFilterValue) Clone ¶
func (obj *SingletonFilterValue) Clone() (*SingletonFilterValue, error)
func (*SingletonFilterValue) IsDownloadLocationRoundRobinFilterValue ¶
func (sfv *SingletonFilterValue) IsDownloadLocationRoundRobinFilterValue() bool
func (*SingletonFilterValue) IsPercentFilterValue ¶
func (sfv *SingletonFilterValue) IsPercentFilterValue() bool
func (*SingletonFilterValue) MarshalJSON ¶
func (sfv *SingletonFilterValue) MarshalJSON() ([]byte, error)
MarshalJSON custom marshal to handle different subclass of SingletonFilterValue
func (*SingletonFilterValue) UnmarshalJSON ¶
func (sfv *SingletonFilterValue) UnmarshalJSON(bytes []byte) error
UnmarshalJSON custom unmarshal to handle different subclass of SingletonFilterValue
type TemplateFactory ¶
type TemplateFactory struct {
}
type TimeFilter ¶
type TimeFilter struct {
Id string `json:"id" xml:"id"`
Name string `json:"name" xml:"name"`
IpWhiteList *shared.IpAddressGroup `json:"ipWhitelist" xml:"ipWhitelist"`
EnvModelRuleBean EnvModelRuleBean `json:"envModelWhitelist" xml:"envModelWhitelist"`
NeverBlockRebootDecoupled bool `json:"neverBlockRebootDecoupled" xml:"neverBlockRebootDecoupled"`
NeverBlockHttpDownload bool `json:"neverBlockHttpDownload" xml:"neverBlockHttpDownload"`
Start string `json:"startTime" xml:"startTime"`
End string `json:"endTime" xml:"endTime"`
LocalTime bool `json:"localTime" xml:"localTime"`
}
func TimeFilterByName ¶
func TimeFilterByName(name string, applicationType string) (*TimeFilter, error)
func TimeFiltersByApplicationType ¶
func TimeFiltersByApplicationType(applicationType string) ([]*TimeFilter, error)