Documentation ¶
Index ¶
Constants ¶
View Source
const ( // CreatePostgresTable represents a query to create the Postgres repos table. CreatePostgresTable = `` /* 657-byte string literal not displayed */ // CreateSqliteTable represents a query to create the Sqlite repos table. CreateSqliteTable = `` /* 606-byte string literal not displayed */ )
View Source
const ( // CreateOrgNameIndex represents a query to create an // index on the repos table for the org and name columns. CreateOrgNameIndex = ` CREATE INDEX IF NOT EXISTS repos_org_name ON repos (org, name); ` )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EngineOpt ¶
type EngineOpt func(*engine) error
EngineOpt represents a configuration option to initialize the database engine for Repos.
func WithClient ¶
WithClient sets the gorm.io/gorm client in the database engine for Repos.
func WithEncryptionKey ¶
WithEncryptionKey sets the encryption key in the database engine for Repos.
func WithLogger ¶
WithLogger sets the github.com/sirupsen/logrus logger in the database engine for Repos.
func WithSkipCreation ¶
WithSkipCreation sets the skip creation logic in the database engine for Repos.
type RepoService ¶
type RepoService interface { // CreateRepoIndexes defines a function that creates the indexes for the repos table. CreateRepoIndexes() error // CreateRepoTable defines a function that creates the repos table. CreateRepoTable(string) error // CountRepos defines a function that gets the count of all repos. CountRepos() (int64, error) // CountReposForOrg defines a function that gets the count of repos by org name. CountReposForOrg(string, map[string]interface{}) (int64, error) // CountReposForUser defines a function that gets the count of repos by user ID. CountReposForUser(*library.User, map[string]interface{}) (int64, error) // CreateRepo defines a function that creates a new repo. CreateRepo(*library.Repo) error // DeleteRepo defines a function that deletes an existing repo. DeleteRepo(*library.Repo) error // GetRepo defines a function that gets a repo by ID. GetRepo(int64) (*library.Repo, error) // GetRepoForOrg defines a function that gets a repo by org and repo name. GetRepoForOrg(string, string) (*library.Repo, error) // ListRepos defines a function that gets a list of all repos. ListRepos() ([]*library.Repo, error) // ListReposForOrg defines a function that gets a list of repos by org name. ListReposForOrg(string, string, map[string]interface{}, int, int) ([]*library.Repo, int64, error) // ListReposForUser defines a function that gets a list of repos by user ID. ListReposForUser(*library.User, string, map[string]interface{}, int, int) ([]*library.Repo, int64, error) // UpdateRepo defines a function that updates an existing repo. UpdateRepo(*library.Repo) error }
RepoService represents the Vela interface for repo functions with the supported Database backends.
Click to show internal directories.
Click to hide internal directories.