Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var EventChan = make(chan Event) //nolint:gochecknoglobals
Functions ¶
Types ¶
type CodeHosting ¶
type CodeHosting struct { ID string `json:"-" gorm:"primaryKey"` URL string `json:"url" gorm:"not null,uniqueIndex"` Group *bool `json:"group" gorm:"default:true;not null"` PublisherID string `json:"-"` CreatedAt time.Time `json:"createdAt" gorm:"index"` UpdatedAt time.Time `json:"updatedAt"` DeletedAt gorm.DeletedAt `json:"-" gorm:"index"` }
func (CodeHosting) TableName ¶ added in v0.4.0
func (CodeHosting) TableName() string
type Log ¶
type Log struct { ID string `json:"id" gorm:"primaryKey"` Message string `json:"message" gorm:"not null"` CreatedAt time.Time `json:"createdAt" gorm:"index"` UpdatedAt time.Time `json:"updatedAt"` DeletedAt gorm.DeletedAt `json:"-" gorm:"index"` // Entity this Log entry is about (fe. Publisher, Software, etc.) EntityID string `json:"-"` EntityType string `json:"-"` }
type Publisher ¶
type Publisher struct { ID string `json:"id" gorm:"primaryKey"` Email string `json:"email" gorm:"uniqueIndex"` Description *string `json:"description" gorm:"uniqueIndex,default:null"` CodeHosting []CodeHosting `json:"codeHosting" gorm:"constraint:OnUpdate:CASCADE,OnDelete:SET NULL;unique"` Active *bool `json:"active" gorm:"default:true;not null"` ExternalCode *string `json:"externalCode,omitempty" gorm:"uniqueIndex"` CreatedAt time.Time `json:"createdAt" gorm:"index"` UpdatedAt time.Time `json:"updatedAt"` DeletedAt gorm.DeletedAt `json:"-" gorm:"index"` }
type Software ¶
type Software struct { ID string `json:"id" gorm:"primarykey"` // This needs to be explicitly declared, otherwise GORM won't create // the foreign key and will be confused about the double relationship // with SoftwareURLs (belongs to and has many). SoftwareURLID string `json:"-" gorm:"uniqueIndex,not null"` URL SoftwareURL `json:"url"` Aliases []SoftwareURL `json:"aliases"` PubliccodeYml string `json:"publiccodeYml"` Logs []Log `json:"-" gorm:"polymorphic:Entity;"` Active *bool `json:"active" gorm:"default:true;not null"` CreatedAt time.Time `json:"createdAt" gorm:"index"` UpdatedAt time.Time `json:"updatedAt"` }
type SoftwareURL ¶
type SoftwareURL struct { ID string `gorm:"primarykey"` URL string `gorm:"uniqueIndex"` SoftwareID string `gorm:"not null"` CreatedAt time.Time `json:"createdAt" gorm:"index"` UpdatedAt time.Time `json:"updatedAt"` }
func (SoftwareURL) MarshalJSON ¶
func (su SoftwareURL) MarshalJSON() ([]byte, error)
type Webhook ¶ added in v0.3.0
type Webhook struct { ID string `json:"id" gorm:"primaryKey"` URL string `json:"url" gorm:"index:idx_webhook_url,unique"` Secret string `json:"-"` CreatedAt time.Time `json:"createdAt" gorm:"index"` UpdatedAt time.Time `json:"updatedAt"` DeletedAt gorm.DeletedAt `json:"-" gorm:"index"` // Entity this Webhook is for (fe. Publisher, Software, etc.) EntityID string `json:"-" gorm:"index:idx_webhook_url,unique"` EntityType string `json:"-" gorm:"index:idx_webhook_url,unique"` }
Click to show internal directories.
Click to hide internal directories.