firmware

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2025 License: Apache-2.0 Imports: 9 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 (
	ApplicableActionClass               = ".ApplicableAction"
	RuleActionClass                     = ".RuleAction"
	DefinePropertiesActionClass         = ".DefinePropertiesAction"
	DefinePropertiesTemplateActionClass = ".DefinePropertiesTemplateAction"
	BlockingFilterActionClass           = ".BlockingFilterAction"
)

ApplicableAction's Type is the Java class name and has to be one of these

View Source
const (
	STRING  ValidationType = "STRING"
	BOOLEAN                = "BOOLEAN"
	NUMBER                 = "NUMBER"
	PERCENT                = "PERCENT"
	PORT                   = "PORT"
	URL                    = "URL"
	IPV4                   = "IPV4"
	IPV6                   = "IPV6"
)

Variables

This section is empty.

Functions

func ApplicableActionTypeToString

func ApplicableActionTypeToString(actionType ApplicableActionType) string

func GetFirmwareRuleTemplateCount

func GetFirmwareRuleTemplateCount() (int, error)

func GetFirmwareSortedRuleAllAsListDB

func GetFirmwareSortedRuleAllAsListDB() ([]*corefw.FirmwareRule, error)

func HasFirmwareVersion

func HasFirmwareVersion(firmwareVersions []string, version string) bool

func IsValidApplicableActionType

func IsValidApplicableActionType(t ApplicableActionType) bool

func NewBlockingFilterAction

func NewBlockingFilterAction() interface{}

func NewBlockingFilterTemplate

func NewBlockingFilterTemplate(id string, rule ru.Rule, priority int) *corefw.FirmwareRuleTemplate

func NewDefinePropertiesAction

func NewDefinePropertiesAction() interface{}

func NewDefinePropertiesTemplate

func NewDefinePropertiesTemplate(id string, rule ru.Rule, properties map[string]corefw.PropertyValue, byPassFilter []string, priority int) *corefw.FirmwareRuleTemplate

func NewDefinePropertiesTemplateAction

func NewDefinePropertiesTemplateAction() interface{}

func NewFirmwareRuleTemplate

func NewFirmwareRuleTemplate(id string, rule ru.Rule, byPassFilters []string, priority int) *corefw.FirmwareRuleTemplate

func SortConfigEntry

func SortConfigEntry(entries []*ConfigEntry)

Types

type ActivationVersion

type ActivationVersion struct {
	ID                 string   `json:"id"`
	ApplicationType    string   `json:"applicationType,omitempty"`
	Description        string   `json:"description,omitempty"`
	Model              string   `json:"model,omitempty"`
	PartnerId          string   `json:"partnerId,omitempty"`
	RegularExpressions []string `json:"regularExpressions"`
	FirmwareVersions   []string `json:"firmwareVersions"`
}

func NewActivationVersion

func NewActivationVersion() *ActivationVersion

NewActivationVersion constructor

func (*ActivationVersion) GetApplicationType

func (obj *ActivationVersion) GetApplicationType() string

getApplicationType implements queries.T.

func (*ActivationVersion) SetApplicationType

func (obj *ActivationVersion) SetApplicationType(appType string)

setApplicationType implements queries.T.

type ApplicableAction

type ApplicableAction struct {
	Type                       string               `json:"type"` // Java class name
	ActionType                 ApplicableActionType `json:"actionType,omitempty" jsonschema:"enum=RULE,enum=DEFINE_PROPERTIES,enum=BLOCKING_FILTER"`
	ConfigId                   string               `json:"configId,omitempty"`
	ConfigEntries              []ConfigEntry        `json:"configEntries"` // RuleAction
	Active                     bool                 `json:"active"`
	UseAccountPercentage       bool                 `json:"useAccountPercentage"`
	FirmwareCheckRequired      bool                 `json:"firmwareCheckRequired"`
	RebootImmediately          bool                 `json:"rebootImmediately"`
	Whitelist                  string               `json:"whitelist,omitempty"`
	IntermediateVersion        string               `json:"intermediateVersion,omitempty"`
	FirmwareVersions           []string             `json:"firmwareVersions,omitempty"`
	Properties                 map[string]string    `json:"properties,omitempty"` // DefinePropertiesAction
	ByPassFilters              []string             `json:"byPassFilters,omitempty"`
	ActivationFirmwareVersions map[string][]string  `json:"activationFirmwareVersions,omitempty"`
}

