estbfirmware

package
v1.0.17 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2026 License: Apache-2.0, BSD-3-Clause Imports: 21 Imported by: 3

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

View Source
const (
	DEFAULT_PREFIX     string = "XCONF"
	BOUNDS             int    = 5
	LAST_CONFIG_LOG_ID        = "0"
)
View Source
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"
)
View Source
const (
	DATE_TIME_FORMATTER     = "1/2/2006 15:04"
	DATE_TIME_SEC_FORMATTER = "01/02/2006 15:04:05"
)
View Source
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
)
View Source
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"
)
View Source
const (
	EMPTY_NAME      = ""
	DEFAULT_PERCENT = 0
	TRUE            = "true"
)
View Source
const (
	PERCENT_FILTER_SINGLETON_ID     = "PERCENT_FILTER_VALUE"
	ROUND_ROBIN_FILTER_SINGLETON_ID = "DOWNLOAD_LOCATION_ROUND_ROBIN_FILTER_VALUE"
)

Variables

View Source
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
)
View Source
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 DeleteOneFirmwareConfig(id string) error

func GetCurrentId

func GetCurrentId(mac string) (string, error)

func GetFirmwareVersion

func GetFirmwareVersion(id string) string

func GetIpAddressGroup

func GetIpAddressGroup(cond *re.Condition) *shared.IpAddressGroup

func GetRoundRobinIdByApplication

func GetRoundRobinIdByApplication(applicationType string) string

func GetWhitelistName

func GetWhitelistName(ipAddressGroup *shared.IpAddressGroup) string

func IsLegacyIpCondition

func IsLegacyIpCondition(condition re.Condition) bool

isLegacyIpCondition ...

func IsLegacyIpFreeArg

func IsLegacyIpFreeArg(freeArg *re.FreeArg) bool

func IsLegacyLocalTimeFreeArg

func IsLegacyLocalTimeFreeArg(freeArg re.FreeArg) bool

func IsLegacyMacFreeArg

func IsLegacyMacFreeArg(freeArg re.FreeArg) bool

func IsLetter

func IsLetter(s string) bool

func IsLower

func IsLower(s string) bool

func IsRedundantEntry

func IsRedundantEntry(key string) bool

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 NewMacRule(macListName string) re.Rule

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 ...

func (*BseConfiguration) ToString

func (b *BseConfiguration) ToString() string

ToString ...

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 ConfigNames

type ConfigNames string

ConfigNames ...

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

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 IpFilterByName

func IpFilterByName(name string, applicationType string) (*IpFilter, error)

func IpFiltersByApplicationType

func IpFiltersByApplicationType(applicationType string) ([]*IpFilter, error)

func NewEmptyIpFilter

func NewEmptyIpFilter() *IpFilter

func (*IpFilter) IsWarehouse

func (i *IpFilter) IsWarehouse() bool

*

  • 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

func NewLocation(ip string, perc float64) *Location

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 NewRuleFactory

func NewRuleFactory() *RuleFactory

NewRuleFactory ...

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

func (f *RuleFactory) NewIntermediateVersionRule(env string, model string, version string) re.Rule

NewIntermediateVersionRule

func (*RuleFactory) NewIpFilter

func (f *RuleFactory) NewIpFilter(listName string) *re.Rule

NEWIpFilter ...

func (*RuleFactory) NewIpRule

func (f *RuleFactory) NewIpRule(listName string, environment string, model string) re.Rule

NEWIpRule ...

func (*RuleFactory) NewMinVersionCheckRule

func (f *RuleFactory) NewMinVersionCheckRule(env string, model string, versions []string) re.Rule

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

func (*RuleFactory) NewTimeFilter

func (f *RuleFactory) NewTimeFilter(neverBlockRebootDecoupled bool, neverBlockHttpDownload bool, isLocalTime bool,
	environment string, model string, ipWhiteList string, start string, end string) *re.Rule

NewTimeFilter

func (*RuleFactory) NewTimeFilterTemplate

func (f *RuleFactory) NewTimeFilterTemplate(neverBlockRebootDecoupled bool, neverBlockHttpDownload bool, isLocalTime bool,
	environment string, model string, ipWhiteList string, start string, end string) *re.Rule

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 (*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 {
}

func NEWTemplateFactory

func NEWTemplateFactory() *TemplateFactory

NEWTemplateFactory ...

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)

Jump to

Keyboard shortcuts

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