dal

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2026 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DB *gorm.DB
)

Functions

func Init

func Init() error

Types

type BuildDal

type BuildDal interface {
	Create(ctx context.Context, build *model.Build) error
	ListIncomplete(ctx context.Context) ([]*model.Build, error)
	UpdateStatus(ctx context.Context, id int32, status string) error
}

func GetBuildDal

func GetBuildDal() BuildDal

type BuildDalImpl

type BuildDalImpl struct{}

func (*BuildDalImpl) Create

func (b *BuildDalImpl) Create(ctx context.Context, build *model.Build) error

func (*BuildDalImpl) ListIncomplete

func (b *BuildDalImpl) ListIncomplete(ctx context.Context) ([]*model.Build, error)

func (*BuildDalImpl) UpdateStatus

func (b *BuildDalImpl) UpdateStatus(ctx context.Context, id int32, status string) error

type ForgejoAuthDal

type ForgejoAuthDal interface {
	GetByID(ctx context.Context, id int32) (*model.ForgejoAuth, error)
	Upsert(ctx context.Context, auth *model.ForgejoAuth) error
	GetByIssuerAndUsername(ctx context.Context, issuer, username string) (*model.ForgejoAuth, error)
	UpdateTokens(ctx context.Context, id int32, accessToken, refreshToken string, expiresAt time.Time) error
	UpdateCirrusConfig(ctx context.Context, id int32, apiKey, ghRepo, ghOwner string) error
}

func GetForgejoAuthDal

func GetForgejoAuthDal() ForgejoAuthDal

type ForgejoAuthDalImpl

type ForgejoAuthDalImpl struct{}

func (*ForgejoAuthDalImpl) GetByID

func (f *ForgejoAuthDalImpl) GetByID(ctx context.Context, id int32) (*model.ForgejoAuth, error)

func (*ForgejoAuthDalImpl) GetByIssuerAndUsername

func (f *ForgejoAuthDalImpl) GetByIssuerAndUsername(ctx context.Context, issuer, username string) (*model.ForgejoAuth, error)

func (*ForgejoAuthDalImpl) UpdateCirrusConfig

func (f *ForgejoAuthDalImpl) UpdateCirrusConfig(ctx context.Context, id int32, apiKey, ghRepo, ghOwner string) error

func (*ForgejoAuthDalImpl) UpdateTokens

func (f *ForgejoAuthDalImpl) UpdateTokens(ctx context.Context, id int32, accessToken, refreshToken string, expiresAt time.Time) error

func (*ForgejoAuthDalImpl) Upsert

func (f *ForgejoAuthDalImpl) Upsert(ctx context.Context, auth *model.ForgejoAuth) error

type RepoInstallationDal

type RepoInstallationDal interface {
	Create(ctx context.Context, installation *model.RepoInstallation) error
	GetByID(ctx context.Context, id int32) (*model.RepoInstallation, error)
	GetByAuthAndRepo(ctx context.Context, authID int32, owner, repo string) (*model.RepoInstallation, error)
	GetByWebhookToken(ctx context.Context, token string) (*model.RepoInstallation, error)
	ListByAuthID(ctx context.Context, authID int32) ([]*model.RepoInstallation, error)
	DeleteByID(ctx context.Context, id int32) error
}

func GetRepoInstallationDal

func GetRepoInstallationDal() RepoInstallationDal

type RepoInstallationDalImpl

type RepoInstallationDalImpl struct{}

func (*RepoInstallationDalImpl) Create

func (r *RepoInstallationDalImpl) Create(ctx context.Context, installation *model.RepoInstallation) error

func (*RepoInstallationDalImpl) DeleteByID

func (r *RepoInstallationDalImpl) DeleteByID(ctx context.Context, id int32) error

func (*RepoInstallationDalImpl) GetByAuthAndRepo

func (r *RepoInstallationDalImpl) GetByAuthAndRepo(ctx context.Context, authID int32, owner, repo string) (*model.RepoInstallation, error)

func (*RepoInstallationDalImpl) GetByID

func (*RepoInstallationDalImpl) GetByWebhookToken

func (r *RepoInstallationDalImpl) GetByWebhookToken(ctx context.Context, token string) (*model.RepoInstallation, error)

func (*RepoInstallationDalImpl) ListByAuthID

func (r *RepoInstallationDalImpl) ListByAuthID(ctx context.Context, authID int32) ([]*model.RepoInstallation, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL