Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Appeal ¶
type Appeal struct { ID uint `gorm:"primaryKey"` ResourceID uint PolicyID string PolicyVersion uint Status string User string Role string Options datatypes.JSON Labels datatypes.JSON Resource *Resource `gorm:"ForeignKey:ResourceID;References:ID"` Policy Policy `gorm:"ForeignKey:PolicyID,PolicyVersion;References:ID,Version"` Approvals []*Approval CreatedAt time.Time `gorm:"autoCreateTime"` UpdatedAt time.Time `gorm:"autoUpdateTime"` DeletedAt gorm.DeletedAt `gorm:"index"` }
Appeal database model
func (*Appeal) FromDomain ¶
FromDomain transforms *domain.Appeal values into the model
type Approval ¶
type Approval struct { ID uint `gorm:"primaryKey"` Name string `gorm:"index"` Index int AppealID uint Status string Actor *string PolicyID string PolicyVersion uint Approvers []Approver Appeal *Appeal CreatedAt time.Time `gorm:"autoCreateTime"` UpdatedAt time.Time `gorm:"autoUpdateTime"` DeletedAt gorm.DeletedAt `gorm:"index"` }
Approval database model
func (*Approval) FromDomain ¶
FromDomain transforms *domain.Approval values into the model
type Approver ¶
type Approver struct { ID uint `gorm:"autoIncrement;uniqueIndex"` ApprovalID uint AppealID uint `gorm:"index"` Email string `gorm:"index"` CreatedAt time.Time `gorm:"autoCreateTime"` UpdatedAt time.Time `gorm:"autoUpdateTime"` DeletedAt gorm.DeletedAt `gorm:"index"` }
Approver database model
func (*Approver) FromDomain ¶
FromDomain transforms *domain.Approver values into the model
type Policy ¶
type Policy struct { ID string `gorm:"primaryKey"` Version uint `gorm:"primaryKey"` Description string Steps datatypes.JSON Labels datatypes.JSON CreatedAt time.Time `gorm:"autoCreateTime"` UpdatedAt time.Time `gorm:"autoUpdateTime"` DeletedAt gorm.DeletedAt `gorm:"index"` }
Policy is the database model for policy
func (*Policy) FromDomain ¶
FromDomain transforms *domain.Policy values into the model
type Provider ¶
type Provider struct { ID uint `gorm:"autoIncrement;uniqueIndex"` Type string `gorm:"primaryKey"` URN string `gorm:"primaryKey"` Config datatypes.JSON CreatedAt time.Time `gorm:"autoCreateTime"` UpdatedAt time.Time `gorm:"autoUpdateTime"` DeletedAt gorm.DeletedAt `gorm:"index"` }
Provider is the database model for provider
func (*Provider) FromDomain ¶
FromDomain uses *domain.Provider values as the model values
type Resource ¶
type Resource struct { ID uint `gorm:"autoIncrement;uniqueIndex"` ProviderType string `gorm:"primaryKey"` ProviderURN string `gorm:"primaryKey"` Type string `gorm:"primaryKey"` URN string `gorm:"primaryKey"` Name string Details datatypes.JSON Labels datatypes.JSON Provider Provider `gorm:"ForeignKey:ProviderType,ProviderURN;References:Type,URN"` CreatedAt time.Time `gorm:"autoCreateTime"` UpdatedAt time.Time `gorm:"autoUpdateTime"` DeletedAt gorm.DeletedAt `gorm:"index"` }
Resource is the database model for resource
func (*Resource) FromDomain ¶
FromDomain uses *domain.Resource values as the model values
Click to show internal directories.
Click to hide internal directories.