package config type ApiConfig struct { BaseUrl string `mapstructure:"baseUrl"` } type RecordConfig struct { Storage StorageConfig `mapstructure:"storage"` Duration int `mapstructure:"duration"` } type StorageConfig struct { Type string `mapstructure:"type"` Path string `mapstructure:"path"` S3 S3Config `mapstructure:"s3"` } type S3Config struct { Region string `mapstructure:"region"` Endpoint string `mapstructure:"endpoint"` Bucket string `mapstructure:"bucket"` Prefix string `mapstructure:"prefix"` AkId string `mapstructure:"akId"` AkSec string `mapstructure:"akSec"` } type DeviceMapping struct { DeviceNo string `mapstructure:"deviceNo" json:"deviceNo"` Name string `mapstructure:"name" json:"name"` } type FileNameConfig struct { DateSeparator string `mapstructure:"dateSeparator"` TimeSplit string `mapstructure:"timeSplit"` FileExt string `mapstructure:"fileExt"` UnfinishedFileExt string `mapstructure:"unFinExt"` } type MainConfig struct { Api ApiConfig `mapstructure:"api"` Record RecordConfig `mapstructure:"record"` Devices []DeviceMapping `mapstructure:"devices"` FileName FileNameConfig `mapstructure:"fileName"` }