pkg

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2023 License: Apache-2.0 Imports: 23 Imported by: 1

Documentation

Index

Constants

View Source
const CLONE_DIRECTORY = "glrepos"
View Source
const ENCRYPT_DIRECTORY = "encrypted"
View Source
const TAR_DIRECTORY = "tars"

Variables

This section is empty.

Functions

func GetGraphqlRaw

func GetGraphqlRaw(ctx context.Context, gqlUrl, gqlFile, gqlUsername, gqlPassowrd string) (map[string]interface{}, error)

create graphql query request and perform query with retry logic return is unaltered query response

Types

type Apps

type Apps struct {
	CodeComponentGitSyncs []CodeComponents `yaml:"apps_v1"`
}

type CodeComponents

type CodeComponents struct {
	GitlabSyncs []GitlabSync `yaml:"codeComponents"`
}

type DecodedKey

type DecodedKey struct {
	Group        string `json:"group"`
	ProjectName  string `json:"project_name"`
	CommitSHA    string `json:"commit_sha"`
	LocalBranch  string `json:"local_branch"`
	RemoteBranch string `json:"remote_branch"`
}

type GitTarget

type GitTarget struct {
	ProjectName string `yaml:"name"`
	Group       string `yaml:"group"`
	Branch      string `yaml:"branch"`
}

type GitlabSync

type GitlabSync struct {
	GitSync *SyncConfig `yaml:"gitlabSync"`
}

type SyncConfig

type SyncConfig struct {
	Source      GitTarget `yaml:"sourceProject"`
	Destination GitTarget `yaml:"destinationProject"`
	// contains filtered or unexported fields
}

type Uploader

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

func NewUploader

func NewUploader(
	ctx context.Context,
	awsAccessKey,
	awsSecretKey,
	awsRegion,
	bucket,
	glURL,
	glUsername,
	glToken,
	gqlURL,
	gqlFile,
	gqlUsername,
	gqlPassword,
	pubKey,
	workdir string) (*Uploader, error)

func (*Uploader) Run

func (u *Uploader) Run(ctx context.Context, dryRun bool) error

Run executes steps to reconcile s3 bucket with existing state of gitlab projects

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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