| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- package repository
- import (
- ints "github.com/porter-dev/porter/internal/models/integrations"
- )
- // KubeIntegrationRepository represents the set of queries on the OIDC auth
- // mechanism
- type KubeIntegrationRepository interface {
- CreateKubeIntegration(am *ints.KubeIntegration) (*ints.KubeIntegration, error)
- ReadKubeIntegration(projectID, id uint) (*ints.KubeIntegration, error)
- ListKubeIntegrationsByProjectID(projectID uint) ([]*ints.KubeIntegration, error)
- }
- // BasicIntegrationRepository represents the set of queries on the "basic" auth
- // mechanism
- type BasicIntegrationRepository interface {
- CreateBasicIntegration(am *ints.BasicIntegration) (*ints.BasicIntegration, error)
- ReadBasicIntegration(projectID, id uint) (*ints.BasicIntegration, error)
- ListBasicIntegrationsByProjectID(projectID uint) ([]*ints.BasicIntegration, error)
- DeleteBasicIntegration(am *ints.BasicIntegration) (*ints.BasicIntegration, error)
- }
- // OIDCIntegrationRepository represents the set of queries on the OIDC auth
- // mechanism
- type OIDCIntegrationRepository interface {
- CreateOIDCIntegration(am *ints.OIDCIntegration) (*ints.OIDCIntegration, error)
- ReadOIDCIntegration(projectID, id uint) (*ints.OIDCIntegration, error)
- ListOIDCIntegrationsByProjectID(projectID uint) ([]*ints.OIDCIntegration, error)
- }
- // OAuthIntegrationRepository represents the set of queries on the oauth
- // mechanism
- type OAuthIntegrationRepository interface {
- CreateOAuthIntegration(am *ints.OAuthIntegration) (*ints.OAuthIntegration, error)
- ReadOAuthIntegration(projectID, id uint) (*ints.OAuthIntegration, error)
- ListOAuthIntegrationsByProjectID(projectID uint) ([]*ints.OAuthIntegration, error)
- UpdateOAuthIntegration(am *ints.OAuthIntegration) (*ints.OAuthIntegration, error)
- }
- // GithubAppOAuthIntegrationRepository represents the set of queries on the oauth
- // mechanism
- type GithubAppOAuthIntegrationRepository interface {
- CreateGithubAppOAuthIntegration(am *ints.GithubAppOAuthIntegration) (*ints.GithubAppOAuthIntegration, error)
- ReadGithubAppOauthIntegration(id uint) (*ints.GithubAppOAuthIntegration, error)
- UpdateGithubAppOauthIntegration(am *ints.GithubAppOAuthIntegration) (*ints.GithubAppOAuthIntegration, error)
- }
- // SlackIntegrationRepository represents the set of queries on a Slack integration
- type SlackIntegrationRepository interface {
- CreateSlackIntegration(slackInt *ints.SlackIntegration) (*ints.SlackIntegration, error)
- ListSlackIntegrationsByProjectID(projectID uint) ([]*ints.SlackIntegration, error)
- DeleteSlackIntegration(integrationID uint) error
- }
- // AWSIntegrationRepository represents the set of queries on the AWS auth
- // mechanism
- type AWSIntegrationRepository interface {
- CreateAWSIntegration(am *ints.AWSIntegration) (*ints.AWSIntegration, error)
- OverwriteAWSIntegration(am *ints.AWSIntegration) (*ints.AWSIntegration, error)
- ReadAWSIntegration(projectID, id uint) (*ints.AWSIntegration, error)
- ListAWSIntegrationsByProjectID(projectID uint) ([]*ints.AWSIntegration, error)
- }
- // AzureIntegrationRepository represents the set of queries on the AWS auth
- // mechanism
- type AzureIntegrationRepository interface {
- CreateAzureIntegration(az *ints.AzureIntegration) (*ints.AzureIntegration, error)
- OverwriteAzureIntegration(az *ints.AzureIntegration) (*ints.AzureIntegration, error)
- ReadAzureIntegration(projectID, id uint) (*ints.AzureIntegration, error)
- ListAzureIntegrationsByProjectID(projectID uint) ([]*ints.AzureIntegration, error)
- }
- // GCPIntegrationRepository represents the set of queries on the GCP auth
- // mechanism
- type GCPIntegrationRepository interface {
- CreateGCPIntegration(am *ints.GCPIntegration) (*ints.GCPIntegration, error)
- ReadGCPIntegration(projectID, id uint) (*ints.GCPIntegration, error)
- ListGCPIntegrationsByProjectID(projectID uint) ([]*ints.GCPIntegration, error)
- }
- // GithubAppInstallationRepository represents the set of queries for github app installations
- type GithubAppInstallationRepository interface {
- CreateGithubAppInstallation(am *ints.GithubAppInstallation) (*ints.GithubAppInstallation, error)
- ReadGithubAppInstallationByInstallationID(gaID uint) (*ints.GithubAppInstallation, error)
- ReadGithubAppInstallationByAccountID(accountID int64) (*ints.GithubAppInstallation, error)
- ReadGithubAppInstallationByAccountIDs(accountIDs []int64) ([]*ints.GithubAppInstallation, error)
- DeleteGithubAppInstallationByAccountID(accountID int64) error
- }
- // GitlabIntegrationRepository represents the set of queries on the GitlabIntegration model
- type GitlabIntegrationRepository interface {
- CreateGitlabIntegration(gi *ints.GitlabIntegration) (*ints.GitlabIntegration, error)
- ReadGitlabIntegration(projectID, id uint) (*ints.GitlabIntegration, error)
- ListGitlabIntegrationsByProjectID(projectID uint) ([]*ints.GitlabIntegration, error)
- DeleteGitlabIntegrationByID(projectID, id uint) error
- }
- // GitlabAppOAuthIntegrationRepository represents the set of queries on the GitlabOAuthIntegration model
- type GitlabAppOAuthIntegrationRepository interface {
- CreateGitlabAppOAuthIntegration(gi *ints.GitlabAppOAuthIntegration) (*ints.GitlabAppOAuthIntegration, error)
- ReadGitlabAppOAuthIntegration(userID, projectID, integrationID uint) (*ints.GitlabAppOAuthIntegration, error)
- }
|