preparation

package
v0.0.0-...-11770e9 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Copyright 2022 Google LLC

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Package preparation provides functionality to extract tags, branches and commits from repository configurations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checker

type Checker interface {
	Exists(ctx context.Context, addr string, hashType string, hash plumbing.Hash) (bool, error)
}

Checker interface is used to check whether a name/hash pair already exists in storage.

type Result

type Result struct {
	Name              string
	BaseCPE           string
	CheckoutOptions   *git.CheckoutOptions
	Commit            plumbing.Hash
	Reference         plumbing.Hash
	CommitTag         string
	When              time.Time
	Type              string
	Addr              string
	FileExts          []string
	EmptyBucketBitmap []byte
	FileCount         int
}

Result is the data structure returned by the stage.

type Stage

type Stage struct {
	Checker Checker
	RepoHdl *storage.BucketHandle
	Output  *pubsub.Topic
}

Stage holds the data types necessary to process repository configuration.

func (*Stage) Run

func (s *Stage) Run(ctx context.Context, cfgs []*config.RepoConfig) error

Run runs the stage and outputs Result data types to the results channel.

Jump to

Keyboard shortcuts

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