interfaces

package
v0.0.0-...-42bff0a Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Name of image: "sourcegraph/server"
	Image string
	// Optional: registry url. Provides default.
	Registry    string `default:"https://registry.hub.docker.com/v1/repositories/"`
	Blacklist   []string
	Whitelist   string
	StripPrefix string `toml:"strip_prefix"`
	StripSuffix string `toml:"strip_suffix"`
}

Config is user provided config.toml

type Context

type Context struct {
	// Parsed config for app run.
	Config Config
	// We provide a HttpClient instance, so that we can inject mocks.
	HttpClient HTTPClient
	// Global loggeer instance.
	Logger zerolog.Logger
}

Context is the global context.

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

HTTPClient interface, used for mocks.

type Tag

type Tag struct {
	Name  string
	Layer string
}

Tag is a Docker Hub JSON element.

Jump to

Keyboard shortcuts

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