server

package module
v0.0.0-...-34401f6 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2025 License: Apache-2.0 Imports: 27 Imported by: 0

README

Local development environment

This repository provides a Makefile for setting up a local development environment with MinIO and Vault.

Default setup

To start the local development environment with default settings, simply run:

make .run

This command will:

  1. Start a MinIO server with a default bucket.
  2. Start a Vault server in development mode.
  3. Configure the Vault plugin with default parameters.
Default parameters
Parameter Default Value Description
PROJECT_NAME trdl-test-project1 The name of the project/bucket in MinIO.
SIGNATURES_COUNT 0 Number of required verified signatures.
GIT_REPO_URL https://github.com/werf/trdl-test-project Git repository URL for TRDL metadata.
GIT_TRDL_PATH p1/trdl.yaml Path to TRDL configuration in the repository.
GIT_TRDL_CHANNELS_PATH p1/trdl_channels.yaml Path to TRDL channels configuration.

Custom setup

You can override default values by passing them as arguments:

make .run PROJECT_NAME=my-custom-project SIGNATURES_COUNT=2 GIT_REPO_URL=https://github.com/example/repo GIT_TRDL_PATH=trdl.yaml GIT_TRDL_CHANNELS_PATH=trdl_channels.yaml

This will:

  • Use my-custom-project as the bucket/project name.
  • Require 2 verified signatures.
  • Set GIT_REPO_URL to https://github.com/example/repo.
  • Set GIT_TRDL_PATH to the path to trdl.yaml in your GIT_REPO_URL
  • Set GIT_TRDL_CHANNELS_PATH to the path to trdl_channels.yaml in your GIT_REPO_URL

Cleaning up

To remove all containers and clean up data, run:

make clean

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SystemClock util.Clock = util.NewSystemClock()

Functions

func Factory

func Factory(ctx context.Context, conf *logical.BackendConfig) (logical.Backend, error)

func GetTrdlChannelsConfig

func GetTrdlChannelsConfig(gitRepo *git.Repository, trdlChannelsPath string) (*config.TrdlChannels, error)

func NewErrIncorrectChannelName

func NewErrIncorrectChannelName(chnl string) error

func NewErrPublishingNonExistingReleases

func NewErrPublishingNonExistingReleases(releases []string) error

func ValidatePublishConfig

func ValidatePublishConfig(ctx context.Context, publisher publisher.Interface, publisherRepository publisher.RepositoryInterface, config *config.TrdlChannels, logger hclog.Logger) error

func ValidateReleaseVersion

func ValidateReleaseVersion(releaseVersion string) error

Types

type Backend

type Backend struct {
	*framework.Backend
	TasksManager    tasks_manager.ActionsInterface
	Publisher       publisher.Interface
	BackendPeriodic BackendPeriodicInterface
}

func NewBackend

func NewBackend(logger hclog.Logger) (*Backend, error)

func (*Backend) InitPaths

func (b *Backend) InitPaths(modules ...BackendModuleInterface)

func (*Backend) InitPeriodicFunc

func (b *Backend) InitPeriodicFunc(modules ...BackendModuleInterface)

func (*Backend) Periodic

func (b *Backend) Periodic(ctx context.Context, req *logical.Request) error

type BackendModuleInterface

type BackendModuleInterface interface {
	Paths() []*framework.Path
	PeriodicFunc(ctx context.Context, req *logical.Request) error
}

type BackendPeriodicInterface

type BackendPeriodicInterface interface {
	Periodic(ctx context.Context, req *logical.Request) error
}

Jump to

Keyboard shortcuts

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