info

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Component = &app.Component{
	Dependencies: app.Components{
		router.Component,
	},
	Constructor: func(container container.Container) error {
		return container.Provides(
			NewInformation,
			func(info *Information) Info { return info },
		)
	},
	BindFlags: nil,
	Run: func(c container.Container) error {
		router, err := container.Get[router.Router](c)
		if err != nil {
			return err
		}

		info, err := container.Get[*Information](c)
		if err != nil {
			return err
		}

		router.Get("/info", info.ServeHTTP)

		return nil
	},
}

Functions

This section is empty.

Types

type Info

type Info interface {
	Registration(name string, config any)
}

type Information

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

func NewInformation

func NewInformation(appConfig *app.Config, loggerConfig *logger.Config, routerConfig *router.Config) *Information

func (*Information) Registration

func (info *Information) Registration(name string, c any)

func (*Information) ServeHTTP

func (info *Information) ServeHTTP(writer http.ResponseWriter, request *http.Request)

Jump to

Keyboard shortcuts

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