smudge

package
v15.1.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigEnvironmentKey = "GITALY_LFS_SMUDGE_CONFIG"

ConfigEnvironmentKey is the key that gitaly-lfs-smudge expects the configuration to exist at. The value of this environment variable should be the JSON-encoded `Config` struct.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// GlRepository is the GitLab repository identifier that is required so that we can query
	// the corresponding Rails' repository for the respective LFS contents.
	GlRepository string `json:"gl_repository"`
	// Gitlab contains configuration so that we can connect to Rails in order to retrieve LFS
	// contents.
	Gitlab config.Gitlab `json:"gitlab"`
	// TLS contains configuration for setting up a TLS-encrypted connection to Rails.
	TLS config.TLS `json:"tls"`
}

Config is the configuration used to run gitaly-lfs-smudge. It must be injected via environment variables.

func ConfigFromEnvironment

func ConfigFromEnvironment(environment []string) (Config, error)

ConfigFromEnvironment loads the Config structure from the set of given environment variables.

func (Config) Environment

func (c Config) Environment() (string, error)

Environment encodes the given configuration as an environment variable that can be injected into `gitaly-lfs-smudge`.

Jump to

Keyboard shortcuts

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