vcs_connection

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BitbucketConnection

type BitbucketConnection struct {
}

type GitConnection

type GitConnection struct {
}

type GithubConnection

type GithubConnection struct {
	Type                   string `json:"type"`
	PersonalAccessToken    string `json:"-"`
	ApplicationId          string `json:"application_id,omitempty"`
	ApplicationSecret      string `json:"-"`
	OauthApplicationId     string `json:"oauth_application_id,omitempty"`
	OauthApplicationSecret string `json:"-"`
}

type GitlabConnection

type GitlabConnection struct {
}

type Repository added in v1.2.1

type Repository interface {
	List(organizationId uuid.UUID) ([]VcsConnection, error)
	Get(organizationId uuid.UUID, connectionId uuid.UUID) (*VcsConnection, error)
	GetByWebhookId(webhookId uuid.UUID) (*VcsConnection, error)
	Create(connection *VcsConnection) (*VcsConnection, error)
	Delete(organizationId uuid.UUID, connectionId uuid.UUID) error
}

func New added in v1.2.1

func New(db *gorm.DB) Repository

type RepositoryImpl added in v1.2.1

type RepositoryImpl struct {
	Db *gorm.DB
}

func (*RepositoryImpl) Create added in v1.2.1

func (vcr *RepositoryImpl) Create(connection *VcsConnection) (*VcsConnection, error)

func (*RepositoryImpl) Delete added in v1.2.1

func (vcr *RepositoryImpl) Delete(organizationId uuid.UUID, connectionId uuid.UUID) error

func (*RepositoryImpl) Get added in v1.2.1

func (vcr *RepositoryImpl) Get(organizationId uuid.UUID, connectionId uuid.UUID) (*VcsConnection, error)

func (*RepositoryImpl) GetByWebhookId added in v1.7.0

func (vcr *RepositoryImpl) GetByWebhookId(webhookId uuid.UUID) (*VcsConnection, error)

func (*RepositoryImpl) List added in v1.2.1

func (vcr *RepositoryImpl) List(organizationId uuid.UUID) ([]VcsConnection, error)

type VcsConnection

type VcsConnection struct {
	ID        uuid.UUID  `gorm:"type:uuid;default:gen_random_uuid()" json:"id"`
	CreatedAt time.Time  `json:"created_at"`
	UpdatedAt time.Time  `json:"updated_at"`
	DeletedAt *time.Time `sql:"index" json:"deleted_at"`
	Name      string     `json:"name"`
	// One of github, gitlab, bitbucket, or git
	Provider       string                    `json:"provider"`
	Github         GithubConnection          `gorm:"embedded;embeddedPrefix:github_" json:"github,omitempty"`
	Gitlab         GitlabConnection          `gorm:"embedded;embeddedPrefix:gitlab_" json:"gitlab,omitempty"`
	Bitbucket      BitbucketConnection       `gorm:"embedded;embeddedPrefix:bitbucket_" json:"bitbucket,omitempty"`
	Git            GitConnection             `gorm:"embedded;embeddedPrefix:git_" json:"git,omitempty"`
	OrganizationID uuid.UUID                 `json:"organization_id"`
	Organization   organization.Organization `json:"-"`

	Webhook Webhook `gorm:"embedded;embeddedPrefix:webhook_" json:"webhook,omitempty"`
}

type Webhook added in v1.7.0

type Webhook struct {
	Id     uuid.UUID `json:"id"`
	Secret string    `json:"secret"`
}

Jump to

Keyboard shortcuts

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