Documentation
¶
Index ¶
- Constants
- type NSDomain
- type NSDomainDAO
- func (this *NSDomainDAO) CountAllEnabledDomains(tx *dbs.Tx, clusterId int64, userId int64, keyword string) (int64, error)
- func (this *NSDomainDAO) CreateDomain(tx *dbs.Tx, clusterId int64, userId int64, name string) (int64, error)
- func (this *NSDomainDAO) DisableNSDomain(tx *dbs.Tx, domainId int64) error
- func (this *NSDomainDAO) EnableNSDomain(tx *dbs.Tx, domainId int64) error
- func (this *NSDomainDAO) FindDomainIdWithName(tx *dbs.Tx, clusterId int64, name string) (int64, error)
- func (this *NSDomainDAO) FindEnabledDomainClusterId(tx *dbs.Tx, domainId int64) (int64, error)
- func (this *NSDomainDAO) FindEnabledDomainTSIG(tx *dbs.Tx, domainId int64) ([]byte, error)
- func (this *NSDomainDAO) FindEnabledNSDomain(tx *dbs.Tx, id int64) (*NSDomain, error)
- func (this *NSDomainDAO) FindNSDomainName(tx *dbs.Tx, id int64) (string, error)
- func (this *NSDomainDAO) IncreaseVersion(tx *dbs.Tx) (int64, error)
- func (this *NSDomainDAO) ListDomainsAfterVersion(tx *dbs.Tx, version int64, size int64) (result []*NSDomain, err error)
- func (this *NSDomainDAO) ListEnabledDomains(tx *dbs.Tx, clusterId int64, userId int64, keyword string, offset int64, ...) (result []*NSDomain, err error)
- func (this *NSDomainDAO) NotifyUpdate(tx *dbs.Tx, domainId int64) error
- func (this *NSDomainDAO) UpdateDomain(tx *dbs.Tx, domainId int64, clusterId int64, userId int64, isOn bool) error
- func (this *NSDomainDAO) UpdateDomainTSIG(tx *dbs.Tx, domainId int64, tsigJSON []byte) error
- type NSDomainOperator
- type NSKey
- type NSKeyDAO
- func (this *NSKeyDAO) CountEnabledKeys(tx *dbs.Tx, domainId int64, zoneId int64) (int64, error)
- func (this *NSKeyDAO) CreateKey(tx *dbs.Tx, domainId int64, zoneId int64, name string, ...) (int64, error)
- func (this *NSKeyDAO) DisableNSKey(tx *dbs.Tx, keyId int64) error
- func (this *NSKeyDAO) EnableNSKey(tx *dbs.Tx, id int64) error
- func (this *NSKeyDAO) FindEnabledNSKey(tx *dbs.Tx, id int64) (*NSKey, error)
- func (this *NSKeyDAO) FindNSKeyName(tx *dbs.Tx, id int64) (string, error)
- func (this *NSKeyDAO) IncreaseVersion(tx *dbs.Tx) (int64, error)
- func (this *NSKeyDAO) ListEnabledKeys(tx *dbs.Tx, domainId int64, zoneId int64, offset int64, size int64) (result []*NSKey, err error)
- func (this *NSKeyDAO) ListKeysAfterVersion(tx *dbs.Tx, version int64, size int64) (result []*NSKey, err error)
- func (this *NSKeyDAO) NotifyUpdate(tx *dbs.Tx, keyId int64) error
- func (this *NSKeyDAO) UpdateKey(tx *dbs.Tx, keyId int64, name string, algo dnsconfigs.KeyAlgorithmType, ...) error
- type NSKeyOperator
- type NSQuestionOption
- type NSQuestionOptionDAO
- func (this *NSQuestionOptionDAO) CreateOption(tx *dbs.Tx, name string, values maps.Map) (int64, error)
- func (this *NSQuestionOptionDAO) DeleteOption(tx *dbs.Tx, optionId int64) error
- func (this *NSQuestionOptionDAO) FindNSQuestionOptionName(tx *dbs.Tx, id uint64) (string, error)
- func (this *NSQuestionOptionDAO) FindOption(tx *dbs.Tx, optionId int64) (*NSQuestionOption, error)
- type NSQuestionOptionOperator
- type NSRecord
- type NSRecordDAO
- func (this *NSRecordDAO) CountAllEnabledDomainRecords(tx *dbs.Tx, domainId int64, dnsType dnsconfigs.RecordType, keyword string, ...) (int64, error)
- func (this *NSRecordDAO) CountAllEnabledRecords(tx *dbs.Tx) (int64, error)
- func (this *NSRecordDAO) CreateRecord(tx *dbs.Tx, domainId int64, description string, name string, ...) (int64, error)
- func (this *NSRecordDAO) DisableNSRecord(tx *dbs.Tx, recordId int64) error
- func (this *NSRecordDAO) EnableNSRecord(tx *dbs.Tx, recordId int64) error
- func (this *NSRecordDAO) FindEnabledNSRecord(tx *dbs.Tx, id int64) (*NSRecord, error)
- func (this *NSRecordDAO) FindEnabledRecordWithName(tx *dbs.Tx, domainId int64, recordName string, ...) (*NSRecord, error)
- func (this *NSRecordDAO) FindNSRecordName(tx *dbs.Tx, id int64) (string, error)
- func (this *NSRecordDAO) IncreaseVersion(tx *dbs.Tx) (int64, error)
- func (this *NSRecordDAO) ListEnabledRecords(tx *dbs.Tx, domainId int64, dnsType dnsconfigs.RecordType, keyword string, ...) (result []*NSRecord, err error)
- func (this *NSRecordDAO) ListRecordsAfterVersion(tx *dbs.Tx, version int64, size int64) (result []*NSRecord, err error)
- func (this *NSRecordDAO) NotifyUpdate(tx *dbs.Tx, recordId int64) error
- func (this *NSRecordDAO) UpdateRecord(tx *dbs.Tx, recordId int64, description string, name string, ...) error
- type NSRecordHourlyStat
- type NSRecordHourlyStatDAO
- func (this *NSRecordHourlyStatDAO) Clean(tx *dbs.Tx, days int) error
- func (this *NSRecordHourlyStatDAO) FindDailyStats(tx *dbs.Tx, dayFrom string, dayTo string) (result []*NSRecordHourlyStat, err error)
- func (this *NSRecordHourlyStatDAO) FindHourlyStats(tx *dbs.Tx, hourFrom string, hourTo string) (result []*NSRecordHourlyStat, err error)
- func (this *NSRecordHourlyStatDAO) IncreaseHourlyStat(tx *dbs.Tx, clusterId int64, nodeId int64, hour string, domainId int64, ...) error
- func (this *NSRecordHourlyStatDAO) ListTopDomains(tx *dbs.Tx, hourFrom string, hourTo string, size int64) (result []*NSRecordHourlyStat, err error)
- func (this *NSRecordHourlyStatDAO) ListTopNodes(tx *dbs.Tx, hourFrom string, hourTo string, size int64) (result []*NSRecordHourlyStat, err error)
- type NSRecordHourlyStatOperator
- type NSRecordOperator
- type NSRoute
- type NSRouteDAO
- func (this *NSRouteDAO) CreateRoute(tx *dbs.Tx, clusterId int64, domainId int64, userId int64, name string, ...) (int64, error)
- func (this *NSRouteDAO) DisableNSRoute(tx *dbs.Tx, routeId int64) error
- func (this *NSRouteDAO) EnableNSRoute(tx *dbs.Tx, routeId int64) error
- func (this *NSRouteDAO) FindAllEnabledRoutes(tx *dbs.Tx, clusterId int64, domainId int64, userId int64) (result []*NSRoute, err error)
- func (this *NSRouteDAO) FindEnabledNSRoute(tx *dbs.Tx, id int64) (*NSRoute, error)
- func (this *NSRouteDAO) FindEnabledRouteWithCode(tx *dbs.Tx, code string) (*NSRoute, error)
- func (this *NSRouteDAO) FindNSRouteName(tx *dbs.Tx, id int64) (string, error)
- func (this *NSRouteDAO) IncreaseVersion(tx *dbs.Tx) (int64, error)
- func (this *NSRouteDAO) ListRoutesAfterVersion(tx *dbs.Tx, version int64, size int64) (result []*NSRoute, err error)
- func (this *NSRouteDAO) NotifyUpdate(tx *dbs.Tx) error
- func (this *NSRouteDAO) UpdateRoute(tx *dbs.Tx, routeId int64, name string, rangesJSON []byte) error
- func (this *NSRouteDAO) UpdateRouteOrders(tx *dbs.Tx, routeIds []int64) error
- type NSRouteOperator
- type NSZone
- type NSZoneDAO
- type NSZoneOperator
Constants ¶
const ( NSDomainStateEnabled = 1 // 已启用 NSDomainStateDisabled = 0 // 已禁用 )
const ( NSKeyStateEnabled = 1 // 已启用 NSKeyStateDisabled = 0 // 已禁用 )
const ( NSRecordStateEnabled = 1 // 已启用 NSRecordStateDisabled = 0 // 已禁用 )
const ( NSRouteStateEnabled = 1 // 已启用 NSRouteStateDisabled = 0 // 已禁用 )
const ( NSZoneStateEnabled = 1 // 已启用 NSZoneStateDisabled = 0 // 已禁用 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NSDomain ¶
type NSDomain struct { Id uint32 `field:"id"` // ID ClusterId uint32 `field:"clusterId"` // 集群ID UserId uint32 `field:"userId"` // 用户ID IsOn bool `field:"isOn"` // 是否启用 Name string `field:"name"` // 域名 CreatedAt uint64 `field:"createdAt"` // 创建时间 Version uint64 `field:"version"` // 版本 State uint8 `field:"state"` // 状态 Tsig dbs.JSON `field:"tsig"` // TSIG配置 }
NSDomain DNS域名
type NSDomainDAO ¶
func NewNSDomainDAO ¶
func NewNSDomainDAO() *NSDomainDAO
func (*NSDomainDAO) CountAllEnabledDomains ¶
func (this *NSDomainDAO) CountAllEnabledDomains(tx *dbs.Tx, clusterId int64, userId int64, keyword string) (int64, error)
CountAllEnabledDomains 计算域名数量
func (*NSDomainDAO) CreateDomain ¶
func (this *NSDomainDAO) CreateDomain(tx *dbs.Tx, clusterId int64, userId int64, name string) (int64, error)
CreateDomain 创建域名
func (*NSDomainDAO) DisableNSDomain ¶
func (this *NSDomainDAO) DisableNSDomain(tx *dbs.Tx, domainId int64) error
DisableNSDomain 禁用条目
func (*NSDomainDAO) EnableNSDomain ¶
func (this *NSDomainDAO) EnableNSDomain(tx *dbs.Tx, domainId int64) error
EnableNSDomain 启用条目
func (*NSDomainDAO) FindDomainIdWithName ¶
func (this *NSDomainDAO) FindDomainIdWithName(tx *dbs.Tx, clusterId int64, name string) (int64, error)
FindDomainIdWithName 根据名称查找域名
func (*NSDomainDAO) FindEnabledDomainClusterId ¶
FindEnabledDomainClusterId 获取域名的集群ID
func (*NSDomainDAO) FindEnabledDomainTSIG ¶
FindEnabledDomainTSIG 获取TSIG配置
func (*NSDomainDAO) FindEnabledNSDomain ¶
FindEnabledNSDomain 查找启用中的条目
func (*NSDomainDAO) FindNSDomainName ¶
FindNSDomainName 根据主键查找名称
func (*NSDomainDAO) IncreaseVersion ¶
func (this *NSDomainDAO) IncreaseVersion(tx *dbs.Tx) (int64, error)
IncreaseVersion 增加版本
func (*NSDomainDAO) ListDomainsAfterVersion ¶
func (this *NSDomainDAO) ListDomainsAfterVersion(tx *dbs.Tx, version int64, size int64) (result []*NSDomain, err error)
ListDomainsAfterVersion 列出某个版本后的域名
func (*NSDomainDAO) ListEnabledDomains ¶
func (this *NSDomainDAO) ListEnabledDomains(tx *dbs.Tx, clusterId int64, userId int64, keyword string, offset int64, size int64) (result []*NSDomain, err error)
ListEnabledDomains 列出单页域名
func (*NSDomainDAO) NotifyUpdate ¶
func (this *NSDomainDAO) NotifyUpdate(tx *dbs.Tx, domainId int64) error
NotifyUpdate 通知更改
func (*NSDomainDAO) UpdateDomain ¶
func (this *NSDomainDAO) UpdateDomain(tx *dbs.Tx, domainId int64, clusterId int64, userId int64, isOn bool) error
UpdateDomain 修改域名
func (*NSDomainDAO) UpdateDomainTSIG ¶
UpdateDomainTSIG 修改TSIG配置
type NSDomainOperator ¶
type NSDomainOperator struct { Id interface{} // ID ClusterId interface{} // 集群ID UserId interface{} // 用户ID IsOn interface{} // 是否启用 Name interface{} // 域名 CreatedAt interface{} // 创建时间 Version interface{} // 版本 State interface{} // 状态 Tsig interface{} // TSIG配置 }
func NewNSDomainOperator ¶
func NewNSDomainOperator() *NSDomainOperator
type NSKey ¶
type NSKey struct { Id uint64 `field:"id"` // ID IsOn bool `field:"isOn"` // 状态 Name string `field:"name"` // 名称 DomainId uint64 `field:"domainId"` // 域名ID ZoneId uint64 `field:"zoneId"` // 子域ID Algo string `field:"algo"` // 算法 Secret string `field:"secret"` // 密码 SecretType string `field:"secretType"` // 密码类型 Version uint64 `field:"version"` // 版本号 State uint8 `field:"state"` // 状态 }
NSKey 密钥管理
type NSKeyDAO ¶
func NewNSKeyDAO ¶
func NewNSKeyDAO() *NSKeyDAO
func (*NSKeyDAO) CountEnabledKeys ¶
CountEnabledKeys 计算Key的数量
func (*NSKeyDAO) CreateKey ¶
func (this *NSKeyDAO) CreateKey(tx *dbs.Tx, domainId int64, zoneId int64, name string, algo dnsconfigs.KeyAlgorithmType, secret string, secretType string) (int64, error)
CreateKey 创建Key
func (*NSKeyDAO) DisableNSKey ¶
DisableNSKey 禁用条目
func (*NSKeyDAO) EnableNSKey ¶
EnableNSKey 启用条目
func (*NSKeyDAO) FindEnabledNSKey ¶
FindEnabledNSKey 查找启用中的条目
func (*NSKeyDAO) FindNSKeyName ¶
FindNSKeyName 根据主键查找名称
func (*NSKeyDAO) IncreaseVersion ¶
IncreaseVersion 增加版本
func (*NSKeyDAO) ListEnabledKeys ¶
func (this *NSKeyDAO) ListEnabledKeys(tx *dbs.Tx, domainId int64, zoneId int64, offset int64, size int64) (result []*NSKey, err error)
ListEnabledKeys 列出单页Key
func (*NSKeyDAO) ListKeysAfterVersion ¶
func (this *NSKeyDAO) ListKeysAfterVersion(tx *dbs.Tx, version int64, size int64) (result []*NSKey, err error)
ListKeysAfterVersion 列出某个版本后的密钥
func (*NSKeyDAO) NotifyUpdate ¶
NotifyUpdate 通知更新
type NSKeyOperator ¶
type NSKeyOperator struct { Id interface{} // ID IsOn interface{} // 状态 Name interface{} // 名称 DomainId interface{} // 域名ID ZoneId interface{} // 子域ID Algo interface{} // 算法 Secret interface{} // 密码 SecretType interface{} // 密码类型 Version interface{} // 版本号 State interface{} // 状态 }
func NewNSKeyOperator ¶
func NewNSKeyOperator() *NSKeyOperator
type NSQuestionOption ¶
type NSQuestionOption struct { Id uint64 `field:"id"` // ID Name string `field:"name"` // 选项名 Values dbs.JSON `field:"values"` // 选项值 CreatedAt uint64 `field:"createdAt"` // 创建时间 }
NSQuestionOption DNS请求选项
type NSQuestionOptionDAO ¶
func NewNSQuestionOptionDAO ¶
func NewNSQuestionOptionDAO() *NSQuestionOptionDAO
func (*NSQuestionOptionDAO) CreateOption ¶
func (this *NSQuestionOptionDAO) CreateOption(tx *dbs.Tx, name string, values maps.Map) (int64, error)
CreateOption 创建选项
func (*NSQuestionOptionDAO) DeleteOption ¶
func (this *NSQuestionOptionDAO) DeleteOption(tx *dbs.Tx, optionId int64) error
DeleteOption 删除选项
func (*NSQuestionOptionDAO) FindNSQuestionOptionName ¶
FindNSQuestionOptionName 根据主键查找名称
func (*NSQuestionOptionDAO) FindOption ¶
func (this *NSQuestionOptionDAO) FindOption(tx *dbs.Tx, optionId int64) (*NSQuestionOption, error)
FindOption 读取选项
type NSQuestionOptionOperator ¶
type NSQuestionOptionOperator struct { Id interface{} // ID Name interface{} // 选项名 Values interface{} // 选项值 CreatedAt interface{} // 创建时间 }
func NewNSQuestionOptionOperator ¶
func NewNSQuestionOptionOperator() *NSQuestionOptionOperator
type NSRecord ¶
type NSRecord struct { Id uint64 `field:"id"` // ID DomainId uint32 `field:"domainId"` // 域名ID IsOn bool `field:"isOn"` // 是否启用 Description string `field:"description"` // 备注 Name string `field:"name"` // 记录名 Type string `field:"type"` // 类型 Value string `field:"value"` // 值 Ttl uint32 `field:"ttl"` // TTL(秒) Weight uint32 `field:"weight"` // 权重 RouteIds dbs.JSON `field:"routeIds"` // 线路 CreatedAt uint64 `field:"createdAt"` // 创建时间 Version uint64 `field:"version"` // State uint8 `field:"state"` // 状态 }
NSRecord DNS记录
func (*NSRecord) DecodeRouteIds ¶
type NSRecordDAO ¶
func NewNSRecordDAO ¶
func NewNSRecordDAO() *NSRecordDAO
func (*NSRecordDAO) CountAllEnabledDomainRecords ¶
func (this *NSRecordDAO) CountAllEnabledDomainRecords(tx *dbs.Tx, domainId int64, dnsType dnsconfigs.RecordType, keyword string, routeCode string) (int64, error)
CountAllEnabledDomainRecords 计算域名中记录数量
func (*NSRecordDAO) CountAllEnabledRecords ¶
func (this *NSRecordDAO) CountAllEnabledRecords(tx *dbs.Tx) (int64, error)
CountAllEnabledRecords 计算所有记录数量
func (*NSRecordDAO) CreateRecord ¶
func (this *NSRecordDAO) CreateRecord(tx *dbs.Tx, domainId int64, description string, name string, dnsType dnsconfigs.RecordType, value string, ttl int32, routeIds []string) (int64, error)
CreateRecord 创建记录
func (*NSRecordDAO) DisableNSRecord ¶
func (this *NSRecordDAO) DisableNSRecord(tx *dbs.Tx, recordId int64) error
DisableNSRecord 禁用条目
func (*NSRecordDAO) EnableNSRecord ¶
func (this *NSRecordDAO) EnableNSRecord(tx *dbs.Tx, recordId int64) error
EnableNSRecord 启用条目
func (*NSRecordDAO) FindEnabledNSRecord ¶
FindEnabledNSRecord 查找启用中的条目
func (*NSRecordDAO) FindEnabledRecordWithName ¶
func (this *NSRecordDAO) FindEnabledRecordWithName(tx *dbs.Tx, domainId int64, recordName string, recordType dnsconfigs.RecordType) (*NSRecord, error)
FindEnabledRecordWithName 查询单条记录
func (*NSRecordDAO) FindNSRecordName ¶
FindNSRecordName 根据主键查找名称
func (*NSRecordDAO) IncreaseVersion ¶
func (this *NSRecordDAO) IncreaseVersion(tx *dbs.Tx) (int64, error)
IncreaseVersion 增加版本
func (*NSRecordDAO) ListEnabledRecords ¶
func (this *NSRecordDAO) ListEnabledRecords(tx *dbs.Tx, domainId int64, dnsType dnsconfigs.RecordType, keyword string, routeCode string, offset int64, size int64) (result []*NSRecord, err error)
ListEnabledRecords 列出单页记录
func (*NSRecordDAO) ListRecordsAfterVersion ¶
func (this *NSRecordDAO) ListRecordsAfterVersion(tx *dbs.Tx, version int64, size int64) (result []*NSRecord, err error)
ListRecordsAfterVersion 列出某个版本后的记录
func (*NSRecordDAO) NotifyUpdate ¶
func (this *NSRecordDAO) NotifyUpdate(tx *dbs.Tx, recordId int64) error
NotifyUpdate 通知更新
func (*NSRecordDAO) UpdateRecord ¶
func (this *NSRecordDAO) UpdateRecord(tx *dbs.Tx, recordId int64, description string, name string, dnsType dnsconfigs.RecordType, value string, ttl int32, routeIds []string, isOn bool) error
UpdateRecord 修改记录
type NSRecordHourlyStat ¶
type NSRecordHourlyStat struct { Id uint64 `field:"id"` // ID ClusterId uint32 `field:"clusterId"` // 集群ID NodeId uint32 `field:"nodeId"` // 节点ID DomainId uint32 `field:"domainId"` // 域名ID RecordId uint64 `field:"recordId"` // 记录ID Day string `field:"day"` // YYYYMMDD Hour string `field:"hour"` // YYYYMMDDHH CountRequests uint32 `field:"countRequests"` // 请求数 Bytes uint64 `field:"bytes"` // 流量 }
NSRecordHourlyStat NS记录统计
type NSRecordHourlyStatDAO ¶
func NewNSRecordHourlyStatDAO ¶
func NewNSRecordHourlyStatDAO() *NSRecordHourlyStatDAO
func (*NSRecordHourlyStatDAO) Clean ¶
func (this *NSRecordHourlyStatDAO) Clean(tx *dbs.Tx, days int) error
Clean 清理历史数据
func (*NSRecordHourlyStatDAO) FindDailyStats ¶
func (this *NSRecordHourlyStatDAO) FindDailyStats(tx *dbs.Tx, dayFrom string, dayTo string) (result []*NSRecordHourlyStat, err error)
FindDailyStats 按天统计
func (*NSRecordHourlyStatDAO) FindHourlyStats ¶
func (this *NSRecordHourlyStatDAO) FindHourlyStats(tx *dbs.Tx, hourFrom string, hourTo string) (result []*NSRecordHourlyStat, err error)
FindHourlyStats 按小时统计
func (*NSRecordHourlyStatDAO) IncreaseHourlyStat ¶
func (this *NSRecordHourlyStatDAO) IncreaseHourlyStat(tx *dbs.Tx, clusterId int64, nodeId int64, hour string, domainId int64, recordId int64, countRequests int64, bytes int64) error
IncreaseHourlyStat 增加统计数据
func (*NSRecordHourlyStatDAO) ListTopDomains ¶
func (this *NSRecordHourlyStatDAO) ListTopDomains(tx *dbs.Tx, hourFrom string, hourTo string, size int64) (result []*NSRecordHourlyStat, err error)
ListTopDomains 域名排行
func (*NSRecordHourlyStatDAO) ListTopNodes ¶
func (this *NSRecordHourlyStatDAO) ListTopNodes(tx *dbs.Tx, hourFrom string, hourTo string, size int64) (result []*NSRecordHourlyStat, err error)
ListTopNodes 节点排行
type NSRecordHourlyStatOperator ¶
type NSRecordHourlyStatOperator struct { Id interface{} // ID ClusterId interface{} // 集群ID NodeId interface{} // 节点ID DomainId interface{} // 域名ID RecordId interface{} // 记录ID Day interface{} // YYYYMMDD Hour interface{} // YYYYMMDDHH CountRequests interface{} // 请求数 Bytes interface{} // 流量 }
func NewNSRecordHourlyStatOperator ¶
func NewNSRecordHourlyStatOperator() *NSRecordHourlyStatOperator
type NSRecordOperator ¶
type NSRecordOperator struct { Id interface{} // ID DomainId interface{} // 域名ID IsOn interface{} // 是否启用 Description interface{} // 备注 Name interface{} // 记录名 Type interface{} // 类型 Value interface{} // 值 Ttl interface{} // TTL(秒) Weight interface{} // 权重 RouteIds interface{} // 线路 CreatedAt interface{} // 创建时间 Version interface{} // State interface{} // 状态 }
func NewNSRecordOperator ¶
func NewNSRecordOperator() *NSRecordOperator
type NSRoute ¶
type NSRoute struct { Id uint32 `field:"id"` // ID IsOn bool `field:"isOn"` // 是否启用 ClusterId uint32 `field:"clusterId"` // 集群ID DomainId uint32 `field:"domainId"` // 域名ID UserId uint32 `field:"userId"` // 用户ID Name string `field:"name"` // 名称 Ranges dbs.JSON `field:"ranges"` // 范围 Order uint32 `field:"order"` // 排序 Version uint64 `field:"version"` // 版本号 Code string `field:"code"` // 代号 State uint8 `field:"state"` // 状态 }
NSRoute DNS线路
type NSRouteDAO ¶
func NewNSRouteDAO ¶
func NewNSRouteDAO() *NSRouteDAO
func (*NSRouteDAO) CreateRoute ¶
func (this *NSRouteDAO) CreateRoute(tx *dbs.Tx, clusterId int64, domainId int64, userId int64, name string, rangesJSON []byte) (int64, error)
CreateRoute 创建线路
func (*NSRouteDAO) DisableNSRoute ¶
func (this *NSRouteDAO) DisableNSRoute(tx *dbs.Tx, routeId int64) error
DisableNSRoute 禁用条目
func (*NSRouteDAO) EnableNSRoute ¶
func (this *NSRouteDAO) EnableNSRoute(tx *dbs.Tx, routeId int64) error
EnableNSRoute 启用条目
func (*NSRouteDAO) FindAllEnabledRoutes ¶
func (this *NSRouteDAO) FindAllEnabledRoutes(tx *dbs.Tx, clusterId int64, domainId int64, userId int64) (result []*NSRoute, err error)
FindAllEnabledRoutes 列出所有线路
func (*NSRouteDAO) FindEnabledNSRoute ¶
FindEnabledNSRoute 查找启用中的条目
func (*NSRouteDAO) FindEnabledRouteWithCode ¶
FindEnabledRouteWithCode 根据代号获取线路信息
func (*NSRouteDAO) FindNSRouteName ¶
FindNSRouteName 根据主键查找名称
func (*NSRouteDAO) IncreaseVersion ¶
func (this *NSRouteDAO) IncreaseVersion(tx *dbs.Tx) (int64, error)
IncreaseVersion 增加版本
func (*NSRouteDAO) ListRoutesAfterVersion ¶
func (this *NSRouteDAO) ListRoutesAfterVersion(tx *dbs.Tx, version int64, size int64) (result []*NSRoute, err error)
ListRoutesAfterVersion 列出某个版本后的域名
func (*NSRouteDAO) NotifyUpdate ¶
func (this *NSRouteDAO) NotifyUpdate(tx *dbs.Tx) error
NotifyUpdate 通知更新
func (*NSRouteDAO) UpdateRoute ¶
func (this *NSRouteDAO) UpdateRoute(tx *dbs.Tx, routeId int64, name string, rangesJSON []byte) error
UpdateRoute 修改线路
func (*NSRouteDAO) UpdateRouteOrders ¶
func (this *NSRouteDAO) UpdateRouteOrders(tx *dbs.Tx, routeIds []int64) error
UpdateRouteOrders 修改线路排序
type NSRouteOperator ¶
type NSRouteOperator struct { Id interface{} // ID IsOn interface{} // 是否启用 ClusterId interface{} // 集群ID DomainId interface{} // 域名ID UserId interface{} // 用户ID Name interface{} // 名称 Ranges interface{} // 范围 Order interface{} // 排序 Version interface{} // 版本号 Code interface{} // 代号 State interface{} // 状态 }
func NewNSRouteOperator ¶
func NewNSRouteOperator() *NSRouteOperator
type NSZone ¶
type NSZone struct { Id uint64 `field:"id"` // ID DomainId uint64 `field:"domainId"` // 域名ID IsOn bool `field:"isOn"` // 是否启用 Order uint32 `field:"order"` // 排序 Version uint64 `field:"version"` // 版本 Tsig dbs.JSON `field:"tsig"` // TSIG配置 State uint8 `field:"state"` // 状态 }
NSZone 域名子域
type NSZoneDAO ¶
func NewNSZoneDAO ¶
func NewNSZoneDAO() *NSZoneDAO
func (*NSZoneDAO) DisableNSZone ¶
DisableNSZone 禁用条目
func (*NSZoneDAO) EnableNSZone ¶
EnableNSZone 启用条目
type NSZoneOperator ¶
type NSZoneOperator struct { Id interface{} // ID DomainId interface{} // 域名ID IsOn interface{} // 是否启用 Order interface{} // 排序 Version interface{} // 版本 Tsig interface{} // TSIG配置 State interface{} // 状态 }
func NewNSZoneOperator ¶
func NewNSZoneOperator() *NSZoneOperator
Source Files
¶
- ns_domain_dao.go
- ns_domain_model.go
- ns_domain_model_ext.go
- ns_key_dao.go
- ns_key_model.go
- ns_key_model_ext.go
- ns_question_option_dao.go
- ns_question_option_model.go
- ns_question_option_model_ext.go
- ns_record_dao.go
- ns_record_hourly_stat_dao.go
- ns_record_hourly_stat_model.go
- ns_record_hourly_stat_model_ext.go
- ns_record_model.go
- ns_record_model_ext.go
- ns_route_dao.go
- ns_route_model.go
- ns_route_model_ext.go
- ns_zone_dao.go
- ns_zone_model.go
- ns_zone_model_ext.go