Documentation
¶
Overview ¶
Copyright 2025 Comcast Cable Communications Management, LLC
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
SPDX-License-Identifier: Apache-2.0
Index ¶
- Constants
- func ApplicationTypeEquals(type1 string, type2 string) bool
- func CalculateHashAndPercent(value string) (float64, float64)
- func CalculatePercent(value string) int
- func GetApplicationFromCookies(r *http.Request) string
- func InitializeApplicationTypes()
- func IsValidApplicationType(at string) bool
- func NewAppSettingInf() interface{}
- func NewEnvironmentInf() interface{}
- func NewModelInf() interface{}
- func NormalizeCommonContext(contextMap map[string]string, estbMacKey string, ecmMacKey string) (e error)
- func ValidateApplicationType(applicationType string) error
- type AppSetting
- type ConditionInfo
- type Environment
- type Model
- type ModelResponse
- type Prioritizable
- type StringListWrapper
- type XEnvModel
- type XRule
Constants ¶
const ( STB = "stb" RDKCLOUD = "rdkcloud" XHOME = "xhome" ALL = "all" )
const ( ESTB_MAC = "eStbMac" ENVIRONMENT = "env" MODEL = "model" FIRMWARE_VERSION = "firmwareVersion" ECM_MAC = "eCMMac" RECEIVER_ID = "receiverId" CONTROLLER_ID = "controllerId" CHANNEL_MAP = "channelMapId" VOD_ID = "vodId" TIME_ZONE = "timeZone" TIME_ZONE_OFFSET = "timeZoneOffset" TIME = "time" IP_ADDRESS = "ipAddress" DOWNLOAD_PROTOCOL = "firmware_download_protocol" REBOOT_DECOUPLED = "rebootDecoupled" MATCHED_RULE_TYPE = "matchedRuleType" BYPASS_FILTERS = "bypassFilters" FORCE_FILTERS = "forceFilters" CAPABILITIES = "capabilities" PARTNER_ID = "partnerId" ACCOUNT_HASH = "accountHash" ACCOUNT_ID = "accountId" XCONF_HTTP_HEADER = "HA-Haproxy-xconf-http" )
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" PROPERTIES = "properties" APPLICATION_TYPE = "applicationType" MANDATORY_UPDATE = "mandatoryUpdate" // from Java StbContext.FIRMWARE_VERSION // also from Java DefinePropertiesAction class FIRMWARE_VERSIONS = "firmwareVersions" REGULAR_EXPRESSIONS = "regularExpressions" )
const ( TABLE_LOGS_KEY2_FIELD_NAME = "column1" LAST_CONFIG_LOG_ID = "0" )
const ( StbContextTime = "time" StbContextModel = "model" MacList = "MAC_LIST" IpList = "IP_LIST" TableGenericNSList = "GenericXconfNamedList" TableFirmwareConfig = "FirmwareConfig" TableFirmwareRule = "FirmwareRule4" )
const ( Tftp = "tftp" Http = "http" Https = "https" )
const ( SipHashKey0 = uint64(506097522914230528) SipHashKey1 = uint64(1084818905618843912) )
Variables ¶
This section is empty.
Functions ¶
func ApplicationTypeEquals ¶
func CalculateHashAndPercent ¶
func CalculatePercent ¶
func InitializeApplicationTypes ¶
func InitializeApplicationTypes()
func IsValidApplicationType ¶
func NormalizeCommonContext ¶
func ValidateApplicationType ¶
Validate whether the ApplicationType is valid if specified
Types ¶
type AppSetting ¶
type AppSetting struct {
ID string `json:"id"`
Updated int64 `json:"updated"`
Value interface{} `json:"value"`
}
AppSettings table object
func (*AppSetting) Clone ¶
func (obj *AppSetting) Clone() (*AppSetting, error)
type ConditionInfo ¶
ConditionInfo is ...
func NewConditionInfo ¶
func NewConditionInfo(freeArg re.FreeArg, operation string) *ConditionInfo
NewConditionInfo create a new instance
type Environment ¶
type Environment struct {
ID string `json:"id"`
Updated int64 `json:"updated"`
Description string `json:"description"`
}
Environment table object
func NewEnvironment ¶
func NewEnvironment(id string, description string) *Environment
NewEnvironment ...
func (*Environment) Clone ¶
func (obj *Environment) Clone() (*Environment, error)
func (*Environment) Validate ¶
func (obj *Environment) Validate() error
type Model ¶
type Model struct {
ID string `json:"id"`
Updated int64 `json:"updated"`
Description string `json:"description,omitempty"`
}
Model table object
func (*Model) CreateModelResponse ¶
func (m *Model) CreateModelResponse() *ModelResponse
type ModelResponse ¶
type Prioritizable ¶
Prioritizable is ...
type StringListWrapper ¶
type StringListWrapper struct {
List []string `json:"list"`
}
StringListWrapper ...
func NewStringListWrapper ¶
func NewStringListWrapper(list []string) *StringListWrapper