sync

package
v1.0.0-beta.5 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	ID       string `json:"app_id"`
	Name     string `json:"name"`
	Provider string `json:"vcs_provider"`
}

type DeepSource

type DeepSource struct {
	Host url.URL
}

type Payload

type Payload struct {
	RunnerID      string `json:"runner_id"`
	BaseURL       string `json:"base_url"`
	ClientID      string `json:"client_id"`
	ClientSecret  string `json:"client_secret"`
	WebhookSecret string `json:"webhook_secret"`
	Apps          []App  `json:"apps"`
}

type Runner

type Runner struct {
	ID            string
	Host          url.URL
	ClientID      string
	ClientSecret  string
	WebhookSecret string
}

type Signer

type Signer interface {
	GenerateToken(issuer string, scope []string, claims map[string]interface{}, expiry time.Duration) (string, error)
}

type Syncer

type Syncer struct {
	// contains filtered or unexported fields
}

func New

func New(deepsource *DeepSource, runner *Runner, apps []App, signer Signer, client *http.Client) *Syncer

func (*Syncer) Sync

func (s *Syncer) Sync() error

Jump to

Keyboard shortcuts

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