infra

package
v0.0.0-...-6d34543 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

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

func NewInfo

func NewInfo() *Info

type Infra

type Infra interface {
	// close resource when app stop
	Close()

	HealthCheck() []error
}

type Infraer

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

func NewInfraer

func NewInfraer(options ...Option) *Infraer

func (*Infraer) Inject

func (ir *Infraer) Inject(v *viper.Viper, injectInfos []*domain_file.InjectInfo) bool

injectToInfra inject repo to infra.go and execute wire command.

type Option

type Option func(*Infraer)

func WithIfacerExecer

func WithIfacerExecer(execer pkg.Exec) Option

func WithIfacerInfraInfo

func WithIfacerInfraInfo(infra *Info) Option

func WithIfacerLogger

func WithIfacerLogger(logger log.Logger) Option

func WithIfacerWriter

func WithIfacerWriter(writer filedir.IfaceWriter) Option

Jump to

Keyboard shortcuts

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