mirror of
				https://github.com/docker/compose.git
				synced 2025-11-04 05:34:09 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			32 lines
		
	
	
		
			924 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
		
			924 B
		
	
	
	
		
			Go
		
	
	
	
	
	
package cloud
 | 
						|
 | 
						|
import (
 | 
						|
	"context"
 | 
						|
 | 
						|
	"github.com/docker/api/errdefs"
 | 
						|
)
 | 
						|
 | 
						|
// Service cloud specific services
 | 
						|
type Service interface {
 | 
						|
	// Login login to cloud provider
 | 
						|
	Login(ctx context.Context, params map[string]string) error
 | 
						|
	// Login login to cloud provider
 | 
						|
	CreateContextData(ctx context.Context, params map[string]string) (contextData interface{}, description string, err error)
 | 
						|
}
 | 
						|
 | 
						|
// NotImplementedCloudService to use for backend that don't provide cloud services
 | 
						|
func NotImplementedCloudService() (Service, error) {
 | 
						|
	return notImplementedCloudService{}, nil
 | 
						|
}
 | 
						|
 | 
						|
type notImplementedCloudService struct {
 | 
						|
}
 | 
						|
 | 
						|
func (cs notImplementedCloudService) Login(ctx context.Context, params map[string]string) error {
 | 
						|
	return errdefs.ErrNotImplemented
 | 
						|
}
 | 
						|
 | 
						|
func (cs notImplementedCloudService) CreateContextData(ctx context.Context, params map[string]string) (interface{}, string, error) {
 | 
						|
	return nil, "", errdefs.ErrNotImplemented
 | 
						|
}
 |