github_repo

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GithubRepository

type GithubRepository struct {
	// contains filtered or unexported fields
}

GithubRepository handles GitHub-related database operations

func NewGithubRepository

func NewGithubRepository(db *ent.Client) *GithubRepository

NewGithubRepository creates a new GitHub repository

func (*GithubRepository) CreateApp

func (self *GithubRepository) CreateApp(ctx context.Context, uniqueUuid uuid.UUID, app *github.AppConfig, createdBy uuid.UUID) (*ent.GithubApp, error)

func (*GithubRepository) GetApp

func (self *GithubRepository) GetApp(ctx context.Context) (*ent.GithubApp, error)

GetApp returns the GithubApp entity., ent.NotFoundError if not found.s

func (*GithubRepository) GetApps

func (self *GithubRepository) GetApps(ctx context.Context, withInstallations bool) ([]*ent.GithubApp, error)

Get all github apps returns a slice of GithubApp entities.

func (*GithubRepository) GetGithubAppByID

func (self *GithubRepository) GetGithubAppByID(ctx context.Context, ID int64) (*ent.GithubApp, error)

func (*GithubRepository) GetGithubAppByUUID

func (self *GithubRepository) GetGithubAppByUUID(ctx context.Context, ID uuid.UUID) (*ent.GithubApp, error)

func (*GithubRepository) GetInstallationByID

func (self *GithubRepository) GetInstallationByID(ctx context.Context, ID int64) (*ent.GithubInstallation, error)

func (*GithubRepository) GetInstallationsByAppID

func (self *GithubRepository) GetInstallationsByAppID(ctx context.Context, appID int64) ([]*ent.GithubInstallation, error)

func (*GithubRepository) GetInstallationsByCreator

func (self *GithubRepository) GetInstallationsByCreator(ctx context.Context, createdBy uuid.UUID) ([]*ent.GithubInstallation, error)

func (*GithubRepository) SetInstallationActive

func (self *GithubRepository) SetInstallationActive(ctx context.Context, id int64, active bool) (*ent.GithubInstallation, error)

func (*GithubRepository) SetInstallationSuspended

func (self *GithubRepository) SetInstallationSuspended(ctx context.Context, id int64, suspended bool) (*ent.GithubInstallation, error)

func (*GithubRepository) UpsertInstallation

func (self *GithubRepository) UpsertInstallation(
	ctx context.Context,
	id int64,
	appID int64,
	accountID int64,
	accountLogin string,
	accountType githubinstallation.AccountType,
	accountURL string,
	repositorySelection githubinstallation.RepositorySelection,
	suspended bool,
	active bool,
	permissions schema.GithubInstallationPermissions,
	events []string,
) (*ent.GithubInstallation, error)

type GithubRepositoryInterface

type GithubRepositoryInterface interface {
	// GetApp returns the GithubApp entity., ent.NotFoundError if not found.s
	GetApp(ctx context.Context) (*ent.GithubApp, error)
	// Get all github apps returns a slice of GithubApp entities.
	GetApps(ctx context.Context, withInstallations bool) ([]*ent.GithubApp, error)
	CreateApp(ctx context.Context, uniqueUuid uuid.UUID, app *github.AppConfig, createdBy uuid.UUID) (*ent.GithubApp, error)
	GetGithubAppByID(ctx context.Context, ID int64) (*ent.GithubApp, error)
	GetGithubAppByUUID(ctx context.Context, ID uuid.UUID) (*ent.GithubApp, error)
	GetInstallationByID(ctx context.Context, ID int64) (*ent.GithubInstallation, error)
	GetInstallationsByCreator(ctx context.Context, createdBy uuid.UUID) ([]*ent.GithubInstallation, error)
	GetInstallationsByAppID(ctx context.Context, appID int64) ([]*ent.GithubInstallation, error)
	UpsertInstallation(ctx context.Context, id int64, appID int64, accountID int64, accountLogin string, accountType githubinstallation.AccountType, accountURL string, repositorySelection githubinstallation.RepositorySelection, suspended bool, active bool, permissions schema.GithubInstallationPermissions, events []string) (*ent.GithubInstallation, error)
	SetInstallationActive(ctx context.Context, id int64, active bool) (*ent.GithubInstallation, error)
	SetInstallationSuspended(ctx context.Context, id int64, suspended bool) (*ent.GithubInstallation, error)
}

GithubRepositoryInterface ...

Jump to

Keyboard shortcuts

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