vobj

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: MIT Imports: 2 Imported by: 0

README

valyeobj

用于存储领域value object

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action int32
const (
	// ActionUnknown 未知操作类型
	ActionUnknown Action = iota
	// ActionCreate 创建
	ActionCreate
	// ActionUpdate 更新
	ActionUpdate
	// ActionDelete  删除
	ActionDelete
	// ActionQuery 查询
	ActionQuery
	// ActionImport 导入
	ActionImport
	// ActionExport 导出
	ActionExport
)

func (Action) String

func (a Action) String() string

String stringer

func (Action) Value

func (a Action) Value() int32

Value int32

type AlarmStatus

type AlarmStatus int32
const (
	// AlarmStatusUnknown 未知
	AlarmStatusUnknown AlarmStatus = iota
	// AlarmStatusAlarm 告警
	AlarmStatusAlarm
	// AlarmStatusResolved 已恢复
	AlarmStatusResolved
	// AlarmStatusIgnored 已忽略
	AlarmStatusIgnored
)

func ToAlarmStatus

func ToAlarmStatus(status string) AlarmStatus

ToAlarmStatus 转换为AlarmStatus

func (AlarmStatus) ApiAlarmStatus

func (s AlarmStatus) ApiAlarmStatus() api.AlarmStatus

ApiAlarmStatus 转换为api.AlarmStatus

func (AlarmStatus) CH

func (s AlarmStatus) CH() string

CH 转换为中文

func (AlarmStatus) EN

func (s AlarmStatus) EN() string

EN 转换为英文

func (AlarmStatus) IsFiring

func (s AlarmStatus) IsFiring() bool

IsFiring 是否告警

func (AlarmStatus) IsResolved

func (s AlarmStatus) IsResolved() bool

IsResolved 是否已恢复

func (AlarmStatus) IsUnknown

func (s AlarmStatus) IsUnknown() bool

IsUnknown 是否未知

func (AlarmStatus) Key

func (s AlarmStatus) Key() string

Key 转换为key

func (AlarmStatus) String

func (s AlarmStatus) String() string

String 转换为字符串

func (AlarmStatus) Value

func (s AlarmStatus) Value() int32

Value 转换为value

type Category

type Category int32
const (
	// CategoryUnknown 未知
	CategoryUnknown Category = iota
	// CategoryPromLabel prometheus 标签
	CategoryPromLabel
	// CategoryPromAnnotation prometheus 描述信息
	CategoryPromAnnotation
	// CategoryPromStrategy prometheus 规则
	CategoryPromStrategy
	// CategoryPromStrategyGroup prometheus 规则组
	CategoryPromStrategyGroup
	// CategoryAlarmLevel 告警级别
	CategoryAlarmLevel
	// CategoryAlarmStatus 告警状态
	CategoryAlarmStatus
	// CategoryNotifyType 通知类型
	CategoryNotifyType
	//CategoryAlarmPage 告警页面
	CategoryAlarmPage
)

func (Category) ApiCategory

func (c Category) ApiCategory() api.Category

ApiCategory 转换为 api 枚举

func (Category) IsUnknown

func (c Category) IsUnknown() bool

IsUnknown 是否未知

func (Category) Key

func (c Category) Key() string

Key Category 转换为 key

func (Category) String

func (c Category) String() string

String Category 转换为字符串

func (Category) Value

func (c Category) Value() int32

Value Category 转换为 value

type Domain

type Domain int32
const (
	// DomainOther 其他领域
	DomainOther Domain = iota
	// DomainSystem 系统领域
	DomainSystem
	// DomainMonitor 监控领域
	DomainMonitor
	// DomainBusiness 业务领域
	DomainBusiness
)

func (Domain) Remark

func (d Domain) Remark() string

Remark 领域说明

func (Domain) String

func (d Domain) String() string

String 获取领域名称

func (Domain) Value

func (d Domain) Value() int32

Value 获取领域值

type DomainList

type DomainList []Domain

func (DomainList) Len

func (d DomainList) Len() int

func (DomainList) Less

func (d DomainList) Less(i, j int) bool

func (DomainList) Swap

func (d DomainList) Swap(i, j int)

type Gender

type Gender int32
const (
	// GenderUnknown 未知性别
	GenderUnknown Gender = iota
	// GenderMale 男性
	GenderMale
	// GenderFemale 女性
	GenderFemale
)

func ToGender

func ToGender(gender string) Gender

ToGender 转换性别

func (Gender) Key

func (g Gender) Key() string

Key 获取性别key

func (Gender) String

func (g Gender) String() string

String 获取性别字符串

func (Gender) Value

func (g Gender) Value() int32

Value 获取性别value

type IsSendRecover

type IsSendRecover uint8
const (
	// IsSendRecoverUnknown 未知
	IsSendRecoverUnknown IsSendRecover = iota
	// IsSendRecoverYes 发送恢复通知
	IsSendRecoverYes
	// IsSendRecoverNo 不发送恢复通知
	IsSendRecoverNo
)

func NewIsSendRecover

func NewIsSendRecover(value bool) IsSendRecover

NewIsSendRecover 转换为IsSendRecover

func (IsSendRecover) String

func (s IsSendRecover) String() string

String 获取状态字符串

func (IsSendRecover) Value

func (s IsSendRecover) Value() bool

Value 获取状态值

type Module

