goframe

package module
v0.0.0-...-41a006c Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2024 License: MIT Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

goframe

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

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

func NewContainer

func NewContainer() *Container

func (*Container) Bind

func (c *Container) Bind(provider IProvider) error

func (*Container) IsBind

func (c *Container) IsBind(key string) bool

func (*Container) Make

func (c *Container) Make(key string) (any, error)

func (*Container) MustMake

func (c *Container) MustMake(key string) any

func (*Container) NewMake

func (c *Container) NewMake(key string, params []any) (any, error)

func (*Container) Providers

func (c *Container) Providers() []string

type Handler

type Handler func(...any) (any, error)

type IContainer

type IContainer interface {
	Bind(provider IProvider) error
	IsBind(key string) bool

	Make(key string) (any, error)
	MustMake(key string) any
	NewMake(key string, params []any) (any, error)
}

type IProvider

type IProvider interface {
	Name() string
	Boot(IContainer) error
	Params(IContainer) []any
	Inject(IContainer) Handler
	IsDefer() bool
}

Directories

Path Synopsis
Package cobra is a commander providing a simple interface to create powerful modern CLI interfaces.
Package cobra is a commander providing a simple interface to create powerful modern CLI interfaces.
gin
provider
app
dcs
env
etc
log
orm
uid

Jump to

Keyboard shortcuts

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