registry

package
v0.1.0-alpha.9 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Copyright (c) 2025 Nexlayer. All rights reserved.n// Use of this source code is governed by an MIT-stylen// license that can be found in the LICENSE file.nn

Copyright (c) 2025 Nexlayer. All rights reserved.n// Use of this source code is governed by an MIT-stylen// license that can be found in the LICENSE file.nn

Copyright (c) 2025 Nexlayer. All rights reserved.n// Use of this source code is governed by an MIT-stylen// license that can be found in the LICENSE file.nn

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildConfig

type BuildConfig struct {
	Images    []ImageConfig
	Namespace string
	Tags      []string
}

BuildConfig represents configuration for building multiple images

type Client

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

Client handles Docker registry operations

func NewClient

func NewClient(config *RegistryConfig) *Client

NewClient creates a new registry client

func (*Client) BuildAndPushImages

func (c *Client) BuildAndPushImages(cfg BuildConfig) error

BuildAndPushImages builds and pushes multiple images

func (*Client) BuildImage

func (c *Client) BuildImage(cfg ImageConfig) error

BuildImage builds a Docker image for a service

func (*Client) Login

func (c *Client) Login() error

Login authenticates with the container registry

func (*Client) PushImage

func (c *Client) PushImage(cfg ImageConfig) error

PushImage pushes a Docker image to the registry

type CommandDependencies

type CommandDependencies struct {
	APIClient api.APIClient
	Logger    *observability.Logger
	UIManager *ui.Manager
}

CommandDependencies contains dependencies that can be injected into commands

type CommandProvider

type CommandProvider interface {
	// Name returns the unique name of this command provider
	Name() string

	// Description returns a description of what commands this provider offers
	Description() string

	// Dependencies returns a list of other provider names that this provider depends on
	Dependencies() []string

	// Commands returns the commands provided by this module
	Commands(deps *CommandDependencies) []*cobra.Command
}

CommandProvider defines an interface for modules that provide commands

type ImageConfig

type ImageConfig struct {
	ServiceName string
	Path        string
	Tags        []string
	Namespace   string
}

ImageConfig represents configuration for a Docker image

type ProviderInfo

type ProviderInfo struct {
	Name         string
	Description  string
	Dependencies []string
}

ProviderInfo contains information about a command provider

type Registry

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

Registry manages command providers and their dependencies

func NewRegistry

func NewRegistry(deps *CommandDependencies) *Registry

NewRegistry creates a new command registry

func (*Registry) GetCommands

func (r *Registry) GetCommands() []*cobra.Command

GetCommands returns all registered commands in dependency order

func (*Registry) ListProviders

func (r *Registry) ListProviders() []ProviderInfo

ListProviders returns information about registered providers

func (*Registry) Register

func (r *Registry) Register(provider CommandProvider) error

Register adds a command provider to the registry

type RegistryConfig

type RegistryConfig struct {
	Username string
	Token    string
	Registry string // e.g., "ghcr.io"
}

RegistryConfig represents configuration for container registry

Jump to

Keyboard shortcuts

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