type Module int32
const (
	// ModuleOther 其他模块
	ModuleOther Module = iota
	// ModuleApi 接口模块
	ModuleApi
	// ModuleMenu 菜单模块
	ModuleMenu
	// ModuleRole 角色模块
	ModuleRole
	// ModuleUser 用户模块
	ModuleUser
	// ModuleDict 字典模块
	ModuleDict
	// ModuleRealtimeAlarm 实时告警模块
	ModuleRealtimeAlarm
	// ModuleAlarmHistory 告警历史模块
	ModuleAlarmHistory
	// ModuleStrategyGroup 策略组模块
	ModuleStrategyGroup
	// ModuleStrategy 策略模块
	ModuleStrategy
	// ModuleDatasource 数据源模块
	ModuleDatasource
	// ModuleAlarmPage 告警页面模块
	ModuleAlarmPage
	// ModuleAlarmNotifyGroup 告警通知组模块
	ModuleAlarmNotifyGroup
	// ModuleAlarmNotifyHook 告警通知机器人模块
	ModuleAlarmNotifyHook
	// ModuleDashboardChart 仪表盘图表模块
	ModuleDashboardChart
	// ModuleDashboard 仪表盘模块
	ModuleDashboard
)

func (Module) Remark

func (m Module) Remark() string

Remark 模块说明

func (Module) String

func (m Module) String() string

String 获取模块名称

func (Module) Value

func (m Module) Value() int32

Value 获取模块值

type ModuleList

type ModuleList []Module

func (ModuleList) Len

func (m ModuleList) Len() int

func (ModuleList) Less

func (m ModuleList) Less(i, j int) bool

func (ModuleList) Swap

func (m ModuleList) Swap(i, j int)

type NotifyApp

type NotifyApp int32
const (
	// NotifyAppUnknown 未知
	NotifyAppUnknown NotifyApp = iota
	// NotifyAppDingDing 钉钉
	NotifyAppDingDing
	// NotifyAppWeChatWork 企业微信
	NotifyAppWeChatWork
	// NotifyAppFeiShu 飞书
	NotifyAppFeiShu
	// NotifyAppCustom 自定义
	NotifyAppCustom
)

func (NotifyApp) ApiNotifyApp

func (a NotifyApp) ApiNotifyApp() api.NotifyApp

ApiNotifyApp API通知应用

func (NotifyApp) IsUnknown

func (a NotifyApp) IsUnknown() bool

IsUnknown 是否未知

func (NotifyApp) Key

func (a NotifyApp) Key() string

Key 转换为键

func (NotifyApp) String

func (a NotifyApp) String() string

String 转换为字符串

func (NotifyApp) Value

func (a NotifyApp) Value() int32

Value 转换为值

type NotifyTemplateType

type NotifyTemplateType int32
const (
	// NotifyTemplateTypeCustom  自定义通知模板
	NotifyTemplateTypeCustom NotifyTemplateType = iota
	// NotifyTemplateTypeEmail 邮件通知模板
	NotifyTemplateTypeEmail
	// NotifyTemplateTypeSms 短信通知模板
	NotifyTemplateTypeSms
	// NotifyTemplateTypeWeChatWork 企业微信通知模板
	NotifyTemplateTypeWeChatWork
	// NotifyTemplateTypeFeiShu 飞书通知模板
	NotifyTemplateTypeFeiShu
	// NotifyTemplateTypeDingDing 钉钉通知模板
	NotifyTemplateTypeDingDing
)

type NotifyType

type NotifyType int32
const (
	// NotifyTypeUnknown 未知
	NotifyTypeUnknown NotifyType = iota
	// NotifyTypeEmail 邮件
	NotifyTypeEmail NotifyType = 1 << iota
	// NotifyTypeSms 短信
	NotifyTypeSms NotifyType = 1 << iota
	// NotifyTypePhone 电话
	NotifyTypePhone NotifyType = 1 << iota
)

func (NotifyType) ApiNotifyType

func (a NotifyType) ApiNotifyType() api.NotifyType

ApiNotifyType API通知类型

func (NotifyType) IsEmail

func (a NotifyType) IsEmail() bool

IsEmail 邮件

func (NotifyType) IsPhone

func (a NotifyType) IsPhone() bool

IsPhone 电话

func (NotifyType) IsSms

func (a NotifyType) IsSms() bool

IsSms 短信

func (NotifyType) Value

func (a NotifyType) Value() int32

Value 转换为值

type Op

type Op int32
const (
	// OpCreate 创建
	OpCreate Op = iota + 1
	// OpUpdate 更新
	OpUpdate
	// OpDelete 删除
	OpDelete
	// OpRead 读取
	OpRead
	// OpAll 所有
	OpAll
)

func (Op) String

func (o Op) String() string

String 转换为字符串

func (Op) Value

func (o Op) Value() int32

Value 转换为int32

type Status

type Status int32
const (
	// StatusUnknown 未知状态
	StatusUnknown Status = iota
	// StatusEnabled 启用
	StatusEnabled
	// StatusDisabled 禁用
	StatusDisabled
)

func (Status) ApiStatus

func (s Status) ApiStatus() api.Status

ApiStatus 转换为api状态

func (Status) IsEnabled

func (s Status) IsEnabled() bool

IsEnabled 是否启用

func (Status) IsUnknown

func (s Status) IsUnknown() bool

IsUnknown 是否未知状态

func (Status) Key

func (s Status) Key() string

Key 获取状态key

func (Status) String

func (s Status) String() string

String 获取状态字符串

func (Status) Value

func (s Status) Value() int32

Value 获取状态值

Jump to

Keyboard shortcuts

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