Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Activity ¶
type Activity struct { ID uuid.UUID `gorm:"type:uuid;primaryKey;default:uuid_generate_v4()"` ProviderID uuid.UUID ResourceID uuid.UUID ProviderActivityID string AccountType string AccountID string Timestamp time.Time Authorizations pq.StringArray `gorm:"type:text[]"` RelatedPermissions pq.StringArray `gorm:"type:text[]"` Type string Metadata datatypes.JSON CreatedAt time.Time `gorm:"autoCreateTime"` Provider *Provider `gorm:"ForeignKey:ProviderID;References:ID"` Resource *Resource `gorm:"ForeignKey:ResourceID;References:ID"` }
type Appeal ¶
type Appeal struct { ID uuid.UUID `gorm:"type:uuid;primaryKey;default:uuid_generate_v4()"` ResourceID string PolicyID string PolicyVersion uint Status string AccountID string AccountType string CreatedBy string Creator datatypes.JSON Role string Permissions pq.StringArray `gorm:"type:text[]"` Options datatypes.JSON Labels datatypes.JSON Details datatypes.JSON Description string Resource *Resource `gorm:"ForeignKey:ResourceID;References:ID"` Policy Policy `gorm:"ForeignKey:PolicyID,PolicyVersion;References:ID,Version"` Approvals []*Approval Grant *Grant 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 uuid.UUID `gorm:"type:uuid;primaryKey;default:uuid_generate_v4()"` Name string `gorm:"index"` Index int AppealID string Status string Actor *string Reason 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 uuid.UUID `gorm:"type:uuid;primaryKey;default:uuid_generate_v4()"` ApprovalID string AppealID string `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 Grant ¶
type Grant struct { ID uuid.UUID `gorm:"type:uuid;primaryKey;default:uuid_generate_v4()"` Status string StatusInProvider string AccountID string AccountType string ResourceID string Role string Permissions pq.StringArray `gorm:"type:text[]"` IsPermanent bool ExpirationDate time.Time RequestedExpirationDate sql.NullTime ExpirationDateReason sql.NullString AppealID sql.NullString Source string RevokedBy string RevokedAt time.Time RevokeReason string Owner string CreatedAt time.Time `gorm:"autoCreateTime"` UpdatedAt time.Time `gorm:"autoUpdateTime"` DeletedAt gorm.DeletedAt `gorm:"index"` Resource *Resource `gorm:"ForeignKey:ResourceID;References:ID"` Appeal *Appeal `gorm:"ForeignKey:AppealID;References:ID"` }
type Policy ¶
type Policy struct { ID string `gorm:"primaryKey"` Version uint `gorm:"primaryKey"` Description string Steps datatypes.JSON AppealConfig datatypes.JSON Labels datatypes.JSON Requirements datatypes.JSON IAM 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 uuid.UUID `gorm:"type:uuid;primaryKey;default:uuid_generate_v4()"` Type string `gorm:"uniqueIndex:provider_index"` URN string `gorm:"uniqueIndex:provider_index"` 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 uuid.UUID `gorm:"type:uuid;primaryKey;default:uuid_generate_v4()"` ParentID *string `gorm:"type:uuid"` ProviderType string `gorm:"uniqueIndex:resource_index"` ProviderURN string `gorm:"uniqueIndex:resource_index"` Type string `gorm:"uniqueIndex:resource_index"` URN string `gorm:"uniqueIndex:resource_index"` Name string Details datatypes.JSON Labels datatypes.JSON GlobalURN *string `gorm:"uniqueIndex:resource_global_urn"` Children []Resource `gorm:"ForeignKey:ParentID;References:ID"` Provider Provider `gorm:"ForeignKey:ProviderType,ProviderURN;References:Type,URN"` CreatedAt time.Time `gorm:"autoCreateTime"` UpdatedAt time.Time `gorm:"autoUpdateTime"` DeletedAt gorm.DeletedAt `gorm:"index"` IsDeleted bool }
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.