mock

package
v0.0.0-...-b2e0f1d Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleAdditionalFiles

func HandleAdditionalFiles(mux *http.ServeMux, files MockRepoAdditionalFiles, middle middleware)

func NewZipArchivesMux

func NewZipArchivesMux(t *testing.T, callback http.HandlerFunc, archives ...RepoArchive) *http.ServeMux

Types

type Image

type Image struct {
	RawDigest string
	DigestErr error
	EnsureErr error
	UidGid    docker.UIDGID
	UidGidErr error
}

func (*Image) Digest

func (image *Image) Digest(ctx context.Context) (string, error)

func (*Image) Ensure

func (image *Image) Ensure(ctx context.Context) error

func (*Image) UIDGID

func (image *Image) UIDGID(ctx context.Context) (docker.UIDGID, error)

type ImageCache

type ImageCache struct {
	Images map[string]docker.Image
}

func (*ImageCache) Ensure

func (c *ImageCache) Ensure(ctx context.Context, name string) (docker.Image, error)

func (*ImageCache) Get

func (c *ImageCache) Get(name string) docker.Image

type LogNoOpManager

type LogNoOpManager struct{}

func (LogNoOpManager) AddTask

func (lm LogNoOpManager) AddTask(string) (log.TaskLogger, error)

func (LogNoOpManager) Close

func (lm LogNoOpManager) Close() error

func (LogNoOpManager) LogFiles

func (lm LogNoOpManager) LogFiles() []string

type MockRepoAdditionalFiles

type MockRepoAdditionalFiles struct {
	RepoName        string
	Commit          string
	AdditionalFiles map[string]string
}

type Progress

type Progress struct {
	Calls []ProgressCall
}

func (*Progress) Callback

func (p *Progress) Callback() func(int, int)

type ProgressCall

type ProgressCall struct {
	Done  int
	Total int
}

type RepoArchive

type RepoArchive struct {
	RepoName string
	Commit   string
	Path     string
	Files    map[string]string
}

type TaskNoOpLogger

type TaskNoOpLogger struct{}

func (TaskNoOpLogger) Close

func (tl TaskNoOpLogger) Close() error

func (TaskNoOpLogger) Log

func (tl TaskNoOpLogger) Log(string)

func (TaskNoOpLogger) Logf

func (tl TaskNoOpLogger) Logf(string, ...interface{})

func (TaskNoOpLogger) MarkErrored

func (tl TaskNoOpLogger) MarkErrored()

func (TaskNoOpLogger) Path

func (tl TaskNoOpLogger) Path() string

func (TaskNoOpLogger) PrefixWriter

func (tl TaskNoOpLogger) PrefixWriter(prefix string) io.Writer

Jump to

Keyboard shortcuts

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