github.com/skippbox/kompose-origin@v0.0.0-20160524133224-16a9dca7bac2/project/interface.go (about)

     1  package project
     2  
     3  import (
     4  	"golang.org/x/net/context"
     5  
     6  	"github.com/docker/libcompose/config"
     7  	"github.com/docker/libcompose/project/events"
     8  	"github.com/docker/libcompose/project/options"
     9  )
    10  
    11  // APIProject is an interface defining the methods a libcompose project should implement.
    12  type APIProject interface {
    13  	events.Notifier
    14  	events.Emitter
    15  
    16  	Build(ctx context.Context, options options.Build, sevice ...string) error
    17  	Create(ctx context.Context, options options.Create, services ...string) error
    18  	Delete(ctx context.Context, options options.Delete, services ...string) error
    19  	Down(ctx context.Context, options options.Down, services ...string) error
    20  	Kill(ctx context.Context, signal string, services ...string) error
    21  	Log(ctx context.Context, follow bool, services ...string) error
    22  	Pause(ctx context.Context, services ...string) error
    23  	Ps(ctx context.Context, onlyID bool, services ...string) (InfoSet, error)
    24  	// FIXME(vdemeester) we could use nat.Port instead ?
    25  	Port(ctx context.Context, index int, protocol, serviceName, privatePort string) (string, error)
    26  	Pull(ctx context.Context, services ...string) error
    27  	Restart(ctx context.Context, timeout int, services ...string) error
    28  	Run(ctx context.Context, serviceName string, commandParts []string) (int, error)
    29  	Scale(ctx context.Context, timeout int, servicesScale map[string]int) error
    30  	Start(ctx context.Context, services ...string) error
    31  	Stop(ctx context.Context, timeout int, services ...string) error
    32  	Unpause(ctx context.Context, services ...string) error
    33  	Up(ctx context.Context, options options.Up, services ...string) error
    34  
    35  	Parse() error
    36  	CreateService(name string) (Service, error)
    37  	AddConfig(name string, config *config.ServiceConfig) error
    38  	Load(bytes []byte) error
    39  }