Documentation ¶
Overview ¶
Copyright (C) 2024 Tim Bastin, l3montree UG (haftungsbeschränkt)
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Index ¶
- func NewAffectedComponentRepository(db core.DB) *affectedCmpRepository
- func NewAssetRepository(db core.DB) *assetRepository
- func NewCVERepository(db database.DB) *cveRepository
- func NewCWERepository(db core.DB) *cweRepository
- func NewComponentRepository(db database.DB) *componentRepository
- func NewConfigRepository(db core.DB) *configRepository
- func NewExploitRepository(db core.DB) *exploitRepository
- func NewFlawEventRepository(db core.DB) *eventRepository
- func NewFlawRepository(db core.DB) *flawRepository
- func NewGithubAppInstallationRepository(db core.DB) *githubAppInstallationRepository
- func NewGithubUserRepository(db core.DB) *githubUserRepository
- func NewOrgRepository(db core.DB) *orgRepository
- func NewPATRepository(db core.DB) *gormPatRepository
- func NewProjectRepository(db core.DB) *projectRepository
- type BatchModelWriter
- type GormRepository
- func (g *GormRepository[ID, T]) Begin() *gorm.DB
- func (g *GormRepository[ID, T]) Create(tx *gorm.DB, t *T) error
- func (g *GormRepository[ID, T]) CreateBatch(tx *gorm.DB, ts []T) error
- func (g *GormRepository[ID, T]) Delete(tx *gorm.DB, id ID) error
- func (g *GormRepository[ID, T]) GetDB(tx *gorm.DB) *gorm.DB
- func (g *GormRepository[ID, T]) List(ids []ID) ([]T, error)
- func (g *GormRepository[ID, T]) Read(id ID) (T, error)
- func (g *GormRepository[ID, T]) Save(tx *gorm.DB, t *T) error
- func (g *GormRepository[ID, T]) SaveBatch(tx *gorm.DB, ts []T) error
- func (g *GormRepository[ID, T]) Transaction(f func(tx *gorm.DB) error) error
- type ModelReader
- type ModelWriter
- type Repository
- type Tabler
- type Transactioner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAffectedComponentRepository ¶ added in v0.5.1
func NewAssetRepository ¶
func NewCVERepository ¶
func NewCWERepository ¶
func NewComponentRepository ¶
func NewConfigRepository ¶
func NewExploitRepository ¶
func NewFlawEventRepository ¶
func NewFlawRepository ¶
func NewGithubUserRepository ¶ added in v0.5.1
func NewOrgRepository ¶
func NewPATRepository ¶
func NewProjectRepository ¶
Types ¶
type BatchModelWriter ¶
type GormRepository ¶
type GormRepository[ID comparable, T Tabler] struct { // contains filtered or unexported fields }
func (*GormRepository[ID, T]) Begin ¶
func (g *GormRepository[ID, T]) Begin() *gorm.DB
func (*GormRepository[ID, T]) Create ¶
func (g *GormRepository[ID, T]) Create(tx *gorm.DB, t *T) error
func (*GormRepository[ID, T]) CreateBatch ¶
func (g *GormRepository[ID, T]) CreateBatch(tx *gorm.DB, ts []T) error
func (*GormRepository[ID, T]) Delete ¶
func (g *GormRepository[ID, T]) Delete(tx *gorm.DB, id ID) error
func (*GormRepository[ID, T]) List ¶
func (g *GormRepository[ID, T]) List(ids []ID) ([]T, error)
func (*GormRepository[ID, T]) Read ¶
func (g *GormRepository[ID, T]) Read(id ID) (T, error)
func (*GormRepository[ID, T]) SaveBatch ¶
func (g *GormRepository[ID, T]) SaveBatch(tx *gorm.DB, ts []T) error
func (*GormRepository[ID, T]) Transaction ¶
func (g *GormRepository[ID, T]) Transaction(f func(tx *gorm.DB) error) error
type ModelReader ¶
type ModelWriter ¶
type Repository ¶
type Repository[ID any, T Tabler, Tx any] interface { ModelWriter[ID, T, Tx] ModelReader[ID, T] BatchModelWriter[T, Tx] Transactioner[Tx] }
type Transactioner ¶
Source Files ¶
- affected_component_repository.go
- asset_repository.go
- component_repository.go
- config_repository.go
- cve_repository.go
- cwe_repository.go
- exploit_repository.go
- flaw_repository.go
- flawevent_repository.go
- github_app_installation_repository.go
- github_user_repository.go
- org_repository.go
- pat_repository.go
- project_repository.go
- repository.go