nameservers

package
v1.3.8 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NSDomainStateEnabled  = 1 // 已启用
	NSDomainStateDisabled = 0 // 已禁用
)
View Source
const (
	NSRecordStateEnabled  = 1 // 已启用
	NSRecordStateDisabled = 0 // 已禁用
)
View Source
const (
	NSRouteCategoryStateEnabled  = 1 // 已启用
	NSRouteCategoryStateDisabled = 0 // 已禁用
)
View Source
const (
	NSRouteStateEnabled  = 1 // 已启用
	NSRouteStateDisabled = 0 // 已禁用
)

Variables

This section is empty.

Functions

This section is empty.

Types

type NSDomain

type NSDomain struct {
	Id                 uint64   `field:"id"`                 // ID
	ClusterId          uint32   `field:"clusterId"`          // 集群ID
	UserId             uint32   `field:"userId"`             // 用户ID
	IsOn               bool     `field:"isOn"`               // 是否启用
	Name               string   `field:"name"`               // 域名
	GroupIds           dbs.JSON `field:"groupIds"`           // 分组ID
	Tsig               dbs.JSON `field:"tsig"`               // TSIG配置
	VerifyTXT          string   `field:"verifyTXT"`          // 验证用的TXT
	VerifyExpiresAt    uint64   `field:"verifyExpiresAt"`    // 验证TXT过期时间
	RecordsHealthCheck dbs.JSON `field:"recordsHealthCheck"` // 记录健康检查设置
	CreatedAt          uint64   `field:"createdAt"`          // 创建时间
	Version            uint64   `field:"version"`            // 版本号
	Status             string   `field:"status"`             // 状态:none|verified
	State              uint8    `field:"state"`              // 状态
}

NSDomain DNS域名

func (*NSDomain) DecodeGroupIds added in v0.5.0

func (this *NSDomain) DecodeGroupIds() []int64

type NSDomainDAO

type NSDomainDAO dbs.DAO
var SharedNSDomainDAO *NSDomainDAO

func NewNSDomainDAO

func NewNSDomainDAO() *NSDomainDAO

type NSDomainGroup added in v0.5.0

type NSDomainGroup struct {
	Id     uint64 `field:"id"`     // ID
	UserId uint64 `field:"userId"` // 用户ID
	Name   string `field:"name"`   // 分组名称
	IsOn   bool   `field:"isOn"`   // 是否启用
	Order  uint32 `field:"order"`  // 排序
	State  uint8  `field:"state"`  // 状态
}

NSDomainGroup 域名分组

type NSDomainGroupOperator added in v0.5.0

type NSDomainGroupOperator struct {
	Id     interface{} // ID
	UserId interface{} // 用户ID
	Name   interface{} // 分组名称
	IsOn   interface{} // 是否启用
	Order  interface{} // 排序
	State  interface{} // 状态
}

func NewNSDomainGroupOperator added in v0.5.0

func NewNSDomainGroupOperator() *NSDomainGroupOperator

type NSDomainOperator

type NSDomainOperator struct {
	Id                 any // ID
	ClusterId          any // 集群ID
	UserId             any // 用户ID
	IsOn               any // 是否启用
	Name               any // 域名
	GroupIds           any // 分组ID
	Tsig               any // TSIG配置
	VerifyTXT          any // 验证用的TXT
	VerifyExpiresAt    any // 验证TXT过期时间
	RecordsHealthCheck any // 记录健康检查设置
	CreatedAt          any // 创建时间
	Version            any // 版本号
	Status             any // 状态:none|verified
	State              any // 状态
}

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 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 NSPlan added in v0.5.3

type NSPlan struct {
	Id           uint32   `field:"id"`           // ID
	Name         string   `field:"name"`         // 套餐名称
	IsOn         bool     `field:"isOn"`         // 是否启用
	MonthlyPrice float64  `field:"monthlyPrice"` // 月价格
	YearlyPrice  float64  `field:"yearlyPrice"`  // 年价格
	Order        uint32   `field:"order"`        // 排序
	Config       dbs.JSON `field:"config"`       // 配置
	State        uint8    `field:"state"`        // 状态
}

NSPlan NS套餐

type NSPlanOperator added in v0.5.3

type NSPlanOperator struct {
	Id           any // ID
	Name         any // 套餐名称
	IsOn         any // 是否启用
	MonthlyPrice any // 月价格
	YearlyPrice  any // 年价格
	Order        any // 排序
	Config       any // 配置
	State        any // 状态
}

func NewNSPlanOperator added in v0.5.3

