Documentation ¶
Index ¶
- Constants
- type AuthorityKey
- type AuthorityKeyDAO
- type AuthorityKeyOperator
- type AuthorityNode
- type AuthorityNodeDAO
- func (this *AuthorityNodeDAO) CountAllEnabledAuthorityNodes(tx *dbs.Tx) (int64, error)
- func (this *AuthorityNodeDAO) CountAllLowerVersionNodes(tx *dbs.Tx, version string) (int64, error)
- func (this *AuthorityNodeDAO) CreateAuthorityNode(tx *dbs.Tx, name string, description string, isOn bool) (nodeId int64, err error)
- func (this *AuthorityNodeDAO) DisableAuthorityNode(tx *dbs.Tx, id int64) error
- func (this *AuthorityNodeDAO) EnableAuthorityNode(tx *dbs.Tx, id int64) error
- func (this *AuthorityNodeDAO) FindAllEnabledAuthorityNodes(tx *dbs.Tx) (result []*AuthorityNode, err error)
- func (this *AuthorityNodeDAO) FindAuthorityNodeName(tx *dbs.Tx, id int64) (string, error)
- func (this *AuthorityNodeDAO) FindEnabledAuthorityNode(tx *dbs.Tx, id int64) (*AuthorityNode, error)
- func (this *AuthorityNodeDAO) FindEnabledAuthorityNodeIdWithUniqueId(tx *dbs.Tx, uniqueId string) (int64, error)
- func (this *AuthorityNodeDAO) FindEnabledAuthorityNodeWithUniqueId(tx *dbs.Tx, uniqueId string) (*AuthorityNode, error)
- func (this *AuthorityNodeDAO) GenUniqueId(tx *dbs.Tx) (string, error)
- func (this *AuthorityNodeDAO) ListEnabledAuthorityNodes(tx *dbs.Tx, offset int64, size int64) (result []*AuthorityNode, err error)
- func (this *AuthorityNodeDAO) UpdateAuthorityNode(tx *dbs.Tx, nodeId int64, name string, description string, isOn bool) error
- func (this *AuthorityNodeDAO) UpdateNodeStatus(tx *dbs.Tx, nodeId int64, nodeStatus *nodeconfigs.NodeStatus) error
- type AuthorityNodeOperator
Constants ¶
View Source
const ( AuthorityNodeStateEnabled = 1 // 已启用 AuthorityNodeStateDisabled = 0 // 已禁用 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthorityKey ¶
type AuthorityKey struct { Id uint32 `field:"id"` // ID Value string `field:"value"` // Key值 DayFrom string `field:"dayFrom"` // 开始日期 DayTo string `field:"dayTo"` // 结束日期 Hostname string `field:"hostname"` // Hostname MacAddresses dbs.JSON `field:"macAddresses"` // MAC地址 UpdatedAt uint64 `field:"updatedAt"` // 创建/修改时间 Company string `field:"company"` // 公司组织 }
AuthorityKey 企业版认证信息
type AuthorityKeyOperator ¶
type AuthorityKeyOperator struct { Id interface{} // ID Value interface{} // Key值 DayFrom interface{} // 开始日期 DayTo interface{} // 结束日期 Hostname interface{} // Hostname MacAddresses interface{} // MAC地址 UpdatedAt interface{} // 创建/修改时间 Company interface{} // 公司组织 }
func NewAuthorityKeyOperator ¶
func NewAuthorityKeyOperator() *AuthorityKeyOperator
type AuthorityNode ¶
type AuthorityNode struct { Id uint32 `field:"id"` // ID IsOn bool `field:"isOn"` // 是否启用 UniqueId string `field:"uniqueId"` // 唯一ID Secret string `field:"secret"` // 密钥 Name string `field:"name"` // 名称 Description string `field:"description"` // 描述 Order uint32 `field:"order"` // 排序 State uint8 `field:"state"` // 状态 CreatedAt uint64 `field:"createdAt"` // 创建时间 AdminId uint32 `field:"adminId"` // 管理员ID Weight uint32 `field:"weight"` // 权重 Status dbs.JSON `field:"status"` // 运行状态 }
AuthorityNode 监控节点
type AuthorityNodeDAO ¶
func NewAuthorityNodeDAO ¶
func NewAuthorityNodeDAO() *AuthorityNodeDAO
func (*AuthorityNodeDAO) CountAllEnabledAuthorityNodes ¶
func (this *AuthorityNodeDAO) CountAllEnabledAuthorityNodes(tx *dbs.Tx) (int64, error)
CountAllEnabledAuthorityNodes 计算认证节点数量
func (*AuthorityNodeDAO) CountAllLowerVersionNodes ¶
CountAllLowerVersionNodes 计算所有节点中低于某个版本的节点数量
func (*AuthorityNodeDAO) CreateAuthorityNode ¶
func (this *AuthorityNodeDAO) CreateAuthorityNode(tx *dbs.Tx, name string, description string, isOn bool) (nodeId int64, err error)
CreateAuthorityNode 创建认证节点
func (*AuthorityNodeDAO) DisableAuthorityNode ¶
func (this *AuthorityNodeDAO) DisableAuthorityNode(tx *dbs.Tx, id int64) error
DisableAuthorityNode 禁用条目
func (*AuthorityNodeDAO) EnableAuthorityNode ¶
func (this *AuthorityNodeDAO) EnableAuthorityNode(tx *dbs.Tx, id int64) error
EnableAuthorityNode 启用条目
func (*AuthorityNodeDAO) FindAllEnabledAuthorityNodes ¶
func (this *AuthorityNodeDAO) FindAllEnabledAuthorityNodes(tx *dbs.Tx) (result []*AuthorityNode, err error)
FindAllEnabledAuthorityNodes 列出所有可用认证节点
func (*AuthorityNodeDAO) FindAuthorityNodeName ¶
FindAuthorityNodeName 根据主键查找名称
func (*AuthorityNodeDAO) FindEnabledAuthorityNode ¶
func (this *AuthorityNodeDAO) FindEnabledAuthorityNode(tx *dbs.Tx, id int64) (*AuthorityNode, error)
FindEnabledAuthorityNode 查找启用中的条目
func (*AuthorityNodeDAO) FindEnabledAuthorityNodeIdWithUniqueId ¶
func (this *AuthorityNodeDAO) FindEnabledAuthorityNodeIdWithUniqueId(tx *dbs.Tx, uniqueId string) (int64, error)
FindEnabledAuthorityNodeIdWithUniqueId 根据唯一ID获取节点ID
func (*AuthorityNodeDAO) FindEnabledAuthorityNodeWithUniqueId ¶
func (this *AuthorityNodeDAO) FindEnabledAuthorityNodeWithUniqueId(tx *dbs.Tx, uniqueId string) (*AuthorityNode, error)
FindEnabledAuthorityNodeWithUniqueId 根据唯一ID获取节点信息
func (*AuthorityNodeDAO) GenUniqueId ¶
func (this *AuthorityNodeDAO) GenUniqueId(tx *dbs.Tx) (string, error)
GenUniqueId 生成唯一ID
func (*AuthorityNodeDAO) ListEnabledAuthorityNodes ¶
func (this *AuthorityNodeDAO) ListEnabledAuthorityNodes(tx *dbs.Tx, offset int64, size int64) (result []*AuthorityNode, err error)
ListEnabledAuthorityNodes 列出单页的认证节点
func (*AuthorityNodeDAO) UpdateAuthorityNode ¶
func (this *AuthorityNodeDAO) UpdateAuthorityNode(tx *dbs.Tx, nodeId int64, name string, description string, isOn bool) error
UpdateAuthorityNode 修改认证节点
func (*AuthorityNodeDAO) UpdateNodeStatus ¶
func (this *AuthorityNodeDAO) UpdateNodeStatus(tx *dbs.Tx, nodeId int64, nodeStatus *nodeconfigs.NodeStatus) error
UpdateNodeStatus 更改节点状态
type AuthorityNodeOperator ¶
type AuthorityNodeOperator struct { Id interface{} // ID IsOn interface{} // 是否启用 UniqueId interface{} // 唯一ID Secret interface{} // 密钥 Name interface{} // 名称 Description interface{} // 描述 Order interface{} // 排序 State interface{} // 状态 CreatedAt interface{} // 创建时间 AdminId interface{} // 管理员ID Weight interface{} // 权重 Status interface{} // 运行状态 }
func NewAuthorityNodeOperator ¶
func NewAuthorityNodeOperator() *AuthorityNodeOperator
Click to show internal directories.
Click to hide internal directories.