repositoriesmanager

package
v0.53.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2023 License: BSD-3-Clause Imports: 21 Imported by: 35

Documentation

Index

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(ctx context.Context, db gorp.SqlExecutor, l *sdk.ProjectVCSServerLink) error

func GetReposForProjectVCSServer

func GetReposForProjectVCSServer(ctx context.Context, db gorpmapper.SqlExecutorWithTx, 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 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

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

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