Compile-time dependency injection for Go

Overview

Dihedral

Build Status

Dihedral is a compile-time injection framework for Go.

Getting started

> go get -u github.com/dimes/dihedral

Create a type you want injected:

type ServiceEndpoint string  // Name this string "ServiceEndpoint"
type Service struct {
    inject  embeds.Inject    // Auto-inject this struct 
    Endpoint ServiceEndpoint // Inject a string with name "ServiceEndpoint"
}

Create a module to provide non-injected dependencies:

// Each public method on this struct provides a type
type ServiceModule struct {}
func (s *ServiceModule) ProvidesServiceEndpoint() ServiceEndpoint {
    return ServiceEndpoint("http://hello.world")
}

Create a component as the root of the dependency injection:

type ServiceComponent interface {
    InjectService() *Service
}

Create a definition with the target component and the module configuration:

type ServiceDefinition interface {
    Modules() (*ServiceModule, dbstore.DBBindingModule)
    Target() ServiceComponent
}

Generate the bindings

> dihedral -definition ServiceDefinition

Use the bindings

func main() {
    // dihedral generates the digen package
    component := digen.NewDihedralServiceComponent()
    service := component.InjectService()
    fmt.Println(string(injected.Endpoint)) # Prints "http://hello.world"
}

Further Reading

Differences from Wire

Wire, Google's injection framework, is another compile time framework for Go. Both frameworks are inspired by Dagger. Dihedral differs from Wire in that Dihedral focuses on auto-injected components and self-contained modules, whereas Wire focuses more on type registration via provider functions. Dihedral also leverages struct receivers for better organization of runtime provided types. These features make Dihedral nicer to work with.

Dihedral's component structure also enables one to have multiple injected components that share modules. The type annotation system allows for auto-injected components, provided modules, and, in the future, sub-components that have a different scope than the parent component.

