providers

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DummyProvider added in v0.0.67

type DummyProvider struct {
	Client *http.Client
}

func (*DummyProvider) Fetch added in v0.0.67

func (h *DummyProvider) Fetch(ctx context.Context, toFetch Result) (io.Reader, int, error)

func (*DummyProvider) Resolve added in v0.0.67

func (h *DummyProvider) Resolve(ctx context.Context, request *Request) (Result, error)

type HttpProvider

type HttpProvider struct {
	Client *http.Client
}

func (*HttpProvider) Fetch

func (h *HttpProvider) Fetch(ctx context.Context, toFetch Result) (io.Reader, int, error)

func (*HttpProvider) Resolve

func (h *HttpProvider) Resolve(ctx context.Context, request *Request) (Result, error)

type MinepkgProvider

type MinepkgProvider struct {
	Client *api.MinepkgAPI
}

func (*MinepkgProvider) Fetch

func (m *MinepkgProvider) Fetch(ctx context.Context, toFetch Result) (io.Reader, int, error)

func (*MinepkgProvider) Resolve

func (m *MinepkgProvider) Resolve(ctx context.Context, request *Request) (Result, error)

type Provider

type Provider interface {
	Resolve(ctx context.Context, request *Request) (Result, error)
	Fetch(ctx context.Context, toFetch Result) (io.Reader, int, error)
}

type Request

type Request struct {
	Dependency   *manifest.InterpretedDependency
	Requirements manifest.PlatformLock
	Root         *manifest.DependencyLock
	// contains filtered or unexported fields
}

type Result

type Result interface {
	Lock() *manifest.DependencyLock
	Dependencies() []*manifest.InterpretedDependency
}

Jump to

Keyboard shortcuts

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