repositoriesmanager

package
v0.54.1 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: BSD-3-Clause Imports: 20 Imported by: 30

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthorizedClient

func AuthorizedClient(ctx context.Context, db gorp.SqlExecutor, 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 GetReposForProjectVCSServer

func GetReposForProjectVCSServer(ctx context.Context, db gorp.SqlExecutor, store cache.Store, proj sdk.Project, vcsServerName string, opts Options) ([]sdk.VCSRepo, error)

func InsertForApplication

func InsertForApplication(db gorp.SqlExecutor, app *sdk.Application) error

InsertForApplication associates a repositories manager with an application.

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 ReceiveEvents

func ReceiveEvents(ctx context.Context, DBFunc func() *gorp.DbMap, store cache.Store, cdsUIURL string)

ReceiveEvents has to be launched as a goroutine.

func RetryEvent

func RetryEvent(e *sdk.Event, err error, store cache.Store) error

RetryEvent retries the events

Types

type Options

type Options struct {
	Sync bool
}

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

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

GetWebhooksInfos returns webhooks_supported, webhooks_disabled, webhooks_creation_supported, webhooks_creation_disabled for a vcs server

Jump to

Keyboard shortcuts

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