docker

package
v0.0.0-...-7f1f14d Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2025 License: MIT Imports: 39 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigureServer

func ConfigureServer(ctx context.Context, client *client.Client) error

func CreateClientFromConfig

func CreateClientFromConfig(config *config.ProjectConfig) (*client.Client, error)

func Deploy

func Deploy(ctx context.Context, client *client.Client, projectConfig *config.ProjectConfig, version string) error

func DestroyProject

func DestroyProject(ctx context.Context, client *client.Client, name string) error

func FindProjectContainer

func FindProjectContainer(ctx context.Context, client *client.Client, projectName, service string) (string, error)

func ListProjectSecrets

func ListProjectSecrets(kv *KvClient, name string) (map[string]string, error)

func ProjectDeleteService

func ProjectDeleteService(ctx context.Context, client *client.Client, cfg *config.ProjectConfig, serviceName string) error

func PullImageIfNotThere

func PullImageIfNotThere(ctx context.Context, client *client.Client, imageName string) error

func RunCronjobCommand

func RunCronjobCommand(ctx context.Context, client *client.Client, config *config.ProjectConfig, args []string) error

func SetProjectSecrets

func SetProjectSecrets(kv *KvClient, name string, secrets map[string]string) error

func VersionCurrentlyActive

func VersionCurrentlyActive(ctx context.Context, client *client.Client, cfg *config.ProjectConfig) (string, error)

func VersionDrain

func VersionDrain(ctx context.Context, client *client.Client, cfg *config.ProjectConfig) error

Types

type AppService

type AppService interface {
	Deploy(ctx context.Context, client *client.Client, serviceName string, deployCfg DeployConfiguration, existingContainer *types.ContainerJSON) error
	AttachInfo(serviceName string, serviceConfig config.ProjectService) interface{}
	Validate(serviceName string, serviceConfig config.ProjectService) error
	SupportedTypes() []string
	ConfigSchema(serviceType string) *jsonschema.Schema
}

func GetAllServices

func GetAllServices() []AppService

type DeployConfiguration

type DeployConfiguration struct {
	Name          string
	ImageName     string
	ProjectConfig *config.ProjectConfig
	// contains filtered or unexported fields
}

func (DeployConfiguration) ContainerPrefix

func (c DeployConfiguration) ContainerPrefix() string

func (DeployConfiguration) GetEnvironmentVariables

func (c DeployConfiguration) GetEnvironmentVariables() []string

type KvClient

type KvClient struct {
	// contains filtered or unexported fields
}

func CreateKVConnection

func CreateKVConnection(ctx context.Context, client *client.Client) (*KvClient, error)

func (KvClient) Close

func (c KvClient) Close()

func (KvClient) Delete

func (c KvClient) Delete(key string) error

func (KvClient) Get

func (c KvClient) Get(key string) (string, error)

func (KvClient) Set

func (c KvClient) Set(key string, value string) error

type MemcachedService

type MemcachedService struct {
}

func (MemcachedService) AttachInfo

func (m MemcachedService) AttachInfo(serviceName string, serviceConfig config.ProjectService) interface{}

func (MemcachedService) ConfigSchema

func (m MemcachedService) ConfigSchema(serviceType string) *jsonschema.Schema

func (MemcachedService) Deploy

func (m MemcachedService) Deploy(ctx context.Context, client *client.Client, serviceName string, deployCfg DeployConfiguration, existingContainer *types.ContainerJSON) error

func (MemcachedService) SupportedTypes

func (m MemcachedService) SupportedTypes() []string

func (MemcachedService) Validate

func (m MemcachedService) Validate(serviceName string, serviceConfig config.ProjectService) error

type MySQLService

type MySQLService struct {
}

func (MySQLService) AttachInfo

func (m MySQLService) AttachInfo(serviceName string, serviceCfg config.ProjectService) interface{}

func (MySQLService) ConfigSchema

func (m MySQLService) ConfigSchema(serviceType string) *jsonschema.Schema

func (MySQLService) Deploy

func (m MySQLService) Deploy(ctx context.Context, client *client.Client, serviceName string, deployCfg DeployConfiguration, existingContainer *types.ContainerJSON) error

func (MySQLService) SupportedTypes

func (m MySQLService) SupportedTypes() []string

func (MySQLService) Validate

func (m MySQLService) Validate(serviceName string, serviceCfg config.ProjectService) error

type OpenSearchService

type OpenSearchService struct {
}

func (OpenSearchService) AttachInfo

func (v OpenSearchService) AttachInfo(serviceName string, serviceConfig config.ProjectService) interface{}

func (OpenSearchService) ConfigSchema

func (v OpenSearchService) ConfigSchema(serviceType string) *jsonschema.Schema

