connections

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package connections manages connections between VCS repositories and OTF resources, e.g. workspaces, modules.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectOptions

type ConnectOptions struct {
	VCSProviderID resource.ID // vcs provider of repo
	ResourceID    resource.ID // ID of OTF resource to connect.
	RepoPath      string
}

type Connection

type Connection struct {
	VCSProviderID resource.ID
	Repo          string
}

Connection is a connection between a VCS repo and an OTF resource.

type DisconnectOptions

type DisconnectOptions struct {
	ResourceID resource.ID // ID of OTF resource to disconnect
}

type Options

type Options struct {
	logr.Logger
	*sql.DB

	VCSProviderService *vcsprovider.Service
	RepoHooksService   *repohooks.Service
}

type Service

type Service struct {
	logr.Logger
	// contains filtered or unexported fields
}

func NewService

func NewService(ctx context.Context, opts Options) *Service

func (*Service) Connect

func (s *Service) Connect(ctx context.Context, opts ConnectOptions) (*Connection, error)

Connect an OTF resource to a VCS repo.

func (*Service) Disconnect

func (s *Service) Disconnect(ctx context.Context, opts DisconnectOptions) error

Disconnect resource from repo

type SynchroniseOptions

type SynchroniseOptions struct {
	VCSProviderID resource.ID // vcs provider of repo
	RepoPath      string
}

Jump to

Keyboard shortcuts

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