Documentation
¶
Index ¶
- func Merge(json string, values []MergeValues) (string, error)
- func SetConfig[T ConfigData](ctx context.Context, c dahuarpc.Conn, config Config[T]) error
- func SetConfigArray[T ConfigData](ctx context.Context, c dahuarpc.Conn, config ConfigArray[T]) error
- type Config
- type ConfigArray
- type ConfigData
- type ConfigTable
- type MergeValues
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Merge ¶
func Merge(json string, values []MergeValues) (string, error)
Merge merges values into the json. Values are only merged if the path already exists in the original json.
func SetConfigArray ¶
func SetConfigArray[T ConfigData](ctx context.Context, c dahuarpc.Conn, config ConfigArray[T]) error
Types ¶
type Config ¶
type Config[T ConfigData] struct { Tables ConfigTable[T] // contains filtered or unexported fields }
type ConfigArray ¶
type ConfigArray[T ConfigData] struct { Tables []ConfigTable[T] // contains filtered or unexported fields }
func GetConfigArray ¶
func GetConfigArray[T ConfigData](ctx context.Context, c dahuarpc.Conn, name string) (ConfigArray[T], error)
type ConfigData ¶
type ConfigTable ¶
type ConfigTable[T ConfigData] struct { Data T // contains filtered or unexported fields }
func (*ConfigTable[T]) MarshalJSON ¶
func (ct *ConfigTable[T]) MarshalJSON() ([]byte, error)
func (*ConfigTable[T]) UnmarshalJSON ¶
func (ct *ConfigTable[T]) UnmarshalJSON(data []byte) error
type MergeValues ¶
Click to show internal directories.
Click to hide internal directories.