component

package module
v0.0.0-...-dbcc0a2 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: MIT Imports: 2 Imported by: 5

README

component


Copyright (c) 2024 Archivage Numérique

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Object

func Object[T any](c *Container, name string) (T, error)

Types

type Component

type Component interface {
	Name() string
	Build(c *Container) (any, error)
}

type Constructor

type Constructor func(*Container) (Component, error)

type Container

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

func NewContainer

func NewContainer(app *application.Application, ctts []Constructor) (*Container, error)

func (*Container) Application

func (c *Container) Application() *application.Application

func (*Container) Build

func (c *Container) Build() error

func (*Container) Close

func (c *Container) Close() error

func (*Container) New

func (c *Container) New(ctts []Constructor) (*Container, error)

func (*Container) SetObject

func (c *Container) SetObject(name string, value any) error

func (*Container) Start

func (c *Container) Start() error

func (*Container) Stop

func (c *Container) Stop() error

Jump to

Keyboard shortcuts

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