func NewNSPlanOperator() *NSPlanOperator

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 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"`       // 值
	MxPriority  uint32   `field:"mxPriority"`  // MX优先级
	SrvPriority uint32   `field:"srvPriority"` // SRV优先级
	SrvWeight   uint32   `field:"srvWeight"`   // SRV权重
	SrvPort     uint32   `field:"srvPort"`     // SRV端口
	CaaFlag     uint8    `field:"caaFlag"`     // CAA Flag
	CaaTag      string   `field:"caaTag"`      // CAA TAG
	Ttl         uint32   `field:"ttl"`         // TTL(秒)
	Weight      uint32   `field:"weight"`      // 权重
	RouteIds    dbs.JSON `field:"routeIds"`    // 线路
	HealthCheck dbs.JSON `field:"healthCheck"` // 健康检查配置
	CountUp     uint32   `field:"countUp"`     // 连续上线次数
	CountDown   uint32   `field:"countDown"`   // 连续离线次数
	IsUp        bool     `field:"isUp"`        // 是否在线
	CreatedAt   uint64   `field:"createdAt"`   // 创建时间
	Version     uint64   `field:"version"`     // 版本号
	State       uint8    `field:"state"`       // 状态
}

NSRecord DNS记录

func (*NSRecord) DecodeRouteIds

func (this *NSRecord) DecodeRouteIds() []string

type NSRecordDAO

type NSRecordDAO dbs.DAO
var SharedNSRecordDAO *NSRecordDAO

func NewNSRecordDAO

func NewNSRecordDAO() *NSRecordDAO

func (*NSRecordDAO) DisableNSRecord

func (this *NSRecordDAO) DisableNSRecord(tx *dbs.Tx, id uint64) error

DisableNSRecord 禁用条目

func (*NSRecordDAO) EnableNSRecord

func (this *NSRecordDAO) EnableNSRecord(tx *dbs.Tx, id uint64) error

EnableNSRecord 启用条目

func (*NSRecordDAO) FindEnabledNSRecord

func (this *NSRecordDAO) FindEnabledNSRecord(tx *dbs.Tx, id uint64) (*NSRecord, error)

FindEnabledNSRecord 查找启用中的条目

func (*NSRecordDAO) FindNSRecordName

func (this *NSRecordDAO) FindNSRecordName(tx *dbs.Tx, id uint64) (string, error)

FindNSRecordName 根据主键查找名称

type NSRecordHourlyStat

type NSRecordHourlyStat struct {
	Id            uint64 `field:"id"`            // ID
	ClusterId     uint32 `field:"clusterId"`     // 集群ID
	NodeId        uint32 `field:"nodeId"`        // 节点ID
	DomainId      uint64 `field:"domainId"`      // 域名ID
	RecordId      uint64 `field:"recordId"`      // 记录ID
	Day           string `field:"day"`           // YYYYMMDD
	Hour          string `field:"hour"`          // YYYYMMDDHH
	CountRequests uint64 `field:"countRequests"` // 请求数
	Bytes         uint64 `field:"bytes"`         // 流量
}

NSRecordHourlyStat NS记录统计

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          any // ID
	DomainId    any // 域名ID
	IsOn        any // 是否启用
	Description any // 备注
	Name        any // 记录名
	Type        any // 类型
	Value       any // 值
	MxPriority  any // MX优先级
	SrvPriority any // SRV优先级
	SrvWeight   any // SRV权重
	SrvPort     any // SRV端口
	CaaFlag     any // CAA Flag
	CaaTag      any // CAA TAG
	Ttl         any // TTL(秒)
	Weight      any // 权重
	RouteIds    any // 线路
	HealthCheck any // 健康检查配置
	CountUp     any // 连续上线次数
	CountDown   any // 连续离线次数
	IsUp        any // 是否在线
	CreatedAt   any // 创建时间
	Version     any // 版本号
	State       any // 状态
}

func NewNSRecordOperator

func NewNSRecordOperator() *NSRecordOperator

type NSRoute

type NSRoute struct {
	Id         uint32   `field:"id"`         // ID
	IsOn       bool     `field:"isOn"`       // 是否启用
	ClusterId  uint32   `field:"clusterId"`  // 集群ID
	CategoryId uint32   `field:"categoryId"` // 分类ID
	DomainId   uint64   `field:"domainId"`   // 域名ID
	AdminId    uint64   `field:"adminId"`    // 管理员ID
	UserId     uint64   `field:"userId"`     // 用户ID
	IsPublic   bool     `field:"isPublic"`   // 是否公用(管理员创建的线路)
	Name       string   `field:"name"`       // 名称
	Ranges     dbs.JSON `field:"ranges"`     // 范围
	Order      uint32   `field:"order"`      // 排序
	Version    uint64   `field:"version"`    // 版本号
	Priority   uint32   `field:"priority"`   // 优先级,越高越优先
	Code       string   `field:"code"`       // 代号
	State      uint8    `field:"state"`      // 状态
}

