model

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

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 PendFinding

type PendFinding struct {
	FindingID uint64 `gorm:"primary_key"`
	ProjectID 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 Project

type Project struct {
	ProjectID uint32
	Name      string
	CreatedAt time.Time
	UpdatedAt time.Time
}

Project 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
	CreatedAt  time.Time
	UpdatedAt  time.Time
}

User entity model

type UserReserved added in v0.5.0

type UserReserved struct {
	ReservedID uint32 `gorm:"primary_key"`
	UserIdpKey string
	RoleID     uint32
	CreatedAt  time.Time
	UpdatedAt  time.Time
}

UserReserved entity model

type UserRole

type UserRole struct {
	UserID    uint32
	RoleID    uint32
	ProjectID uint32
	CreatedAt time.Time
	UpdatedAt time.Time
}

UserRole entity model

Jump to

Keyboard shortcuts

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