func (*ApplicableAction) GetFirmwareVersionRegExs

func (d *ApplicableAction) GetFirmwareVersionRegExs() []string

func (*ApplicableAction) GetFirmwareVersions

func (d *ApplicableAction) GetFirmwareVersions() []string

type ApplicableActionType

type ApplicableActionType string
const (
	EMPTY_ACTION_TYPE          ApplicableActionType = ""
	RULE                       ApplicableActionType = "RULE"
	DEFINE_PROPERTIES          ApplicableActionType = "DEFINE_PROPERTIES"
	BLOCKING_FILTER            ApplicableActionType = "BLOCKING_FILTER"
	RULE_TEMPLATE              ApplicableActionType = "RULE_TEMPLATE"
	DEFINE_PROPERTIES_TEMPLATE ApplicableActionType = "DEFINE_PROPERTIES_TEMPLATE"
	BLOCKING_FILTER_TEMPLATE   ApplicableActionType = "BLOCKING_FILTER_TEMPLATE"
)

func (*ApplicableActionType) CaseIgnoreEquals

func (this *ApplicableActionType) CaseIgnoreEquals(that ApplicableActionType) bool

func (*ApplicableActionType) IsSuperSetOf

func (this *ApplicableActionType) IsSuperSetOf(that *ApplicableActionType) bool

type BlockingFilterAction

type BlockingFilterAction struct {
	ApplicableAction
}

BlockingFilterAction ...

type ConfigEntry

type ConfigEntry struct {
	ConfigId          string  `json:"configId"`
	Percentage        float64 `json:"percentage"`
	StartPercentRange float64 `json:"startPercentRange"`
	EndPercentRange   float64 `json:"endPercentRange"`
	IsCanaryDisabled  bool    `json:"isCanaryDisabled"`
	IsPaused          bool    `json:"isPaused"`
}

func NewConfigEntry

func NewConfigEntry(configId string, startPercentRange float64, endPercentRange float64) *ConfigEntry

func (*ConfigEntry) CompareTo

func (c *ConfigEntry) CompareTo(configEntry *ConfigEntry) int

func (*ConfigEntry) Equals

func (c *ConfigEntry) Equals(configEntry *ConfigEntry) bool

type DefinePropertiesAction

type DefinePropertiesAction struct {
	ApplicableAction
	Properties                 map[string]PropertyValue `json:"properties"`
	ByPassFilters              []string                 `json:"byPassFilters"`
	ActivationFirmwareVersions map[string][]string      `json:"activationFirmwareVersions"`
}

type DefinePropertiesTemplateAction

type DefinePropertiesTemplateAction struct {
	ApplicableAction
	Properties                 map[string]PropertyValue `json:"properties"`
	ByPassFilters              []string                 `json:"byPassFilters"`
	ActivationFirmwareVersions map[string][]string      `json:"activationFirmwareVersions"`
}

DefinePropertiesTemplateAction ...

type PropertyValue

type PropertyValue struct {
	Value           string           `json:"value"`
	Optional        bool             `json:"optional"`
	ValidationTypes []ValidationType `json:"validationTypes"`
}

func NewPropertyValue

func NewPropertyValue(value string, optional bool, vtype ValidationType) *PropertyValue

type RuleAction

type RuleAction struct {
	ApplicableAction
	ConfigId              string        `json:"configId"`
	ConfigEntries         []ConfigEntry `json:"configEntries"`
	Active                bool          `json:"active"`
	UseAccountPercentage  bool          `json:"useAccountPercentage"`
	FirmwareCheckRequired bool          `json:"firmwareCheckRequired"`
	RebootImmediately     bool          `json:"rebootImmediately"`
	Whitelist             string        `json:"whitelist"`
	IntermediateVersion   string        `json:"intermediateVersion"`
	FirmwareVersions      []string      `json:"firmwareVersions"`
}

RuleAction ...

func NewRuleAction

func NewRuleAction() *RuleAction

type ValidationType

type ValidationType string

type Void

type Void struct{}

Jump to

Keyboard shortcuts

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