github.com/olljanat/moby@v1.13.1/api/server/router/build/backend.go (about)

     1  package build
     2  
     3  import (
     4  	"io"
     5  
     6  	"github.com/docker/docker/api/types"
     7  	"github.com/docker/docker/api/types/backend"
     8  	"golang.org/x/net/context"
     9  )
    10  
    11  // Backend abstracts an image builder whose only purpose is to build an image referenced by an imageID.
    12  type Backend interface {
    13  	// Build builds a Docker image referenced by an imageID string.
    14  	//
    15  	// Note: Tagging an image should not be done by a Builder, it should instead be done
    16  	// by the caller.
    17  	//
    18  	// TODO: make this return a reference instead of string
    19  	BuildFromContext(ctx context.Context, src io.ReadCloser, remote string, buildOptions *types.ImageBuildOptions, pg backend.ProgressWriter) (string, error)
    20  }