Documentation
¶
Index ¶
- func AuthorizedClient(ctx context.Context, db gorpmapper.SqlExecutorWithTx, store cache.Store, ...) (sdk.VCSAuthorizedClientService, error)
- func DefaultBranch(ctx context.Context, c sdk.VCSAuthorizedClientCommon, fullname string) (sdk.VCSBranch, error)
- func DeleteForApplication(db gorp.SqlExecutor, app *sdk.Application) error
- func DeleteProjectVCSServerLink(ctx context.Context, db gorp.SqlExecutor, l *sdk.ProjectVCSServerLink) error
- func GetReposForProjectVCSServer(ctx context.Context, db gorpmapper.SqlExecutorWithTx, store cache.Store, ...) ([]sdk.VCSRepo, error)
- func InsertForApplication(db gorp.SqlExecutor, app *sdk.Application) error
- func InsertProjectVCSServerLink(ctx context.Context, db gorpmapper.SqlExecutorWithTx, ...) error
- func LoadAll(ctx context.Context, db *gorp.DbMap, store cache.Store) (map[string]sdk.VCSConfiguration, error)
- func LoadAllProjectVCSServerLinksByProjectID(ctx context.Context, db gorp.SqlExecutor, projectID int64) ([]sdk.ProjectVCSServerLink, error)
- func LoadAllProjectVCSServerLinksByProjectKey(ctx context.Context, db gorp.SqlExecutor, projectKey string) ([]sdk.ProjectVCSServerLink, error)
- func LoadLinkedApplicationNames(db gorp.SqlExecutor, projectKey, rmName string) (sdk.IDNames, error)
- func LoadProjectVCSServerLinkByProjectKeyAndVCSServerName(ctx context.Context, db gorp.SqlExecutor, projectKey, rmName string) (sdk.ProjectVCSServerLink, error)
- func LoadProjectVCSServerLinksData(ctx context.Context, db gorp.SqlExecutor, projectVCSServerLinkID int64, ...) ([]sdk.ProjectVCSServerLinkData, error)
- func NewVCSServerConsumer(db gorpmapper.SqlExecutorWithTx, store cache.Store, name string) (sdk.VCSServerService, error)
- func ReceiveEvents(ctx context.Context, DBFunc func() *gorp.DbMap, store cache.Store)
- func RetryEvent(e *sdk.Event, err error, store cache.Store) error
- func UpdateProjectVCSServerLink(ctx context.Context, db gorpmapper.SqlExecutorWithTx, ...) error
- type Options
- type PollingInfos
- type WebhooksInfos
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthorizedClient ¶
func AuthorizedClient(ctx context.Context, db gorpmapper.SqlExecutorWithTx, store cache.Store, projectKey string, vcsName string) (sdk.VCSAuthorizedClientService, error)
AuthorizedClient returns an implementation of AuthorizedClient wrapping calls to vcs uService
func DefaultBranch ¶
func DefaultBranch(ctx context.Context, c sdk.VCSAuthorizedClientCommon, fullname string) (sdk.VCSBranch, error)
DefaultBranch get default branch from given repository
func DeleteForApplication ¶
func DeleteForApplication(db gorp.SqlExecutor, app *sdk.Application) error
DeleteForApplication removes association between a repositories manager and an application.
func DeleteProjectVCSServerLink ¶
func DeleteProjectVCSServerLink(ctx context.Context, db gorp.SqlExecutor, l *sdk.ProjectVCSServerLink) error
func InsertForApplication ¶
func InsertForApplication(db gorp.SqlExecutor, app *sdk.Application) error
InsertForApplication associates a repositories manager with an application.
func InsertProjectVCSServerLink ¶
func InsertProjectVCSServerLink(ctx context.Context, db gorpmapper.SqlExecutorWithTx, l *sdk.ProjectVCSServerLink) error
func LoadAll ¶
func LoadAll(ctx context.Context, db *gorp.DbMap, store cache.Store) (map[string]sdk.VCSConfiguration, error)
LoadAll Load all RepositoriesManager from the database
func LoadAllProjectVCSServerLinksByProjectID ¶
func LoadAllProjectVCSServerLinksByProjectID(ctx context.Context, db gorp.SqlExecutor, projectID int64) ([]sdk.ProjectVCSServerLink, error)
func LoadAllProjectVCSServerLinksByProjectKey ¶
func LoadAllProjectVCSServerLinksByProjectKey(ctx context.Context, db gorp.SqlExecutor, projectKey string) ([]sdk.ProjectVCSServerLink, error)
func LoadLinkedApplicationNames ¶
func LoadLinkedApplicationNames(db gorp.SqlExecutor, projectKey, rmName string) (sdk.IDNames, error)
LoadLinkedApplicationNames loads applications which are linked with this repository manager name.
func LoadProjectVCSServerLinkByProjectKeyAndVCSServerName ¶
func LoadProjectVCSServerLinkByProjectKeyAndVCSServerName(ctx context.Context, db gorp.SqlExecutor, projectKey, rmName string) (sdk.ProjectVCSServerLink, error)
DEPRECATED
func LoadProjectVCSServerLinksData ¶
func LoadProjectVCSServerLinksData(ctx context.Context, db gorp.SqlExecutor, projectVCSServerLinkID int64, opts ...gorpmapping.GetOptionFunc) ([]sdk.ProjectVCSServerLinkData, error)
func NewVCSServerConsumer ¶
func NewVCSServerConsumer(db gorpmapper.SqlExecutorWithTx, store cache.Store, name string) (sdk.VCSServerService, error)
NewVCSServerConsumer returns a sdk.VCSServer wrapping vcs µServices calls
func ReceiveEvents ¶
ReceiveEvents has to be launched as a goroutine.
func RetryEvent ¶
RetryEvent retries the events
func UpdateProjectVCSServerLink ¶
func UpdateProjectVCSServerLink(ctx context.Context, db gorpmapper.SqlExecutorWithTx, l *sdk.ProjectVCSServerLink) error
Types ¶
type PollingInfos ¶
type PollingInfos struct {
PollingSupported bool `json:"polling_supported"`
PollingDisabled bool `json:"polling_disabled"`
}
PollingInfos is a set of info about polling functions
func GetPollingInfos ¶
func GetPollingInfos(ctx context.Context, c sdk.VCSAuthorizedClientService, prj sdk.Project) (PollingInfos, error)
GetPollingInfos returns polling_supported and polling_disabled for a vcs server
type WebhooksInfos ¶
type WebhooksInfos struct {
WebhooksSupported bool `json:"webhooks_supported"`
WebhooksDisabled bool `json:"webhooks_disabled"`
GerritHookDisabled bool `json:"gerrithook_disabled"`
Icon string `json:"webhooks_icon"`
Events []string `json:"events"`
}
WebhooksInfos is a set of info about webhooks
func GetWebhooksInfos ¶
func GetWebhooksInfos(ctx context.Context, c sdk.VCSAuthorizedClientService) (WebhooksInfos, error)
GetWebhooksInfos returns webhooks_supported, webhooks_disabled, webhooks_creation_supported, webhooks_creation_disabled for a vcs server