Issues
  • Documentation alludes to multiple scopes but doesn't give examples

    Documentation alludes to multiple scopes but doesn't give examples

    I was expecting to see an example of a 'singleton' (application scope) component and how something from less permanent scope may depend on that.

    Here's some tangible component names in non HelloWorld application - https://paulhammant.com/blog/a-spring-framework-shortcoming.html

    opened by paul-hammant 5
  • Trying to figure this out, but it's hard to follow

    Trying to figure this out, but it's hard to follow

    Hey there, I really like the idea and it seems like it is a good implementation. I really would like to get this to work, so I am trying my best but it is really hard to follow. Especially when the example in the folder doesn't match up at all to the examples in the instructions on the readme. I can't put two and two together to figure out what part of the example is what part of the instructions. I don't know which of the things I am supposed to create vs what running the command is supposed to create, or which thing that I have created I am supposed to actually run the command against.

    If it were at all possible to try and make the written instructions match up to the actual example, that would be much more helpful. It feels like I watched and studied a training video on how to operate a machine, but then when you get to it, someone changed the location as well as the labels of all of the controls.

    Perhaps you might be able to take a look at what I currently have and give me some pointers in implementation? I have a main/appconfig package which has a struct mapped using this config package, which is, of course, the important data that I am trying to be able to pass around throughout my application.

    Which looks like the following

    package appconfig
    
    import (
    	"github.com/gookit/config/v2"
    	"github.com/gookit/config/v2/yaml"
    )
    
    type ConfigData struct {
    	MainSettings MainSettings
    }
    
    type ConnectionType int
    
    const (
    	Oauth  ConnectionType = 0
    	Oauth2 ConnectionType = 1
    	JWT    ConnectionType = 2
    )
    
    type WordPressSettings struct {
    	ConnectionType    int
    	ConnectionDetails struct {
    		SiteAddress  string `json:"site_address"`
    		ClientId     string `json:"client_id"`
    		ClientSecret string `json:"client_secret"`
    		Redirect     string `json:"redirect"`
    		AppName      string `json:"app_name"`
    		AccessUrl    string `json:"access_url"`
    		AuthorizeUrl string `json:"authorize_url"`
    		GrantType    string `json:"grant_type"`
    	}
    	Assets map[string]string `json:"assets"`
    }
    
    type MainSettings struct {
    	System struct {
    		Token           string `json:"token"`
    		CommandPrefix   string `json:"commandprefix"`
    		RequireEmail    string `json:"requireemail"`
    		ConsoleLogLevel string `json:"consoleloglevel"`
    		FileLogLevel    string `json:"fileloglevel"`
    	} `json:"system"`
    	Integrations struct {
    		WordPress  string `json:"wordpress"`
    		Connection string `json:"connection"`
    		WebAddress string `json:"webaddress"`
    	} `json:"integrations"`
    	Discord struct {
    		Guild    string            `json:"guild"`
    		BotUsers []string          `json:"botusers"`
    		Roles    map[string]string `json:"roles"`
    	} `json:"discord"`
    	Assets struct {
    		DateCompare      string            `json:"datecompare"`
    		CompareDate      string            `json:"comparedate"`
    		AssetOriginal    string            `json:"assetoriginal"`
    		AssetReplacement string            `json:"assetreplacement"`
    		ApiKeys          map[string]string `json:"apikey"`
    		Packages         map[string]string `json:"package"`
    	} `json:"assets"`
    }
    
    func (m *MainSettings) GetConfig() *MainSettings {
    	return m.LoadConfig()
    }
    
    func (m *MainSettings) LoadConfig() *MainSettings {
    
    	config.AddDriver(yaml.Driver)
    	filename := "./appconfig/config.yml"
    
    	err := config.LoadFiles(string(filename))
    	if err != nil {
    		panic(err)
    	}
    
    	mainSettings := &MainSettings{
    		System: struct {
    			Token           string `json:"token"`
    			CommandPrefix   string `json:"commandprefix"`
    			RequireEmail    string `json:"requireemail"`
    			ConsoleLogLevel string `json:"consoleloglevel"`
    			FileLogLevel    string `json:"fileloglevel"`
    		}{
    			Token:           config.String("settings.system.token"),
    			CommandPrefix:   config.String("settings.system.commandprefix"),
    			RequireEmail:    config.String("settings.system.requireemail"),
    			ConsoleLogLevel: config.String("settings.system.consoleloglevel"),
    			FileLogLevel:    config.String("settings.system.fileloglevel"),
    		},
    		Integrations: struct {
    			WordPress  string `json:"wordpress"`
    			Connection string `json:"connection"`
    			WebAddress string `json:"webaddress"`
    		}{
    			WordPress:  config.String("settings.integrations.wordpress"),
    			Connection: config.String("settings.integrations.connection"),
    			WebAddress: config.String("settings.integrations.webaddress"),
    		},
    		Discord: struct {
    			Guild    string            `json:"guild"`
    			BotUsers []string          `json:"botusers"`
    			Roles    map[string]string `json:"roles"`
    		}{
    			Guild:    config.String("settings.discord.guild"),
    			BotUsers: config.Strings("settings.discord.botusers"),
    			Roles:    config.StringMap("settings.discord.roles"),
    		},
    		Assets: struct {
    			DateCompare      string            `json:"datecompare"`
    			CompareDate      string            `json:"comparedate"`
    			AssetOriginal    string            `json:"assetoriginal"`
    			AssetReplacement string            `json:"assetreplacement"`
    			ApiKeys          map[string]string `json:"apikey"`
    			Packages         map[string]string `json:"package"`
    		}{
    			DateCompare:      config.String("settings.assets.datecompare"),
    			CompareDate:      config.String("settings.assets.comparedate"),
    			AssetOriginal:    config.String("settings.assets.assetoriginal"),
    			AssetReplacement: config.String("settings.assets.assetreplacement"),
    			ApiKeys:          config.StringMap("settings.assets.apikey"),
    			Packages:         config.StringMap("settings.assets.package"),
    		}}
    	return mainSettings
    }
    
    
    

    Ultimately I am trying to get that data above into this handler which gets registered on the start of the bot firing up. func (p *ListRoles) Handle(ctx *exrouter.Context)

    type ListRoles struct {
    
    }
    
    func (p *ListRoles) Handle(ctx *exrouter.Context) {
    	guildRoles, err := ctx.Ses.GuildRoles(X) // <--- Need to get the data here
    	if err != nil {
    		log.Print("Could not get list of current roles", err)
    	}
    
    	roleTable := p.renderMarkDownTable(guildRoles)
    	_, err = ctx.Reply(roleTable)
    	if err != nil {
    		log.Print("Something went wrong when handling listroles request", err)
    	}
           // ...so on and so forth
    }
    
    func (p *ListRoles) GetCommand() string {
    	return listrolesRoute
    }
    
    func (p *ListRoles) GetDescription() string {
    	return listrolesDescription
    }
    
    
    func NewListRoles() *ListRoles {
    	return &ListRoles{}
    }
    

    My package main of course kicks it all off:

    type AppContext struct {
    	Verifier *verifier.Verifier
    	Config *appconfig.MainSettings
    }
    
    func main() {
    	var appContext AppContext
    
    	config := appContext.Config.GetConfig()
    	verifierRun, err := appContext.Verifier.VerifierRun(config))
    	if err != nil {
    		log.Println("error creating Bot session,", err)
    	}
    
    	defer verifierRun.Close()
    	err = verifierRun.Start()
    	if err != nil {
    		log.Printf("Couldn't start verifierRun: %v", err)
    		return
    	}
    
    	sc := make(chan os.Signal, 1)
    	signal.Notify(sc, syscall.SIGINT, syscall.SIGTERM, os.Interrupt, os.Kill)
    	<-sc
    }
    

    I am not sure if the context of the application and what I am trying to achieve makes sense. Essentially taking that MainSettings data from the first code section and trying to get it into the func (p *ListRoles) Handle(ctx *exrouter.Context) function. Might you be able to point me in the right direction as to which parts of my application correspond to which parts of your instructions / example? If I can try and at least map the two together, it might make it a bit more likely I will be able to get something implemented, which hopefully I will be able to do. : D

    I definitely appreciate the time and effort you put into this package, I hopefully just need some clarification on things Thanks,
    -MH

    opened by MostHated 3
  • Bump nokogiri from 1.10.8 to 1.11.4 in /docs

    Bump nokogiri from 1.10.8 to 1.11.4 in /docs

    Bumps nokogiri from 1.10.8 to 1.11.4.

    Release notes

    Sourced from nokogiri's releases.

    1.11.4 / 2021-05-14

    Security

    [CRuby] Vendored libxml2 upgraded to v2.9.12 which addresses:

    Note that two additional CVEs were addressed upstream but are not relevant to this release. CVE-2021-3516 via xmllint is not present in Nokogiri, and CVE-2020-7595 has been patched in Nokogiri since v1.10.8 (see #1992).

    Please see nokogiri/GHSA-7rrm-v45f-jp64 or #2233 for a more complete analysis of these CVEs and patches.

    Dependencies

    • [CRuby] vendored libxml2 is updated from 2.9.10 to 2.9.12. (Note that 2.9.11 was skipped because it was superseded by 2.9.12 a few hours after its release.)

    1.11.3 / 2021-04-07

    Fixed

    • [CRuby] Passing non-Node objects to Document#root= now raises an ArgumentError exception. Previously this likely segfaulted. [#1900]
    • [JRuby] Passing non-Node objects to Document#root= now raises an ArgumentError exception. Previously this raised a TypeError exception.
    • [CRuby] arm64/aarch64 systems (like Apple's M1) can now compile libxml2 and libxslt from source (though we continue to strongly advise users to install the native gems for the best possible experience)

    1.11.2 / 2021-03-11

    Fixed

    • [CRuby] NodeSet may now safely contain Node objects from multiple documents. Previously the GC lifecycle of the parent Document objects could lead to nodes being GCed while still in scope. [#1952]
    • [CRuby] Patch libxml2 to avoid "huge input lookup" errors on large CDATA elements. (See upstream GNOME/libxml2#200 and GNOME/libxml2!100.) [#2132].
    • [CRuby+Windows] Enable Nokogumbo (and other downstream gems) to compile and link against nokogiri.so by including LDFLAGS in Nokogiri::VERSION_INFO. [#2167]
    • [CRuby] {XML,HTML}::Document.parse now invokes #initialize exactly once. Previously #initialize was invoked twice on each object.
    • [JRuby] {XML,HTML}::Document.parse now invokes #initialize exactly once. Previously #initialize was not called, which was a problem for subclassing such as done by Loofah.

    Improved

    • Reduce the number of object allocations needed when parsing an HTML::DocumentFragment. [#2087] (Thanks, @​ashmaroli!)
    • [JRuby] Update the algorithm used to calculate Node#line to be wrong less-often. The underlying parser, Xerces, does not track line numbers, and so we've always used a hacky solution for this method. [#1223, #2177]
    • Introduce --enable-system-libraries and --disable-system-libraries flags to extconf.rb. These flags provide the same functionality as --use-system-libraries and the NOKOGIRI_USE_SYSTEM_LIBRARIES environment variable, but are more idiomatic. [#2193] (Thanks, @​eregon!)
    • [TruffleRuby] --disable-static is now the default on TruffleRuby when the packaged libraries are used. This is more flexible and compiles faster. (Note, though, that the default on TR is still to use system libraries.) [#2191, #2193] (Thanks, @​eregon!)

    ... (truncated)

    Changelog

    Sourced from nokogiri's changelog.

    1.11.4 / 2021-05-14

    Security

    [CRuby] Vendored libxml2 upgraded to v2.9.12 which addresses:

    Note that two additional CVEs were addressed upstream but are not relevant to this release. CVE-2021-3516 via xmllint is not present in Nokogiri, and CVE-2020-7595 has been patched in Nokogiri since v1.10.8 (see #1992).

    Please see nokogiri/GHSA-7rrm-v45f-jp64 or #2233 for a more complete analysis of these CVEs and patches.

    Dependencies

    • [CRuby] vendored libxml2 is updated from 2.9.10 to 2.9.12. (Note that 2.9.11 was skipped because it was superseded by 2.9.12 a few hours after its release.)

    1.11.3 / 2021-04-07

    Fixed

    • [CRuby] Passing non-Node objects to Document#root= now raises an ArgumentError exception. Previously this likely segfaulted. [#1900]
    • [JRuby] Passing non-Node objects to Document#root= now raises an ArgumentError exception. Previously this raised a TypeError exception.
    • [CRuby] arm64/aarch64 systems (like Apple's M1) can now compile libxml2 and libxslt from source (though we continue to strongly advise users to install the native gems for the best possible experience)

    1.11.2 / 2021-03-11

    Fixed

    • [CRuby] NodeSet may now safely contain Node objects from multiple documents. Previously the GC lifecycle of the parent Document objects could lead to nodes being GCed while still in scope. [#1952]
    • [CRuby] Patch libxml2 to avoid "huge input lookup" errors on large CDATA elements. (See upstream GNOME/libxml2#200 and GNOME/libxml2!100.) [#2132].
    • [CRuby+Windows] Enable Nokogumbo (and other downstream gems) to compile and link against nokogiri.so by including LDFLAGS in Nokogiri::VERSION_INFO. [#2167]
    • [CRuby] {XML,HTML}::Document.parse now invokes #initialize exactly once. Previously #initialize was invoked twice on each object.
    • [JRuby] {XML,HTML}::Document.parse now invokes #initialize exactly once. Previously #initialize was not called, which was a problem for subclassing such as done by Loofah.

    Improved

    • Reduce the number of object allocations needed when parsing an HTML::DocumentFragment. [#2087] (Thanks, @​ashmaroli!)
    • [JRuby] Update the algorithm used to calculate Node#line to be wrong less-often. The underlying parser, Xerces, does not track line numbers, and so we've always used a hacky solution for this method. [#1223, #2177]
    • Introduce --enable-system-libraries and --disable-system-libraries flags to extconf.rb. These flags provide the same functionality as --use-system-libraries and the NOKOGIRI_USE_SYSTEM_LIBRARIES environment variable, but are more idiomatic. [#2193] (Thanks, @​eregon!)
    • [TruffleRuby] --disable-static is now the default on TruffleRuby when the packaged libraries are used. This is more flexible and compiles faster. (Note, though, that the default on TR is still to use system libraries.) [#2191, #2193] (Thanks, @​eregon!)

    ... (truncated)

    Commits
    • 9d69b44 version bump to v1.11.4
    • 058e87f update CHANGELOG with complete CVE information
    • 9285251 Merge pull request #2234 from sparklemotion/2233-upgrade-to-libxml-2-9-12
    • 5436f61 update CHANGELOG
    • 761d320 patch: renumber libxml2 patches
    • 889ee2a test: update behavior of namespaces in HTML
    • 9751d85 test: remove low-value HTML::SAX::PushParser encoding test
    • 9fcb7d2 test: adjust xpath gc test to libxml2's max recursion depth
    • 1c99019 patch: backport libxslt configure.ac change for libxml2 config
    • 82a253f patch: fix isnan/isinf patch to apply cleanly to libxml 2.9.12
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
  • Bump rubyzip from 1.2.3 to 2.2.0 in /docs

    Bump rubyzip from 1.2.3 to 2.2.0 in /docs

    ⚠️ Dependabot is rebasing this PR ⚠️

    If you make any changes to it yourself then they will take precedence over the rebase.


    Bumps rubyzip from 1.2.3 to 2.2.0.

    Release notes

    Sourced from rubyzip's releases.

    v2.2.0

    • Add support for decompression plugin gems #427

    v2.1.0

    • Fix (at least partially) the restore_times and restore_permissions options to Zip::File.new #413
      • Previously, neither option did anything, regardless of what it was set to. We have therefore defaulted them to false to preserve the current behavior, for the time being. If you have explicitly set either to true, it will now have an effect.
      • Fix handling of UniversalTime (mtime, atime, ctime) fields. #421
      • Previously, Zip::File did not pass the options to Zip::Entry in some cases. #423
      • Note that restore_times in this release does nothing on Windows and only restores mtime, not atime or ctime.
    • Allow Zip::File.open to take an options hash like Zip::File.new #418
    • Always print warnings with warn, instead of a mix of puts and warn #416
    • Create temporary files in the system temporary directory instead of the directory of the zip file #411
    • Drop unused tmpdir requirement #411

    Tooling

    • Move CI to xenial and include jruby on JDK11 #419

    v2.0.0

    Security

    • Default the validate_entry_sizes option to true, so that callers can trust an entry's reported size when using extract #403
      • This option defaulted to false in 1.3.0 for backward compatibility, but it now defaults to true. If you are using an older version of ruby and can't yet upgrade to 2.x, you can still use 1.3.0 and set the option to true.

    Tooling / Documentation

    • Remove test files from the gem to avoid problems with antivirus detections on the test files #405 / #384
    • Drop support for unsupported ruby versions #406

    v1.3.0

    Security

    • Add validate_entry_sizes option so that callers can trust an entry's reported size when using extract #403
      • This option defaults to false for backward compatibility in this release, but you are strongly encouraged to set it to true. It will default to true in rubyzip 2.0.

    New Feature

    • Add add_stored method to simplify adding entries without compression #366

    Tooling / Documentation

    • Add more gem metadata links #402

    v1.2.4

    • Do not rewrite zip files opened with open_buffer that have not changed #360

    Tooling / Documentation

    • Update example_recursive.rb in README #397
    • Hold CI at trusty for now, automatically pick the latest ruby patch version, use rbx-4 and hold jruby at 9.1 #399
    ... (truncated)
    Changelog

    Sourced from rubyzip's changelog.

    2.2.0 (2020-02-01)

    • Add support for decompression plugin gems #427

    2.1.0 (2020-01-25)

    • Fix (at least partially) the restore_times and restore_permissions options to Zip::File.new #413
      • Previously, neither option did anything, regardless of what it was set to. We have therefore defaulted them to false to preserve the current behavior, for the time being. If you have explicitly set either to true, it will now have an effect.
      • Fix handling of UniversalTime (mtime, atime, ctime) fields. #421
      • Previously, Zip::File did not pass the options to Zip::Entry in some cases. #423
      • Note that restore_times in this release does nothing on Windows and only restores mtime, not atime or ctime.
    • Allow Zip::File.open to take an options hash like Zip::File.new #418
    • Always print warnings with warn, instead of a mix of puts and warn #416
    • Create temporary files in the system temporary directory instead of the directory of the zip file #411
    • Drop unused tmpdir requirement #411

    Tooling

    • Move CI to xenial and include jruby on JDK11 #419

    2.0.0 (2019-09-25)

    Security

    • Default the validate_entry_sizes option to true, so that callers can trust an entry's reported size when using extract #403
      • This option defaulted to false in 1.3.0 for backward compatibility, but it now defaults to true. If you are using an older version of ruby and can't yet upgrade to 2.x, you can still use 1.3.0 and set the option to true.

    Tooling / Documentation

    • Remove test files from the gem to avoid problems with antivirus detections on the test files #405 / #384
    • Drop support for unsupported ruby versions #406

    1.3.0 (2019-09-25)

    Security

    • Add validate_entry_sizes option so that callers can trust an entry's reported size when using extract #403
      • This option defaults to false for backward compatibility in this release, but you are strongly encouraged to set it to true. It will default to true in rubyzip 2.0.

    New Feature

    • Add add_stored method to simplify adding entries without compression #366

    Tooling / Documentation

    • Add more gem metadata links #402

    1.2.4 (2019-09-06)

    • Do not rewrite zip files opened with open_buffer that have not changed #360
    ... (truncated)
    Commits
    • ecd641e Merge pull request #429 from rubyzip/v2-2-0
    • f42827e Bump version to 2.2.0
    • 040962a Remove unused error argument
    • 666fb8c Merge pull request #427 from jspanjers/refactor-decompressor
    • 0b9433c Add test for unsupported decompression, e.g bzip2
    • a5d068d Support Decompressor plugins
    • 2b72683 Define compression methods
    • 456bd4d Mimic IO#read return values in Decompressor#read
    • c66277d Rename Decompressor#sysread to #read
    • 00b525d Fix returned outbuf for Inflater#sysread
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
  • Restyle docs

    Restyle docs

    opened by dimes 0
  • Bump activesupport from 6.0.2.1 to 6.0.3.1 in /docs

    Bump activesupport from 6.0.2.1 to 6.0.3.1 in /docs

    Bumps activesupport from 6.0.2.1 to 6.0.3.1.

    Release notes

    Sourced from activesupport's releases.

    6.0.3

    In this version, we fixed warnings when used with Ruby 2.7 across the entire framework.

    Following are the list of other changes, per-framework.

    Active Support

    • Array#to_sentence no longer returns a frozen string.

      Before:

      ['one', 'two'].to_sentence.frozen?
      # => true
      

      After:

      ['one', 'two'].to_sentence.frozen?
      # => false
      

      Nicolas Dular

    • Update ActiveSupport::Messages::Metadata#fresh? to work for cookies with expiry set when ActiveSupport.parse_json_times = true.

      Christian Gregg

    Active Model

    • No changes.

    Active Record

    • Recommend applications don't use the database kwarg in connected_to

      The database kwarg in connected_to was meant to be used for one-off scripts but is often used in requests. This is really dangerous because it re-establishes a connection every time. It's deprecated in 6.1 and will be removed in 6.2 without replacement. This change soft deprecates it in 6.0 by removing documentation.

      Eileen M. Uchitelle

    • Fix support for PostgreSQL 11+ partitioned indexes.

      Sebastián Palma

    • Add support for beginless ranges, introduced in Ruby 2.7.

      Josh Goodall

    ... (truncated)
    Changelog

    Sourced from activesupport's changelog.

    Rails 6.0.3.1 (May 18, 2020)

    • [CVE-2020-8165] Deprecate Marshal.load on raw cache read in RedisCacheStore

    • [CVE-2020-8165] Avoid Marshal.load on raw cache value in MemCacheStore

    Rails 6.0.3 (May 06, 2020)

    • Array#to_sentence no longer returns a frozen string.

      Before:

      ['one', 'two'].to_sentence.frozen?
      # => true
      

      After:

      ['one', 'two'].to_sentence.frozen?
      # => false
      

      Nicolas Dular

    • Update ActiveSupport::Messages::Metadata#fresh? to work for cookies with expiry set when ActiveSupport.parse_json_times = true.

      Christian Gregg

    Rails 6.0.2.2 (March 19, 2020)

    • No changes.
    Commits
    • 34991a6 Preparing for 6.0.3.1 release
    • 2c8fe2a bumping version, updating changelog
    • 0ad524a update changelog
    • bd39a13 activesupport: Deprecate Marshal.load on raw cache read in RedisCacheStore
    • 0a7ce52 activesupport: Avoid Marshal.load on raw cache value in MemCacheStore
    • b738f19 Preparing for 6.0.3 release
    • 509b9da Preparing for 6.0.3.rc1 release
    • 02d07cc adds missing require [Fixes #39042]
    • f2f7bcc Fix Builder::XmlMarkup lazy load in Array#to_xml
    • 320734e Merge pull request #36941 from ts-3156/master
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump nokogiri from 1.10.4 to 1.10.8 in /docs

    Bump nokogiri from 1.10.4 to 1.10.8 in /docs

    Bumps nokogiri from 1.10.4 to 1.10.8.

    Release notes

    Sourced from nokogiri's releases.

    1.10.8 / 2020-02-10

    Security

    [MRI] Pulled in upstream patch from libxml that addresses CVE-2020-7595. Full details are available in #1992. Note that this patch is not yet (as of 2020-02-10) in an upstream release of libxml.

    1.10.7 / 2019-12-03

    Bug

    • [MRI] Ensure the patch applied in v1.10.6 works with GNU patch. #1954

    1.10.6 / 2019-12-03

    Bug

    • [MRI] Fix FreeBSD installation of vendored libxml2. [#1941, #1953] (Thanks, @​nurse!)

    1.10.5 / 2019-10-31

    Dependencies

    • [MRI] vendored libxml2 is updated from 2.9.9 to 2.9.10
    • [MRI] vendored libxslt is updated from 1.1.33 to 1.1.34
    Changelog

    Sourced from nokogiri's changelog.

    1.10.8 / 2020-02-10

    Security

    [MRI] Pulled in upstream patch from libxml that addresses CVE-2020-7595. Full details are available in #1992. Note that this patch is not yet (as of 2020-02-10) in an upstream release of libxml.

    1.10.7 / 2019-12-03

    Fixed

    • [MRI] Ensure the patch applied in v1.10.6 works with GNU patch. [#1954]

    1.10.6 / 2019-12-03

    Fixed

    1.10.5 / 2019-10-31

    Security

    [MRI] Vendored libxslt upgraded to v1.1.34 which addresses three CVEs for libxslt:

    • CVE-2019-13117
    • CVE-2019-13118
    • CVE-2019-18197
    • CVE-2019-19956

    More details are available at #1943.

    Dependencies

    • [MRI] vendored libxml2 is updated from 2.9.9 to 2.9.10
    • [MRI] vendored libxslt is updated from 1.1.33 to 1.1.34
    Commits
    • 6ce10d1 version bump to v1.10.8
    • 2320f5b update CHANGELOG for v1.10.8
    • 4a77fdb remove patches from the hoe Manifest
    • 570b6cb update to use rake-compiler ~1.1.0
    • 2cdb68e backport libxml2 patch for CVE-2020-7595
    • e6b3229 version bump to v1.10.7
    • 4f9d443 update CHANGELOG
    • 80e67ef Fix the patch from #1953 to work with both git and patch
    • 7cf1b85 Fix typo in generated metadata
    • d76180d add gem metadata
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Add named binding to components

    Add named binding to components

    https://github.com/dimes/dihedral/pull/13 added support for named typed bindings, but it was missing a cast when the named bindings were directly on the component. This PR casts named typed bindings present on the component and adds a test.

    cc @dimes

    opened by lbelaus 0
  • Support named type bindings

    Support named type bindings

    It is currently impossible to bind a type alias to another type alias. For instance, let's say there is a type alias: type Prefix string. One may want to define multiple prefixes: type MyPrefix Prefix. For purposes of injection, it would be useful to bind MyPrefix to Prefix. This PR accomplishes that.

    cc @dimes

    opened by lbelaus 0
  • Fix receiver in providers

    Fix receiver in providers

    For some reason, the component type name was being passed into a provider assignment instead of the receiver name.

    cc @dimes

    opened by lbelaus 0
  • Bump nokogiri from 1.10.8 to 1.12.5 in /docs

    Bump nokogiri from 1.10.8 to 1.12.5 in /docs

    Bumps nokogiri from 1.10.8 to 1.12.5.

    Release notes

    Sourced from nokogiri's releases.

    1.12.5 / 2021-09-27

    Security

    [JRuby] Address CVE-2021-41098 (GHSA-2rr5-8q37-2w7h).

    In Nokogiri v1.12.4 and earlier, on JRuby only, the SAX parsers resolve external entities (XXE) by default. This fix turns off entity-resolution-by-default in the JRuby SAX parsers to match the CRuby SAX parsers' behavior.

    CRuby users are not affected by this CVE.

    Fixed

    • [CRuby] Document#to_xhtml properly serializes self-closing tags in libxml > 2.9.10. A behavior change introduced in libxml 2.9.11 resulted in emitting start and and tags (e.g., <br></br>) instead of a self-closing tag (e.g., <br/>) in previous Nokogiri versions. [#2324]

    SHA256 checksums:

    36bfa3a07aced069b3f3c9b39d9fb62cb0728d284d02b079404cd55780beaeff  nokogiri-1.12.5-arm64-darwin.gem
    16b1a9ddbb70a9c998462912a5972097cbc79c3e01eb373906886ef8a469f589  nokogiri-1.12.5-java.gem
    218dcc6edd1b49cc6244b5f88afb978739bb2f3f166c271557fe5f51e4bc713c  nokogiri-1.12.5-x64-mingw32.gem
    e33bb919d64c16d931a5f26dc880969e587d225cfa97e6b56e790fb52179f527  nokogiri-1.12.5-x86-linux.gem
    e13c2ed011b8346fbd589e96fe3542d763158bc2c7ad0f4f55f6d801afd1d9ff  nokogiri-1.12.5-x86-mingw32.gem
    1ed64f7db7c1414b87fce28029f2a10128611d2037e0871ba298d00f9a00edd6  nokogiri-1.12.5-x86_64-darwin.gem
    0868c8d0a147904d4dedaaa05af5f06656f2d3c67e4432601718559bf69d6cea  nokogiri-1.12.5-x86_64-linux.gem
    2b20905942acc580697c8c496d0d1672ab617facb9d30d156b3c7676e67902ec  nokogiri-1.12.5.gem
    

    1.12.4 / 2021-08-29

    Notable fix: Namespace inheritance

    Namespace behavior when reparenting nodes has historically been poorly specified and the behavior diverged between CRuby and JRuby. As a result, making this behavior consistent in v1.12.0 introduced a breaking change.

    This patch release reverts the Builder behavior present in v1.12.0..v1.12.3 but keeps the Document behavior. This release also introduces a Document attribute to allow affected users to easily change this behavior for their legacy code without invasive changes.

    Compensating Feature in XML::Document

    This release of Nokogiri introduces a new Document boolean attribute, namespace_inheritance, which controls whether children should inherit a namespace when they are reparented. Nokogiri::XML:Document defaults this attribute to false meaning "do not inherit," thereby making explicit the behavior change introduced in v1.12.0.

    CRuby users who desire the pre-v1.12.0 behavior may set document.namespace_inheritance = true before reparenting nodes.

    See https://nokogiri.org/rdoc/Nokogiri/XML/Document.html#namespace_inheritance-instance_method for example usage.

    Fix for XML::Builder

    ... (truncated)

    Changelog

    Sourced from nokogiri's changelog.

    1.12.5 / 2021-09-27

    Security

    [JRuby] Address CVE-2021-41098 (GHSA-2rr5-8q37-2w7h).

    In Nokogiri v1.12.4 and earlier, on JRuby only, the SAX parsers resolve external entities (XXE) by default. This fix turns off entity-resolution-by-default in the JRuby SAX parsers to match the CRuby SAX parsers' behavior.

    CRuby users are not affected by this CVE.

    Fixed

    • [CRuby] Document#to_xhtml properly serializes self-closing tags in libxml > 2.9.10. A behavior change introduced in libxml 2.9.11 resulted in emitting start and and tags (e.g., <br></br>) instead of a self-closing tag (e.g., <br/>) in previous Nokogiri versions. [#2324]

    1.12.4 / 2021-08-29

    Notable fix: Namespace inheritance

    Namespace behavior when reparenting nodes has historically been poorly specified and the behavior diverged between CRuby and JRuby. As a result, making this behavior consistent in v1.12.0 introduced a breaking change.

    This patch release reverts the Builder behavior present in v1.12.0..v1.12.3 but keeps the Document behavior. This release also introduces a Document attribute to allow affected users to easily change this behavior for their legacy code without invasive changes.

    Compensating Feature in XML::Document

    This release of Nokogiri introduces a new Document boolean attribute, namespace_inheritance, which controls whether children should inherit a namespace when they are reparented. Nokogiri::XML:Document defaults this attribute to false meaning "do not inherit," thereby making explicit the behavior change introduced in v1.12.0.

    CRuby users who desire the pre-v1.12.0 behavior may set document.namespace_inheritance = true before reparenting nodes.

    See https://nokogiri.org/rdoc/Nokogiri/XML/Document.html#namespace_inheritance-instance_method for example usage.

    Fix for XML::Builder

    However, recognizing that we want Builder-created children to inherit namespaces, Builder now will set namespace_inheritance=true on the underlying document for both JRuby and CRuby. This means that, on CRuby, the pre-v1.12.0 behavior is restored.

    Users who want to turn this behavior off may pass a keyword argument to the Builder constructor like so:

    Nokogiri::XML::Builder.new(namespace_inheritance: false)
    

    See https://nokogiri.org/rdoc/Nokogiri/XML/Builder.html#label-Namespace+inheritance for example usage.

    Downstream gem maintainers

    Note that any downstream gems may want to specifically omit Nokogiri v1.12.0--v1.12.3 from their dependency specification if they rely on child namespace inheritance:

    ... (truncated)

    Commits
    • 47f6a46 version bump to v1.12.5
    • 2a0ac88 update CHANGELOG
    • 6b60637 Merge pull request #2329 from sparklemotion/flavorjones-GHSA-2rr5-8q37-2w7h_1...
    • 4bd943c fix(jruby): SAX parser uses an entity resolver
    • f943ee4 refactor(jruby): handle errors more consistently
    • 2790122 format: test files
    • 01e1618 Merge pull request #2327 from sparklemotion/2324-xhtml-self-closing-tags_v1.12.x
    • a0180c7 fix: HTML4::Document.to_xhtml self-closing tags
    • 564ac17 release v1.12.4
    • 4d5754b backport #2320
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump addressable from 2.7.0 to 2.8.0 in /docs

    Bump addressable from 2.7.0 to 2.8.0 in /docs

    Bumps addressable from 2.7.0 to 2.8.0.

    Changelog

    Sourced from addressable's changelog.

    Addressable 2.8.0

    • fixes ReDoS vulnerability in Addressable::Template#match
    • no longer replaces + with spaces in queries for non-http(s) schemes
    • fixed encoding ipv6 literals
    • the :compacted flag for normalized_query now dedupes parameters
    • fix broken escape_component alias
    • dropping support for Ruby 2.0 and 2.1
    • adding Ruby 3.0 compatibility for development tasks
    • drop support for rack-mount and remove Addressable::Template#generate
    • performance improvements
    • switch CI/CD to GitHub Actions
    Commits
    • 6469a23 Updating gemspec again
    • 2433638 Merge branch 'main' of github.com:sporkmonger/addressable into main
    • e9c76b8 Merge pull request #378 from ashmaroli/flat-map
    • 56c5cf7 Update the gemspec
    • c1fed1c Require a non-vulnerable rake
    • 0d8a312 Adding note about ReDoS vulnerability
    • 89c7613 Merge branch 'template-regexp' into main
    • cf8884f Note about alias fix
    • bb03f71 Merge pull request #371 from charleystran/add_missing_encode_component_doc_entry
    • 6d1d809 Adding note about :compacted normalization
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
Releases(0.8)
An additive dependency injection container for Golang.

Alice Alice is an additive dependency injection container for Golang. Philosophy Design philosophy behind Alice: The application components should not

Minjie Zha 43 Sep 15, 2021
🛠 A full-featured dependency injection container for go programming language.

DI Dependency injection for Go programming language. Tutorial | Examples | Advanced features Dependency injection is one form of the broader technique

Goava 108 Nov 30, 2021
A reflection based dependency injection toolkit for Go.

⚒️ dig A reflection based dependency injection toolkit for Go. Good for: Powering an application framework, e.g. Fx. Resolving the object graph during

Uber Go 2.2k Dec 5, 2021
Go Dependency Injection Framework

Dingo Dependency injection for go Hello Dingo Dingo works very very similiar to Guice Basically one binds implementations/factories to interfaces, whi

Flamingo 115 Nov 24, 2021
A dependency injection based application framework for Go.

?? Fx An application framework for Go that: Makes dependency injection easy. Eliminates the need for global state and func init(). Installation We rec

Uber Go 2.4k Dec 5, 2021
Simple Dependency Injection Container

?? gocontainer gocontainer - Dependency Injection Container ?? ABOUT Contributors: Rafał Lorenz Want to contribute ? Feel free to send pull requests!

Rafał Lorenz 14 Dec 10, 2020
Simple and yet powerful Dependency Injection for Go

goioc/di: Dependency Injection Why DI in Go? Why IoC at all? I've been using Dependency Injection in Java for nearly 10 years via Spring Framework. I'

Go IoC 121 Nov 25, 2021
Dependency Injection and Inversion of Control package

Linker Linker is Dependency Injection and Inversion of Control package. It supports the following features: Components registry Automatic dependency i

Logrange 32 May 6, 2021
Strict Runtime Dependency Injection for Golang

wire Wire is runtime depedency injection/wiring for golang. It's designed to be strict to avoid your go application running without proper dependency

Muhammad Surya 34 Sep 28, 2021
Generated dependency injection containers in go (golang)

Generation of dependency injection containers for go programs (golang). Dingo is a code generator. It generates dependency injection containers based

null 64 Nov 22, 2021
A dependency injection library that is focused on clean API and flexibility

Dependency injection DI is a dependency injection library that is focused on clean API and flexibility. DI has two types of top-level abstractions: Co

Sergey Treinis 3 Nov 2, 2021
Golang PE injection on windows

GoPEInjection Golang PE injection on windows See: https://malwareunicorn.org/workshops/peinjection.html Based on Cryptowall's PE injection technique.

malwareunicorn 137 Nov 24, 2021
two scripts written in golang that will help you recognize dependency confusion.

two scripts written in golang that will help you recognize dependency confusion.

gv1_ 5 Oct 4, 2021
Compile-time Dependency Injection for Go

Wire: Automated Initialization in Go Wire is a code generation tool that automates connecting components using dependency injection. Dependencies betw

Google 7k Dec 4, 2021
How we can run unit tests in parallel mode with failpoint injection taking effect and without injection race

This is a simple demo to show how we can run unit tests in parallel mode with failpoint injection taking effect and without injection race. The basic

amyangfei 1 Oct 31, 2021
hiboot is a high performance web and cli application framework with dependency injection support

Hiboot - web/cli application framework About Hiboot is a cloud native web and cli application framework written in Go. Hiboot is not trying to reinven

hidevops.io 162 Nov 22, 2021
An additive dependency injection container for Golang.

Alice Alice is an additive dependency injection container for Golang. Philosophy Design philosophy behind Alice: The application components should not

Minjie Zha 43 Sep 15, 2021
🛠 A full-featured dependency injection container for go programming language.

DI Dependency injection for Go programming language. Tutorial | Examples | Advanced features Dependency injection is one form of the broader technique

Goava 108 Nov 30, 2021
A reflection based dependency injection toolkit for Go.

⚒️ dig A reflection based dependency injection toolkit for Go. Good for: Powering an application framework, e.g. Fx. Resolving the object graph during

Uber Go 2.2k Dec 5, 2021
Go Dependency Injection Framework

Dingo Dependency injection for go Hello Dingo Dingo works very very similiar to Guice Basically one binds implementations/factories to interfaces, whi

Flamingo 115 Nov 24, 2021
A dependency injection based application framework for Go.

?? Fx An application framework for Go that: Makes dependency injection easy. Eliminates the need for global state and func init(). Installation We rec

Uber Go 2.4k Dec 5, 2021
Simple Dependency Injection Container

?? gocontainer gocontainer - Dependency Injection Container ?? ABOUT Contributors: Rafał Lorenz Want to contribute ? Feel free to send pull requests!

Rafał Lorenz 14 Dec 10, 2020
Simple and yet powerful Dependency Injection for Go

goioc/di: Dependency Injection Why DI in Go? Why IoC at all? I've been using Dependency Injection in Java for nearly 10 years via Spring Framework. I'

Go IoC 121 Nov 25, 2021
Dependency Injection and Inversion of Control package

Linker Linker is Dependency Injection and Inversion of Control package. It supports the following features: Components registry Automatic dependency i

Logrange 32 May 6, 2021
Strict Runtime Dependency Injection for Golang

wire Wire is runtime depedency injection/wiring for golang. It's designed to be strict to avoid your go application running without proper dependency

Muhammad Surya 34 Sep 28, 2021
Minimalistic, pluggable Golang evloop/timer handler with dependency-injection

Anagent Minimalistic, pluggable Golang evloop/timer handler with dependency-injection - based on codegangsta/inject - go-macaron/inject and chuckpresl

Ettore Di Giacinto 13 Jun 22, 2021
Gerasimos (Makis) Maropoulos 21.5k Dec 1, 2021
Generated dependency injection containers in go (golang)

Generation of dependency injection containers for go programs (golang). Dingo is a code generator. It generates dependency injection containers based

null 64 Nov 22, 2021
🦄🌈 YoyoGo is a simple, light and fast , dependency injection based micro-service framework written in Go.

???? YoyoGo is a simple, light and fast , dependency injection based micro-service framework written in Go. Support Nacos ,Consoul ,Etcd ,Eureka ,kubernetes.

YoyoFx 495 Dec 3, 2021