Top 0.7% dependent packages on proxy.golang.org
Top 1.3% dependent repos on proxy.golang.org
proxy.golang.org : github.com/storezhang/dig
Package dig provides an opinionated way of resolving object dependencies. STABLE. No breaking changes will be made in this major version. Dig exposes type Container as an object capable of resolving a directed acyclic dependency graph. Use the New function to create one. Constructors for different types are added to the container by using the Provide method. A constructor can declare a dependency on another type by simply adding it as a function parameter. Dependencies for a type can be added to the graph both, before and after the type was added. Multiple constructors can rely on the same type. The container creates a singleton for each retained type, instantiating it at most once when requested directly or as a dependency of another type. Constructors can declare any number of dependencies as parameters and optionally, return errors. Constructors can also return multiple results to add multiple types to the container. Constructors that accept a variadic number of arguments are treated as if they don't have those arguments. That is, Is treated the same as, The constructor will be called with all other dependencies and no variadic arguments. Types added to to the container may be consumed by using the Invoke method. Invoke accepts any function that accepts one or more parameters and optionally, returns an error. Dig calls the function with the requested type, instantiating only those types that were requested by the function. The call fails if any type or its dependencies (both direct and transitive) were not available in the container. Any error returned by the invoked function is propagated back to the caller. Constructors declare their dependencies as function parameters. This can very quickly become unreadable if the constructor has a lot of dependencies. A pattern employed to improve readability in a situation like this is to create a struct that lists all the parameters of the function as fields and changing the function to accept that struct instead. This is referred to as a parameter object. Dig has first class support for parameter objects: any struct embedding dig.In gets treated as a parameter object. The following is equivalent to the constructor above. Handlers can receive any combination of parameter objects and parameters. Result objects are the flip side of parameter objects. These are structs that represent multiple outputs from a single function as fields in the struct. Structs embedding dig.Out get treated as result objects. The above is equivalent to, Constructors often don't have a hard dependency on some types and are able to operate in a degraded state when that dependency is missing. Dig supports declaring dependencies as optional by adding an `optional:"true"` tag to fields of a dig.In struct. Fields in a dig.In structs that have the `optional:"true"` tag are treated as optional by Dig. If an optional field is not available in the container, the constructor will receive a zero value for the field. Constructors that declare dependencies as optional MUST handle the case of those dependencies being absent. The optional tag also allows adding new dependencies without breaking existing consumers of the constructor. Some use cases call for multiple values of the same type. Dig allows adding multiple values of the same type to the container with the use of Named Values. Named Values can be produced by passing the dig.Name option when a constructor is provided. All values produced by that constructor will have the given name. Given the following constructors, You can provide *sql.DB into a Container under different names by passing the dig.Name option. Alternatively, you can produce a dig.Out struct and tag its fields with `name:".."` to have the corresponding value added to the graph under the specified name. Regardless of how a Named Value was produced, it can be consumed by another constructor by accepting a dig.In struct which has exported fields with the same name AND type that you provided. The name tag may be combined with the optional tag to declare the dependency optional. Added in Dig 1.2. Dig provides value groups to allow producing and consuming many values of the same type. Value groups allow constructors to send values to a named, unordered collection in the container. Other constructors can request all values in this collection as a slice. Constructors can send values into value groups by returning a dig.Out struct tagged with `group:".."`. Any number of constructors may provide values to this named collection. Other constructors can request all values for this collection by requesting a slice tagged with `group:".."`. This will execute all constructors that provide a value to that group in an unspecified order. Note that values in a value group are unordered. Dig makes no guarantees about the order in which these values will be produced. Value groups can be used to provide multiple values for a group from a dig.Out using slices, however considering groups are retrieved by requesting a slice this implies that the values must be retrieved using a slice of slices. As of dig v1.9.0, if you want to provide individual elements to the group instead of the slice itself, you can add the `flatten` modifier to the group from a dig.Out.
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/storezhang/dig
License: Apache-2.0
Latest release: almost 4 years ago
First release: almost 4 years ago
Namespace: github.com/storezhang
Dependent packages: 48
Dependent repositories: 18
Stars: 1 on GitHub
Forks: 1 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 29 days ago
github.com/storezhang/pangu v1.7.4
142 versions - Latest release: 16 days ago - 23 dependent packages - 2 dependent repositoriesgithub.com/pangum/pangu v1.7.4
119 versions - Latest release: 16 days ago - 46 dependent packages - 19 dependent repositoriesgithub.com/storezhang/pangu-schedule v0.1.6
16 versions - Latest release: about 1 month agogithub.com/pangum/schedule v0.1.6
盘古计划任务集成16 versions - Latest release: about 1 month ago - 2 dependent packages - 1 dependent repositories - 1 stars on GitHub
github.com/pangum/loki v0.1.2
Loki日志收集器,方便把日志推送到Loki平台供下一步分析12 versions - Latest release: 3 months ago - 1 stars on GitHub
github.com/pangum/db v0.2.4
盘古数据库适配,集成了常用的功能,包括:1、集成XORM操作数据库;2、增加SSH隧道连接功能;3、统一日志输出;4、集成盘古框架,最大程序的方便业务开发24 versions - Latest release: 4 months ago - 1 stars on GitHub
gitlab.com/ruijc/core v0.2.1
21 versions - Latest release: 7 months agogithub.com/pangum/pangu-grpc v1.0.8
68 versions - Latest release: 7 months agogithub.com/storezhang/pangu-grpc v1.0.8
68 versions - Latest release: 7 months agogithub.com/pangum/grpc v1.0.8
68 versions - Latest release: 7 months ago - 6 dependent packages - 1 dependent repositoriesgithub.com/storezhang/pangu-http v1.0.3
盘古Http客户端适配,集成以下功能:1、易用的API;2、统一的调用接口;3、自动配置;4、智能化40 versions - Latest release: 9 months ago - 2 dependent packages - 1 dependent repositories - 1 stars on GitHub
github.com/pangum/http v1.0.3
40 versions - Latest release: 9 months ago - 10 dependent packages - 7 dependent repositoriesgithub.com/pangum/pangu-http v1.0.3
40 versions - Latest release: 9 months agogithub.com/pangum/storage v0.1.3
微服务中存储集成,这个项目属于内部项目,服务器代码不开源,使用时请注意13 versions - Latest release: 9 months ago - 0 stars on GitHub
github.com/pangum/qingniao v0.0.5
青鸟通知框架集成,提供一站式通知方案,兼容各种通知方式,包括:1、邮件;2、短信;3、推送等试;支持如下厂商:1、腾讯云;2、阿里云;3、自建服务器6 versions - Latest release: 9 months ago - 0 stars on GitHub
github.com/pangum/id v0.0.9
编号算法生成器集成,通过配置文件来配置生成算法,包括:1、雪花算法;2、自增算法9 versions - Latest release: 10 months ago - 1 stars on GitHub
github.com/pangum/pid v0.0.9
编号算法生成器集成,通过配置文件来配置生成算法,包括:1、雪花算法;2、自增算法9 versions - Latest release: 10 months ago - 1 dependent package - 1 stars on GitHub
github.com/pangum/database v1.1.0
30 versions - Latest release: 10 months agogithub.com/pangum/casdoor v0.0.1
盘古框架Casdoor插件,通过Casdoor插件,可以让应用快速接入Casdoor账号中心,应用只需要关注业务即可1 version - Latest release: over 1 year ago - 1 stars on GitHub
github.com/pangum/yangzone v0.0.4
Yangzone盘古集成4 versions - Latest release: over 1 year ago - 0 stars on GitHub
github.com/goexl/sqs v0.1.4
亚马逊云简单消息队列封装14 versions - Latest release: over 1 year ago - 3 dependent packages - 1 stars on GitHub
github.com/pangum/pangu-aws-sqs v0.0.6
6 versions - Latest release: over 1 year agogithub.com/pangum/sqs v0.0.6
盘古亚马逊云简单消息队列集成6 versions - Latest release: over 1 year ago - 1 stars on GitHub
github.com/pangum/cdn v0.0.9
8 versions - Latest release: over 1 year agogithub.com/pangum/app v0.0.1
微服务中应用集成,这个项目属于内部项目,服务器代码不开源,使用时请注意1 version - Latest release: over 1 year ago - 0 stars on GitHub
github.com/pangum/promethy v0.0.3
普罗米修斯集成,常用功能封装,包括:1、常用功能封装;2、监控数据暴露3 versions - Latest release: over 1 year ago - 1 dependent package - 1 stars on GitHub
github.com/pangum/valuer v0.0.4
Golang字符串值,提供从字符串解析真正的值的功能,字符串可以是:1、环境变量;2、表达式4 versions - Latest release: over 1 year ago - 2 dependent packages - 1 stars on GitHub
gitea.com/ruijc/storage v0.0.5
存储5 versions - Latest release: over 1 year ago - 1 dependent package - 0 stars on gitea.com
gitea.com/ruijc/app v0.0.9
应用9 versions - Latest release: over 1 year ago - 3 dependent packages - 1 dependent repositories - 0 stars on gitea.com
github.com/storezhang/pangu-logging v1.0.0
27 versions - Latest release: almost 2 years ago - 3 dependent packagesgithub.com/storezhang/ddns v0.0.0-20230616121111-2c0b07c6afae
一个功能异常强大的DDNS客户端,实现了如下功能:1、多厂商支持;2、实时感知配置文件变化 ;3、支持CNAME、A、AAAA等解析;4、适合大量域名解析5 versions - Latest release: almost 2 years ago - 5 stars on GitHub
github.com/pangum/pangu-migration v1.0.2
18 versions - Latest release: about 2 years agogithub.com/storezhang/pangu-aws-sqs v1.0.3
10 versions - Latest release: about 2 years agogithub.com/storezhang/pangu-web v1.1.3
19 versions - Latest release: about 2 years agogithub.com/storezhang/pangu-migration v1.0.2
22 versions - Latest release: about 2 years agogithub.com/pangum/starter v0.0.0-20230331042909-405837f17fe7
盘古框架启动器项目模板,提供基本的代码样例,其它启动器可以在现有代码的基础上做出更改来达到开始盘古启动器的目的1 version - Latest release: about 2 years ago - 2 stars on GitHub
github.com/pangum/migration v1.0.2
盘古数据迁移集成22 versions - Latest release: over 2 years ago - 2 stars on GitHub
github.com/pangum/logging v1.0.0
27 versions - Latest release: over 2 years ago - 35 dependent packages - 12 dependent repositoriesgithub.com/pangum/songci v0.0.3
Goexl签名框架集成,提供常见的签名验签操作3 versions - Latest release: over 2 years ago - 2 stars on GitHub
github.com/storezhang/cli v0.0.4
5 versions - Latest release: over 2 years ago - 2 dependent packagesgithub.com/pangum/apisix v0.0.2
盘古框架Apisix网关集成,提供Apisix常见功能接口封装2 versions - Latest release: over 2 years ago - 1 dependent package - 1 stars on GitHub
github.com/pangum/ft v0.0.4
国办52号文信易贷相关接口盘古框架集成4 versions - Latest release: over 2 years ago - 1 dependent package - 1 dependent repositories - 1 stars on GitHub
github.com/pangum/dns v0.0.2
域名解析盘古集成启动器,集成了goexl/dns,方便在盘古系统内解析域名2 versions - Latest release: over 2 years ago - 1 dependent package - 1 dependent repositories - 0 stars on GitHub
github.com/pangum/pangu-logging v0.1.6 removed
15 versions - Latest release: over 2 years agogithub.com/pangum/wanip v0.0.4
外网地址盘古集成,包括以下功能:1、增加Http客户端集成;2、增加日志集成;3、增加配置文件4 versions - Latest release: over 2 years ago - 1 dependent package - 1 dependent repositories - 1 stars on GitHub
github.com/pangum/web v0.0.7
盘古Web服务器集成7 versions - Latest release: almost 3 years ago - 2 stars on GitHub
github.com/pangum/pangu-mqtt v0.2.8 removed
28 versions - Latest release: about 3 years agogithub.com/pangum/mqtt v0.2.8
28 versions - Latest release: about 3 years ago - 1 dependent repositoriesgithub.com/storezhang/pangu-mqtt v0.2.8
28 versions - Latest release: about 3 years agogithub.com/pangum/pulsar v0.0.2
盘古框架Pulsar MQ系统集成,提供更友好的API接口,同时支持如下功能:1、易于接入;2、提供多种序列化和反序列化(包括:Protobuf、JSON、XML以及Msgpack);3、多集群接入2 versions - Latest release: about 3 years ago - 2 stars on GitHub
github.com/usmile-ok/elasticsearch v0.0.26
盘古Elasticsearch搜索集成26 versions - Latest release: over 3 years ago - 0 stars on GitHub
github.com/pangum/pangu-database v1.0.8 removed
16 versions - Latest release: almost 4 years agogithub.com/storezhang/pangu-database v1.0.8
33 versions - Latest release: almost 4 years agoCheck this option to include packages that no longer depend on this package in their latest version but previously did.