Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DriverTypeFilter indicates that the smudge filter is to be run once per object. This is // the current default but will be phased out eventually in favor of DriverTypeProcess. DriverTypeFilter = DriverType(0) // DriverTypeProcess is a long-running smudge filter that can process multiple objects in // one session. See gitattributes(5), "Long Running Filter Process". DriverTypeProcess = DriverType(1) )
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"` // DriverType is the type of the smudge driver that should be used. DriverType DriverType `json:"driver_type"` }
Config is the configuration used to run gitaly-lfs-smudge. It must be injected via environment variables.
func ConfigFromEnvironment ¶
ConfigFromEnvironment loads the Config structure from the set of given environment variables.
func (Config) Environment ¶
Environment encodes the given configuration as an environment variable that can be injected into `gitaly-lfs-smudge`.
func (Config) GitConfiguration ¶
GitConfiguration returns the Git configuration required to run the smudge filter.
Click to show internal directories.
Click to hide internal directories.