Documentation
¶
Index ¶
- Variables
- func Init() error
- type BuildDal
- type BuildDalImpl
- type ForgejoAuthDal
- type ForgejoAuthDalImpl
- func (f *ForgejoAuthDalImpl) GetByID(ctx context.Context, id int32) (*model.ForgejoAuth, error)
- func (f *ForgejoAuthDalImpl) GetByIssuerAndUsername(ctx context.Context, issuer, username string) (*model.ForgejoAuth, error)
- func (f *ForgejoAuthDalImpl) UpdateCirrusConfig(ctx context.Context, id int32, apiKey, ghRepo, ghOwner string) error
- func (f *ForgejoAuthDalImpl) UpdateTokens(ctx context.Context, id int32, accessToken, refreshToken string, ...) error
- func (f *ForgejoAuthDalImpl) Upsert(ctx context.Context, auth *model.ForgejoAuth) error
- type RepoInstallationDal
- type RepoInstallationDalImpl
- func (r *RepoInstallationDalImpl) Create(ctx context.Context, installation *model.RepoInstallation) error
- func (r *RepoInstallationDalImpl) DeleteByID(ctx context.Context, id int32) error
- func (r *RepoInstallationDalImpl) GetByAuthAndRepo(ctx context.Context, authID int32, owner, repo string) (*model.RepoInstallation, error)
- func (r *RepoInstallationDalImpl) GetByID(ctx context.Context, id int32) (*model.RepoInstallation, error)
- func (r *RepoInstallationDalImpl) GetByWebhookToken(ctx context.Context, token string) (*model.RepoInstallation, error)
- func (r *RepoInstallationDalImpl) ListByAuthID(ctx context.Context, authID int32) ([]*model.RepoInstallation, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DB *gorm.DB
)
Functions ¶
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) ListIncomplete ¶
func (*BuildDalImpl) UpdateStatus ¶
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 (*ForgejoAuthDalImpl) UpdateTokens ¶
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 (r *RepoInstallationDalImpl) GetByID(ctx context.Context, id int32) (*model.RepoInstallation, error)
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)
Click to show internal directories.
Click to hide internal directories.