service

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

type Container interface {
	AddService(service interface{}) (err error)
	GetService(service interface{}) (err error)
	HasService(service interface{}) (hasService bool)
}

Container of all services

func NewContainer

func NewContainer() (r Container)

NewContainer constructor

type Registry

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

Registry of all services

func (*Registry) AddService

func (r *Registry) AddService(service interface{}) (err error)

AddService a service to the container

func (*Registry) GetService

func (r *Registry) GetService(service interface{}) (err error)

GetService a service from the container

func (*Registry) HasService

func (r *Registry) HasService(service interface{}) (hasService bool)

HasService check if the service exists in the container

Jump to

Keyboard shortcuts

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