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
Index ¶
- Constants
- func CreateGenericNamedListOneDB(newList *GenericNamespacedList) error
- func DeleteOneEnvironment(id string) error
- func DeleteOneGenericNamedList(id string) error
- func DeleteOneModel(id string) error
- func GetAppSettings() (map[string]interface{}, error)
- func GetBooleanAppSetting(key string, vargs ...bool) bool
- func GetFloat64AppSetting(key string, vargs ...float64) float64
- func GetGenericNamedListSetByType(typeName string) (*util.Set, error)
- func GetIntAppSetting(key string, vargs ...int) int
- func GetStringAppSetting(key string, vargs ...string) string
- func GetTimeAppSetting(key string, vargs ...time.Time) time.Time
- func IsExistModel(id string) bool
- func IsValidIpAddress(input string) bool
- func IsValidType(stype string) bool
- func NewAppSettingInf() interface{}
- func NewEnvironmentInf() interface{}
- func NewGenericNamespacedListInf() interface{}
- func NewIpAddressGroupInf() interface{}
- func NewModelInf() interface{}
- func NewNamespacedListInf() interface{}
- func ValidateApplicationType(applicationType string) error
- func ValidateListData(typeName string, listData []string) error
- func ValidateListDataForAdmin(typeName string, listData []string) error
- type AppSetting
- type Environment
- type EnvironmentResponse
- type GenericNamespacedList
- func ConvertFromIpAddressGroup(ipAddressGroup *IpAddressGroup) *GenericNamespacedList
- func GetGenericNamedListListsByTypeDB(typeName string) ([]*GenericNamespacedList, error)
- func GetGenericNamedListListsDB() ([]*GenericNamespacedList, error)
- func GetGenericNamedListOneByType(id string, typeName string) (*GenericNamespacedList, error)
- func GetGenericNamedListOneByTypeNonCached(id string, typeName string) (*GenericNamespacedList, error)
- func GetGenericNamedListOneDB(id string) (*GenericNamespacedList, error)
- func NewEmptyGenericNamespacedList() *GenericNamespacedList
- func NewGenericNamespacedList(id string, typeName string, data []string) *GenericNamespacedList
- func NewIpList() *GenericNamespacedList
- func NewMacList() *GenericNamespacedList
- func (obj *GenericNamespacedList) Clone() (*GenericNamespacedList, error)
- func (g *GenericNamespacedList) CreateGenericNamespacedListResponse() *GenericNamespacedList
- func (g *GenericNamespacedList) CreateIpAddressGroupResponse() *IpAddressGroup
- func (g *GenericNamespacedList) IsInIpRange(ipAddressStr string) bool
- func (g *GenericNamespacedList) IsIpList() bool
- func (g *GenericNamespacedList) IsMacList() bool
- func (g *GenericNamespacedList) String() string
- func (obj *GenericNamespacedList) Validate() error
- func (obj *GenericNamespacedList) ValidateDataIntersection() error
- func (obj *GenericNamespacedList) ValidateForAdminService() error
- type GenericNamespacedListType
- type IpAddress
- type IpAddressGroup
- type MacAddress
- type Model
- type ModelResponse
- type NamespacedList
- type StringListWrapper
- type XEnvModel
Constants ¶
View Source
const ( STB = "stb" XHOME = "xhome" RDKCLOUD = "rdkcloud" SKY = "sky" ALL = "all" )
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 ( STRING = "STRING" MAC_LIST = "MAC_LIST" IP_LIST = "IP_LIST" RI_MAC_LIST = "RI_MAC_LIST" )
Variables ¶
This section is empty.
Functions ¶
func CreateGenericNamedListOneDB ¶
func CreateGenericNamedListOneDB(newList *GenericNamespacedList) error
func DeleteOneEnvironment ¶
func DeleteOneModel ¶
func GetAppSettings ¶
func GetBooleanAppSetting ¶
func GetFloat64AppSetting ¶
func GetIntAppSetting ¶
func GetStringAppSetting ¶
func IsExistModel ¶
func IsValidIpAddress ¶
func IsValidType ¶
func NewGenericNamespacedListInf ¶
func NewGenericNamespacedListInf() interface{}
NewGenericNamespacedListInf constructor
func NewIpAddressGroupInf ¶
func NewIpAddressGroupInf() interface{}
NewIpAddressGroupInf constructor
func NewNamespacedListInf ¶
func NewNamespacedListInf() interface{}
NewGenericNamespacedListInf constructor
func ValidateApplicationType ¶
func ValidateListData ¶
Types ¶
type AppSetting ¶
type AppSetting struct {
ID string `json:"id"`
Updated int64 `json:"updated"`
Value interface{} `json:"value"`
}
AppSettings table object
func SetAppSetting ¶
func SetAppSetting(key string, value interface{}) (*AppSetting, error)
func (*AppSetting) Clone ¶
func (obj *AppSetting) Clone() (*AppSetting, error)
type Environment ¶
type Environment struct {
ID string `json:"id"`
Updated int64 `json:"updated"`
Description string `json:"description"`
}
Environment table object
func GetAllEnvironmentList ¶
func GetAllEnvironmentList() []*Environment
func GetOneEnvironment ¶
func GetOneEnvironment(id string) *Environment
func NewEnvironment ¶
func NewEnvironment(id string, description string) *Environment
NewEnvironment ...
func SetOneEnvironment ¶
func SetOneEnvironment(env *Environment) (*Environment, error)
func (*Environment) Clone ¶
func (obj *Environment) Clone() (*Environment, error)
func (*Environment) CreateEnvironmentResponse ¶
func (e *Environment) CreateEnvironmentResponse() *EnvironmentResponse
func (*Environment) Validate ¶
func (obj *Environment) Validate() error
type EnvironmentResponse ¶
type GenericNamespacedList ¶
type GenericNamespacedList struct {
ID string `json:"id"`
Updated int64 `json:"updated,omitempty"`
Data []string `json:"data"`
TypeName string `json:"typeName,omitempty"`
}
GenericNamespacedList GenericXconfNamedList table
func ConvertFromIpAddressGroup ¶
func ConvertFromIpAddressGroup(ipAddressGroup *IpAddressGroup) *GenericNamespacedList
func GetGenericNamedListListsByTypeDB ¶
func GetGenericNamedListListsByTypeDB(typeName string) ([]*GenericNamespacedList, error)
func GetGenericNamedListListsDB ¶
func GetGenericNamedListListsDB() ([]*GenericNamespacedList, error)
func GetGenericNamedListOneByType ¶
func GetGenericNamedListOneByType(id string, typeName string) (*GenericNamespacedList, error)
func GetGenericNamedListOneByTypeNonCached ¶
func GetGenericNamedListOneByTypeNonCached(id string, typeName string) (*GenericNamespacedList, error)
func GetGenericNamedListOneDB ¶
func GetGenericNamedListOneDB(id string) (*GenericNamespacedList, error)
func NewEmptyGenericNamespacedList ¶
func NewEmptyGenericNamespacedList() *GenericNamespacedList
func NewGenericNamespacedList ¶
func NewGenericNamespacedList(id string, typeName string, data []string) *GenericNamespacedList
TODO Updated is NOT included in the constructor. EVAL if it is ok
func NewIpList ¶
func NewIpList() *GenericNamespacedList
func NewMacList ¶
func NewMacList() *GenericNamespacedList
func (*GenericNamespacedList) Clone ¶
func (obj *GenericNamespacedList) Clone() (*GenericNamespacedList, error)
func (*GenericNamespacedList) CreateGenericNamespacedListResponse ¶
func (g *GenericNamespacedList) CreateGenericNamespacedListResponse() *GenericNamespacedList
func (*GenericNamespacedList) CreateIpAddressGroupResponse ¶
func (g *GenericNamespacedList) CreateIpAddressGroupResponse() *IpAddressGroup
func (*GenericNamespacedList) IsInIpRange ¶
func (g *GenericNamespacedList) IsInIpRange(ipAddressStr string) bool
func (*GenericNamespacedList) IsIpList ¶
func (g *GenericNamespacedList) IsIpList() bool
func (*GenericNamespacedList) IsMacList ¶
func (g *GenericNamespacedList) IsMacList() bool
func (*GenericNamespacedList) String ¶
func (g *GenericNamespacedList) String() string
func (*GenericNamespacedList) Validate ¶
func (obj *GenericNamespacedList) Validate() error
func (*GenericNamespacedList) ValidateDataIntersection ¶
func (obj *GenericNamespacedList) ValidateDataIntersection() error
func (*GenericNamespacedList) ValidateForAdminService ¶
func (obj *GenericNamespacedList) ValidateForAdminService() error
type IpAddress ¶
type IpAddress struct {
Address string `json:"address,omitempty" xml:"address,omitempty"`
BaseAddress interface{} `json:"baseAddress,omitempty" xml:"baseAddress,omitempty"`
// contains filtered or unexported fields
}
not getting the correct IP address. getting it from ip (net.IP) or ipNet (*net.IPNet) which are both nil, as opposed to the Address string value where there's actually data
func NewIpAddress ¶
func (IpAddress) GetAddress ¶
func (IpAddress) IsCidrBlock ¶
type IpAddressGroup ¶
type IpAddressGroup struct {
Id string `json:"id" xml:"id"`
Name string `json:"name" xml:"name"`
IpAddresses []IpAddress `json:"-" xml:"-"`
RawIpAddresses []string `json:"ipAddresses" xml:"ipAddresses"` // custom unmarshal for IpAddresses
}
IpAddressGroup IpAddressGroupExtended table
func ConvertToIpAddressGroup ¶
func ConvertToIpAddressGroup(genericIpList *GenericNamespacedList) *IpAddressGroup
func NewEmptyIpAddressGroup ¶
func NewEmptyIpAddressGroup() *IpAddressGroup
func NewIpAddressGroup ¶
func NewIpAddressGroup(input *IpAddressGroup) *IpAddressGroup
func NewIpAddressGroupWithAddrStrings ¶
func NewIpAddressGroupWithAddrStrings(sid string, sname string, addrs []string) *IpAddressGroup
func (*IpAddressGroup) Clone ¶
func (obj *IpAddressGroup) Clone() (*IpAddressGroup, error)
func (*IpAddressGroup) IsInRange ¶
func (g *IpAddressGroup) IsInRange(itfs ...interface{}) bool
func (*IpAddressGroup) SetIpAddresses ¶
func (g *IpAddressGroup) SetIpAddresses(addrs []string)
func (*IpAddressGroup) UnmarshalJSON ¶
func (g *IpAddressGroup) UnmarshalJSON(bytes []byte) error
type MacAddress ¶
type MacAddress struct {
// contains filtered or unexported fields
}
func NewMacAddress ¶
func NewMacAddress(s string) (*MacAddress, error)
func (*MacAddress) String ¶
func (a *MacAddress) String() string
type Model ¶
type Model struct {
ID string `json:"id"`
Updated int64 `json:"updated"`
Description string `json:"description"`
}
Model table object
func GetAllModelList ¶
func GetAllModelList() []*Model
func GetOneModel ¶
func SetOneModel ¶
func (*Model) CreateModelResponse ¶
func (m *Model) CreateModelResponse() *ModelResponse
type ModelResponse ¶
type NamespacedList ¶
type NamespacedList struct {
ID string `json:"id"`
Updated int64 `json:"updated"`
Data []string `json:"data"`
TypeName string `json:"typeName"`
}
NamespacedList XconfNamedList table
func (*NamespacedList) Clone ¶
func (obj *NamespacedList) Clone() (*NamespacedList, error)
type StringListWrapper ¶
type StringListWrapper struct {
List []string `json:"list"`
}
StringListWrapper ...
func NewStringListWrapper ¶
func NewStringListWrapper(list []string) *StringListWrapper
Source Files
¶
Click to show internal directories.
Click to hide internal directories.