Documentation ¶
Index ¶
- func AuthorizedClient(db database.Querier, projectKey, rmName string) (sdk.RepositoriesManagerClient, error)
- func CheckApplicationIsAttached(db database.Querier, rmName, projectKey, applicationName string) (bool, error)
- func DeleteForApplication(db database.QueryExecuter, projectKey string, app *sdk.Application) error
- func DeleteForProject(db database.QueryExecuter, rm *sdk.RepositoriesManager, project *sdk.Project) error
- func Initialize(secretClient secretbackend.Driver, keysDirectory, uiBaseURL, apiBaseURL string) error
- func Insert(db *sql.DB, rm *sdk.RepositoriesManager) error
- func InsertForApplication(db database.QueryExecuter, app *sdk.Application, projectKey string) error
- func InsertForProject(db database.QueryExecuter, rm *sdk.RepositoriesManager, projectKey string) (time.Time, error)
- func LoadAll(db *sql.DB) ([]sdk.RepositoriesManager, error)
- func LoadAllForProject(db *sql.DB, projectkey string) ([]sdk.RepositoriesManager, error)
- func LoadByID(db *sql.DB, id int64) (*sdk.RepositoriesManager, error)
- func LoadByName(db database.Querier, repositoriesManagerName string) (*sdk.RepositoriesManager, error)
- func LoadForProject(db database.Querier, projectkey, repositoriesManagerName string) (*sdk.RepositoriesManager, error)
- func LoadFromApplicationByID(db database.Querier, applicationID int64) (string, *sdk.RepositoriesManager, error)
- func New(t sdk.RepositoriesManagerType, id int64, name, URL string, ...) (*sdk.RepositoriesManager, error)
- func ReceiveEvents()
- func RepositoriesCacheLoader(delay int)
- func SaveDataForProject(db *sql.DB, rm *sdk.RepositoriesManager, projectKey string, ...) error
- func Update(db *sql.DB, rm *sdk.RepositoriesManager) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthorizedClient ¶
func AuthorizedClient(db database.Querier, projectKey, rmName string) (sdk.RepositoriesManagerClient, error)
AuthorizedClient returns instance of client with the granted token
func CheckApplicationIsAttached ¶
func CheckApplicationIsAttached(db database.Querier, rmName, projectKey, applicationName string) (bool, error)
CheckApplicationIsAttached check if the application is properly attached
func DeleteForApplication ¶
func DeleteForApplication(db database.QueryExecuter, projectKey string, app *sdk.Application) error
DeleteForApplication removes association between a repositories manager and an application it deletes the corresponding line in repositories_manager_project
func DeleteForProject ¶
func DeleteForProject(db database.QueryExecuter, rm *sdk.RepositoriesManager, project *sdk.Project) error
DeleteForProject removes association between a repositories manager and a project it deletes the corresponding line in repositories_manager_project
func Initialize ¶
func Initialize(secretClient secretbackend.Driver, keysDirectory, uiBaseURL, apiBaseURL string) error
Initialize initialize private keys stored in Vault CDS private keys in repositories manager have to be stored as secrets in Vault For instance for a repositories manager named "github.com/ovh", the private key is stored in a secret name "repositoriesmanager-secrets-github.com/ovh-privateKey"
func Insert ¶
func Insert(db *sql.DB, rm *sdk.RepositoriesManager) error
Insert insert a new InsertRepositoriesManager in database FIXME: Invalid name: it can only contain lowercase letters, numbers, dots or dashes, and run between 1 and 99 characters long not valid
func InsertForApplication ¶
func InsertForApplication(db database.QueryExecuter, app *sdk.Application, projectKey string) error
InsertForApplication associates a repositories manager with an application
func InsertForProject ¶
func InsertForProject(db database.QueryExecuter, rm *sdk.RepositoriesManager, projectKey string) (time.Time, error)
InsertForProject associates a repositories manager with a project
func LoadAll ¶
func LoadAll(db *sql.DB) ([]sdk.RepositoriesManager, error)
LoadAll Load all RepositoriesManager from the database
func LoadAllForProject ¶
LoadAllForProject Load RepositoriesManager for a project from the database
func LoadByName ¶
func LoadByName(db database.Querier, repositoriesManagerName string) (*sdk.RepositoriesManager, error)
LoadByName loads the specified RepositoriesManager from the database
func LoadForProject ¶
func LoadForProject(db database.Querier, projectkey, repositoriesManagerName string) (*sdk.RepositoriesManager, error)
LoadForProject load the specified repositorymanager for the project
func LoadFromApplicationByID ¶ added in v0.4.0
func LoadFromApplicationByID(db database.Querier, applicationID int64) (string, *sdk.RepositoriesManager, error)
LoadFromApplicationByID returns repositoryFullname, repoManager for an application
func New ¶
func New(t sdk.RepositoriesManagerType, id int64, name, URL string, args map[string]string, consumerData string) (*sdk.RepositoriesManager, error)
New instanciate a new RepositoriesManager, act as a Factory with all supported repositories manager
func ReceiveEvents ¶ added in v0.4.0
func ReceiveEvents()
ReceiveEvents has to be launched as a goroutine.
func RepositoriesCacheLoader ¶
func RepositoriesCacheLoader(delay int)
RepositoriesCacheLoader has to be launched as a goroutine. It will scan all repositories manager for all projects and start preloading repositories
func SaveDataForProject ¶
func SaveDataForProject(db *sql.DB, rm *sdk.RepositoriesManager, projectKey string, data map[string]string) error
SaveDataForProject updates the jsonb value computed at the end the oauth process
Types ¶
This section is empty.