shared

package
v1.0.11 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

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

View Source
const (
	STB      = "stb"
	RDKCLOUD = "rdkcloud"
	XHOME    = "xhome"
	ALL      = "all"
)
View Source
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"
)
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"
	PROPERTIES             = "properties"
	APPLICATION_TYPE       = "applicationType"
	MANDATORY_UPDATE       = "mandatoryUpdate"

	// from Java StbContext.FIRMWARE_VERSION
	// also from Java DefinePropertiesAction class
	FIRMWARE_VERSIONS   = "firmwareVersions"
	REGULAR_EXPRESSIONS = "regularExpressions"
)
View Source
const (
	TABLE_LOGS_KEY2_FIELD_NAME = "column1"
	LAST_CONFIG_LOG_ID         = "0"
)
View Source
const (
	StbContextTime      = "time"
	StbContextModel     = "model"
	MacList             = "MAC_LIST"
	IpList              = "IP_LIST"
	TableGenericNSList  = "GenericXconfNamedList"
	TableFirmwareConfig = "FirmwareConfig"
	TableFirmwareRule   = "FirmwareRule4"
)
View Source
const (
	Tftp  = "tftp"
	Http  = "http"
	Https = "https"
)
View Source
const (
	SipHashKey0 = uint64(506097522914230528)
	SipHashKey1 = uint64(1084818905618843912)
)

Variables

This section is empty.

Functions

func ApplicationTypeEquals

func ApplicationTypeEquals(type1 string, type2 string) bool

func CalculateHashAndPercent

func CalculateHashAndPercent(value string) (float64, float64)

func CalculatePercent

func CalculatePercent(value string) int

func GetApplicationFromCookies

func GetApplicationFromCookies(r *http.Request) string

func InitializeApplicationTypes

func InitializeApplicationTypes()

func IsValidApplicationType

func IsValidApplicationType(at string) bool

func NewAppSettingInf

func NewAppSettingInf() interface{}

NewAppSettingInf constructor

func NewEnvironmentInf

func NewEnvironmentInf() interface{}

NewEnvironmentInf constructor

func NewModelInf

func NewModelInf() interface{}

NewModelInf constructor

func NormalizeCommonContext

func NormalizeCommonContext(contextMap map[string]string, estbMacKey string, ecmMacKey string) (e error)

func ValidateApplicationType

func ValidateApplicationType(applicationType string) error

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

type ConditionInfo struct {
	FreeArg   re.FreeArg
	Operation string
}

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 NewModel

func NewModel(id string, description string) *Model

NewModel ...

func (*Model) Clone

func (obj *Model) Clone() (*Model, error)

func (*Model) CreateModelResponse

func (m *Model) CreateModelResponse() *ModelResponse

func (*Model) Validate

func (obj *Model) Validate() error

type ModelResponse

type ModelResponse struct {
	ID          string `json:"id"`
	Description string `json:"description,omitempty"`
}

type Prioritizable

type Prioritizable interface {
	GetPriority() int
	SetPriority(priority int)
	GetID() string
}

Prioritizable is ...

type StringListWrapper

type StringListWrapper struct {
	List []string `json:"list"`
}

StringListWrapper ...

func NewStringListWrapper

func NewStringListWrapper(list []string) *StringListWrapper

type XEnvModel

type XEnvModel interface {
	GetId() string
	GetDescription() string
}

XEnvModel is ...

type XRule

type XRule interface {
	GetId() string
	GetRule() *re.Rule
	GetName() string
	GetTemplateId() string
	GetRuleType() string
}

XRule is ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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