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: 0

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