Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoRecord = errors.New("models: no matching record found") ErrInvalidCredentials = errors.New("models: invalid credentials") ErrDuplicateEmail = errors.New("models: duplicate email") ErrDuplicateIdentifier = errors.New("models: duplicate service identifier") ErrNoOrg = errors.New("no organization selected") StatusInDevelopment = 1 // active dev StatusBeta = 2 // testing StatusProduction = 3 // prod and active dev StatusMaintain = 4 // prod no longer developed/extended StatusDeprecated = 5 // legacy, to be replaced StatusDecommissioned = 6 // it used to be a thing but it's gone now AttributesTypes = []string{"link", "webhook", "select"} SettingsTypes = []string{"team-provider"} )
Functions ¶
This section is empty.
Types ¶
type AuditLog ¶
type AuditLog struct { gorm.Model User int Message string Organization *Organization OrganizationID uint }
AuditLog model definition of logs
type Organization ¶
type Organization struct { gorm.Model Identifier string `gorm:"type:varchar(100) unique"` Name string Active bool Users []*User `gorm:"many2many:user_organizations;"` Services []*Service Settings []*Setting ServiceAttributes []*ServiceAttribute OrganizationAttributes []*OrganizationAttribute AuditLogs []*AuditLog }
Organization model definition for organizations
type OrganizationAttribute ¶
type OrganizationAttribute struct { gorm.Model Value string Active bool Setting Setting SettingID uint Organization *Organization OrganizationID uint }
OrganizationAttribute model definition of attributes specifically for organizations
type Service ¶
type Service struct { gorm.Model Identifier string `gorm:"type:varchar(100)"` Title string Description string Owner string Status int ServiceAttributes []*ServiceAttribute `gorm:"foreignKey:ServiceID"` Organization Organization OrganizationID uint }
Service model definition of a service
type ServiceAttribute ¶
type ServiceAttribute struct { gorm.Model Value string Active bool Setting Setting SettingID uint Organization *Organization OrganizationID uint Service *Service ServiceID int }
ServiceAttribute model definition of attributes connected to services
Click to show internal directories.
Click to hide internal directories.