Documentation
¶
Index ¶
- type AccessToken
- type AccessTokenRole
- type Alert
- type AlertCondNotification
- type AlertCondRule
- type AlertCondition
- type AlertHistory
- type AlertRule
- type Finding
- type FindingSetting
- type FindingTag
- type Notification
- type Organization
- type OrganizationInvitation
- type OrganizationPolicy
- type OrganizationProject
- type OrganizationRole
- type OrganizationRolePolicy
- type PendFinding
- type Policy
- type Project
- type ProjectTag
- type Recommend
- type RecommendFinding
- type RelAlertFinding
- type ReportFinding
- type Resource
- type ResourceTag
- type Role
- type RolePolicy
- type User
- type UserOrganizationRole
- type UserReserved
- type UserRole
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessToken ¶
type AccessToken struct {
AccessTokenID uint32 `gorm:"primary_key"`
TokenHash string
Name string
Description string
ProjectID uint32
ExpiredAt time.Time
LastUpdatedUserID uint32
CreatedAt time.Time
UpdatedAt time.Time
}
AccessToken entity model
type AccessTokenRole ¶
type AccessTokenRole struct {
AccessTokenID uint32
RoleID uint32
CreatedAt time.Time
UpdatedAt time.Time
}
AccessTokenRole entity model
type Alert ¶
type Alert struct {
AlertID uint32 `gorm:"primary_key"`
AlertConditionID uint32
Description string
Severity string
ProjectID uint32
Status string
FirstViewedAt *time.Time
CreatedAt time.Time
UpdatedAt time.Time
}
Alert entity model
type AlertCondNotification ¶
type AlertCondNotification struct {
AlertConditionID uint32
NotificationID uint32
ProjectID uint32
CacheSecond uint32
NotifiedAt time.Time
CreatedAt time.Time
UpdatedAt time.Time
}
AlertCondNotification entity model
type AlertCondRule ¶
type AlertCondRule struct {
AlertConditionID uint32
AlertRuleID uint32
ProjectID uint32
CreatedAt time.Time
UpdatedAt time.Time
}
AlertCondRule entity model
type AlertCondition ¶
type AlertCondition struct {
AlertConditionID uint32 `gorm:"primary_key"`
Description string
Severity string
ProjectID uint32
AndOr string
Enabled bool
CreatedAt time.Time
UpdatedAt time.Time
}
AlertCondition entity model
type AlertHistory ¶
type AlertHistory struct {
AlertHistoryID uint32 `gorm:"primary_key"`
HistoryType string
FindingHistory string
AlertID uint32
Description string
Severity string
ProjectID uint32
CreatedAt time.Time
UpdatedAt time.Time
}
AlertHistory entity model
type AlertRule ¶
type AlertRule struct {
AlertRuleID uint32 `gorm:"primary_key"`
Name string
ProjectID uint32
Score float32
ResourceName string
Tag string
FindingCnt uint32
CreatedAt time.Time
UpdatedAt time.Time
}
AlertRule entity model
type Finding ¶
type Finding struct {
FindingID uint64 `gorm:"primary_key"`
Description string
DataSource string
DataSourceID string
ResourceName string
ProjectID uint32
OriginalScore float32
Score float32
Data string
CreatedAt time.Time
UpdatedAt time.Time
}
Finding entity model
type FindingSetting ¶
type FindingSetting struct {
FindingSettingID uint32 `gorm:"primary_key"`
ProjectID uint32
ResourceName string
Setting string
Status string
CreatedAt time.Time
UpdatedAt time.Time
}
FindingSetting entity model
type FindingTag ¶
type FindingTag struct {
FindingTagID uint64 `gorm:"primary_key"`
FindingID uint64
ProjectID uint32
Tag string
CreatedAt time.Time
UpdatedAt time.Time
}
FindingTag entity model
type Notification ¶
type Notification struct {
NotificationID uint32 `gorm:"primary_key"`
Name string
ProjectID uint32
Type string
NotifySetting string
CreatedAt time.Time
UpdatedAt time.Time
}
Notification entity model
type Organization ¶ added in v0.16.0
type Organization struct {
OrganizationID uint32
Name string
Description string
CreatedAt time.Time
UpdatedAt time.Time
}
Organization entity model
type OrganizationInvitation ¶ added in v0.16.0
type OrganizationInvitation struct {
OrganizationID uint32
ProjectID uint32
Status string
CreatedAt time.Time
UpdatedAt time.Time
}
OrganizationInvitation entity model
type OrganizationPolicy ¶ added in v0.16.0
type OrganizationPolicy struct {
PolicyID uint32 `gorm:"primary_key"`
OrganizationID uint32
Name string
ActionPtn string
CreatedAt time.Time
UpdatedAt time.Time
}
OrganizationPolicy entity model
type OrganizationProject ¶ added in v0.16.0
type OrganizationProject struct {
OrganizationID uint32
ProjectID uint32
CreatedAt time.Time
UpdatedAt time.Time
}
OrganizationProject entity model
type OrganizationRole ¶ added in v0.16.0
type OrganizationRole struct {
RoleID uint32 `gorm:"primary_key"`
OrganizationID uint32
Name string
CreatedAt time.Time
UpdatedAt time.Time
}
OrganizationRole entity model
type OrganizationRolePolicy ¶ added in v0.16.0
type PendFinding ¶
type PendFinding struct {
FindingID uint64 `gorm:"primary_key"`
ProjectID uint32
PendUserID uint32
Note string
Reason string
ExpiredAt time.Time
CreatedAt time.Time
UpdatedAt time.Time
}
PendFinding entity model
type Policy ¶
type Policy struct {
PolicyID uint32 `gorm:"primary_key"`
Name string
ProjectID uint32
ActionPtn string
ResourcePtn string
CreatedAt time.Time
UpdatedAt time.Time
}
Policy entity model
type ProjectTag ¶
type ProjectTag struct {
ProjectID uint32
Tag string
Color string
CreatedAt time.Time
UpdatedAt time.Time
}
ProjectTag entity model
type Recommend ¶
type Recommend struct {
RecommendID uint32 `gorm:"primary_key"`
DataSource string
Type string
Risk string
Recommendation string
CreatedAt time.Time
UpdatedAt time.Time
}
Recommend entity model
type RecommendFinding ¶
type RecommendFinding struct {
FindingID uint64 `gorm:"primary_key"`
RecommendID uint32
ProjectID uint32
CreatedAt time.Time
UpdatedAt time.Time
}
RecommendFinding entity model
type RelAlertFinding ¶
type RelAlertFinding struct {
AlertID uint32
FindingID uint64
ProjectID uint32
CreatedAt time.Time
UpdatedAt time.Time
}
RelAlertFinding entity model
type ReportFinding ¶
type ReportFinding struct {
ReportFindingID uint32 `gorm:"primary_key"`
ReportDate string
ProjectID uint32
ProjectName string
DataSource string
Score float32
Count uint32
CreatedAt time.Time
UpdatedAt time.Time
}
ReportFinding entity model
type Resource ¶
type Resource struct {
ResourceID uint64 `gorm:"primary_key"`
ResourceName string
ProjectID uint32
CreatedAt time.Time
UpdatedAt time.Time
}
Resource entity model
type ResourceTag ¶
type ResourceTag struct {
ResourceTagID uint64 `gorm:"primary_key"`
ResourceID uint64
ProjectID uint32
Tag string
CreatedAt time.Time
UpdatedAt time.Time
}
ResourceTag entity model
type Role ¶
type Role struct {
RoleID uint32 `gorm:"primary_key"`
Name string
ProjectID uint32
CreatedAt time.Time
UpdatedAt time.Time
}
Role entity model
type RolePolicy ¶
type RolePolicy struct {
RoleID uint32
PolicyID uint32
ProjectID uint32
CreatedAt time.Time
UpdatedAt time.Time
}
RolePolicy entity model
type User ¶
type User struct {
UserID uint32 `gorm:"primary_key"`
Sub string
Name string
UserIdpKey string
Activated bool
IsAdmin bool
CreatedAt time.Time
UpdatedAt time.Time
}
User entity model