func (OpenSearchService) Deploy

func (v OpenSearchService) Deploy(ctx context.Context, client *client.Client, serviceName string, deployCfg DeployConfiguration, existingContainer *types.ContainerJSON) error

func (OpenSearchService) SupportedTypes

func (v OpenSearchService) SupportedTypes() []string

func (OpenSearchService) Validate

func (v OpenSearchService) Validate(serviceName string, serviceConfig config.ProjectService) error

type PostgresService

type PostgresService struct {
}

func (PostgresService) AttachInfo

func (p PostgresService) AttachInfo(serviceName string, serviceCfg config.ProjectService) interface{}

func (PostgresService) ConfigSchema

func (p PostgresService) ConfigSchema(serviceType string) *jsonschema.Schema

func (PostgresService) Deploy

func (p PostgresService) Deploy(ctx context.Context, client *client.Client, serviceName string, deployCfg DeployConfiguration, existingContainer *types.ContainerJSON) error

func (PostgresService) SupportedTypes

func (p PostgresService) SupportedTypes() []string

func (PostgresService) Validate

func (p PostgresService) Validate(serviceName string, serviceCfg config.ProjectService) error

type ProjectServiceInfo

type ProjectServiceInfo struct {
	Status   string
	Existing bool
	Dangling bool
}

type ProjectServiceList

type ProjectServiceList map[string]ProjectServiceInfo

func ProjectListServices

func ProjectListServices(ctx context.Context, client *client.Client, cfg *config.ProjectConfig) (ProjectServiceList, error)

func (ProjectServiceList) HasDanlingServices

func (p ProjectServiceList) HasDanlingServices() bool

func (ProjectServiceList) HasNotDeployedServices

func (p ProjectServiceList) HasNotDeployedServices() bool

type RabbitmqService

type RabbitmqService struct {
}

func (RabbitmqService) AttachInfo

func (v RabbitmqService) AttachInfo(serviceName string, serviceConfig config.ProjectService) interface{}

func (RabbitmqService) ConfigSchema

func (v RabbitmqService) ConfigSchema(serviceType string) *jsonschema.Schema

func (RabbitmqService) Deploy

func (v RabbitmqService) Deploy(ctx context.Context, client *client.Client, serviceName string, deployCfg DeployConfiguration, existingContainer *types.ContainerJSON) error

func (RabbitmqService) SupportedTypes

func (v RabbitmqService) SupportedTypes() []string

func (RabbitmqService) Validate

func (v RabbitmqService) Validate(serviceName string, serviceConfig config.ProjectService) error

type TCPProxy

type TCPProxy struct {
	ProxyContainerId string
	ListenPort       string
	Keys             *mtls.MTLSGenerated
}

func CreateTCPProxy

func CreateTCPProxy(ctx context.Context, client *client.Client, externalHost string, containerId string, port string) (*TCPProxy, error)

type TidewaysService

type TidewaysService struct {
}

func (TidewaysService) AttachInfo

func (t TidewaysService) AttachInfo(serviceName string, serviceConfig config.ProjectService) interface{}

func (TidewaysService) ConfigSchema

func (t TidewaysService) ConfigSchema(serviceType string) *jsonschema.Schema

func (TidewaysService) Deploy

func (t TidewaysService) Deploy(ctx context.Context, client *client.Client, serviceName string, deployCfg DeployConfiguration, existingContainer *types.ContainerJSON) error

func (TidewaysService) SupportedTypes

func (t TidewaysService) SupportedTypes() []string

func (TidewaysService) Validate

func (t TidewaysService) Validate(serviceName string, serviceConfig config.ProjectService) error

type ValkeyService

type ValkeyService struct {
}

func (ValkeyService) AttachInfo

func (v ValkeyService) AttachInfo(serviceName string, serviceConfig config.ProjectService) interface{}

func (ValkeyService) ConfigSchema

func (v ValkeyService) ConfigSchema(serviceType string) *jsonschema.Schema

func (ValkeyService) Deploy

func (v ValkeyService) Deploy(ctx context.Context, client *client.Client, serviceName string, deployCfg DeployConfiguration, existingContainer *types.ContainerJSON) error

func (ValkeyService) SupportedTypes

func (v ValkeyService) SupportedTypes() []string

func (ValkeyService) Validate

func (v ValkeyService) Validate(serviceName string, serviceConfig config.ProjectService) error

type Version

type Version struct {
	Name      string
	Aliases   []string
	CreatedAt time.Time
	Active    bool
}

func VersionList

func VersionList(ctx context.Context, client *client.Client, cfg *config.ProjectConfig) ([]Version, error)

Jump to

Keyboard shortcuts

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