NSRoute DNS线路

type NSRouteCategory added in v0.5.8

type NSRouteCategory struct {
	Id      uint64 `field:"id"`      // ID
	IsOn    bool   `field:"isOn"`    // 是否启用
	Name    string `field:"name"`    // 分类名
	AdminId uint64 `field:"adminId"` // 管理员ID
	UserId  uint64 `field:"userId"`  // 用户ID
	Order   uint32 `field:"order"`   // 排序
	State   uint8  `field:"state"`   // 状态
}

NSRouteCategory 线路分类

type NSRouteCategoryDAO added in v0.5.8

type NSRouteCategoryDAO dbs.DAO
var SharedNSRouteCategoryDAO *NSRouteCategoryDAO

func NewNSRouteCategoryDAO added in v0.5.8

func NewNSRouteCategoryDAO() *NSRouteCategoryDAO

type NSRouteCategoryOperator added in v0.5.8

type NSRouteCategoryOperator struct {
	Id      any // ID
	IsOn    any // 是否启用
	Name    any // 分类名
	AdminId any // 管理员ID
	UserId  any // 用户ID
	Order   any // 排序
	State   any // 状态
}

func NewNSRouteCategoryOperator added in v0.5.8

func NewNSRouteCategoryOperator() *NSRouteCategoryOperator

type NSRouteDAO

type NSRouteDAO dbs.DAO
var SharedNSRouteDAO *NSRouteDAO

func NewNSRouteDAO

func NewNSRouteDAO() *NSRouteDAO

func (*NSRouteDAO) DisableNSRoute

func (this *NSRouteDAO) DisableNSRoute(tx *dbs.Tx, id uint32) error

DisableNSRoute 禁用条目

func (*NSRouteDAO) EnableNSRoute

func (this *NSRouteDAO) EnableNSRoute(tx *dbs.Tx, id uint32) error

EnableNSRoute 启用条目

func (*NSRouteDAO) FindEnabledNSRoute

func (this *NSRouteDAO) FindEnabledNSRoute(tx *dbs.Tx, id uint32) (*NSRoute, error)

FindEnabledNSRoute 查找启用中的条目

func (*NSRouteDAO) FindNSRouteName

func (this *NSRouteDAO) FindNSRouteName(tx *dbs.Tx, id uint32) (string, error)

FindNSRouteName 根据主键查找名称

type NSRouteOperator

type NSRouteOperator struct {
	Id         any // ID
	IsOn       any // 是否启用
	ClusterId  any // 集群ID
	CategoryId any // 分类ID
	DomainId   any // 域名ID
	AdminId    any // 管理员ID
	UserId     any // 用户ID
	IsPublic   any // 是否公用(管理员创建的线路)
	Name       any // 名称
	Ranges     any // 范围
	Order      any // 排序
	Version    any // 版本号
	Priority   any // 优先级,越高越优先
	Code       any // 代号
	State      any // 状态
}

func NewNSRouteOperator

func NewNSRouteOperator() *NSRouteOperator

type NSUserPlan added in v0.5.3

type NSUserPlan struct {
	Id         uint64 `field:"id"`         // ID
	UserId     uint64 `field:"userId"`     // 用户ID
	PlanId     uint32 `field:"planId"`     // 套餐ID
	DayFrom    string `field:"dayFrom"`    // YYYYMMDD
	DayTo      string `field:"dayTo"`      // YYYYMMDD
	PeriodUnit string `field:"periodUnit"` // monthly|yearly
	CreatedAt  uint64 `field:"createdAt"`  // 创建时间
	State      uint8  `field:"state"`      // 状态
}

NSUserPlan 用户套餐

type NSUserPlanOperator added in v0.5.3

type NSUserPlanOperator struct {
	Id         any // ID
	UserId     any // 用户ID
	PlanId     any // 套餐ID
	DayFrom    any // YYYYMMDD
	DayTo      any // YYYYMMDD
	PeriodUnit any // monthly|yearly
	CreatedAt  any // 创建时间
	State      any // 状态
}

func NewNSUserPlanOperator added in v0.5.3

func NewNSUserPlanOperator() *NSUserPlanOperator

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 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

Jump to

Keyboard shortcuts

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