platform

package
v0.0.0-...-ba6934c Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPlatformNotSupported   = fmt.Errorf("unsupported platform")
	ErrPlatformConfigNotFound = fmt.Errorf("platform config not found")

	Error error = nil
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Type   PlatformKind   `yaml:"type"`
	Config map[string]any `yaml:"config"`
}

type PlatformKind

type PlatformKind string

type Provider

type Provider interface {
	// Name returns the name of the platform
	Name() string

	// IsEnabled returns true if the platform is enabled
	IsEnabled() bool

	// ConfigureContainer configures the IoC container for the platform
	ConfigureContainer(container *ioc.NestedContainer) error
}

Provider is an interface for a platform provider

func Initialize

func Initialize(container *ioc.NestedContainer, defaultPlatform PlatformKind) (Provider, error)

Initialize configures the IoC container with the platform specific components

Jump to

Keyboard shortcuts

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