Documentation
¶
Index ¶
- func New(options ...Option) http.Handler
- type Option
- func CacheDir(dir string) Option
- func CustomVCS(prefix string, cmd string) Option
- func Git(prefix, key, password string) Option
- func GitDir(dir string) Option
- func GitWithEphemeralTags(prefix, key, password string) Option
- func Log(log logger) Option
- func Memory(log logger, limit int64) Option
- func VCSWorkers(n int) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Option ¶
type Option func(*api)
Option configures an API handler.
func Git ¶
Git configures API to use a specific git client when trying to download a repository with the given prefix. Auth string can be a path to the SSK key, or a colon-separated username:password string.
func GitWithEphemeralTags ¶
GitWithEphemeralTags configures API to use a specific git client when trying to download a repository with the given prefix. Auth string can be a path to the SSK key, or a colon-separated username:password string.
func Log ¶
func Log(log logger) Option
Log configures API to use a specific logger function, such as log.Println, testing.T.Log or any other custom logger.
func VCSWorkers ¶
VCSWorkers configures API to use at most n parallel workers when fetching from the VCS. The reason to restrict number of workers is to limit their memory usage.