Documentation
¶
Index ¶
- Constants
- func InitIocObject() error
- func ListApiObjectNames() (names []string)
- func ListControllerObjectNames() (names []string)
- func LoadGinApi(pathPrefix string, root gin.IRouter)
- func LoadGoRestfulApi(pathPrefix string, root *restful.Container)
- func LoadGrpcController(server *grpc.Server)
- func ObjectUid(o Object) string
- func RegistryApi(obj Object)
- func RegistryController(obj Object)
- func RegistryObjectWithNs(namespace string, obj Object)
- func ValidateIocObject(obj Object) error
- type GRPCControllerObject
- type GetOption
- type GinApiObject
- type GoRestfulApiObject
- type IocObjectImpl
- type Object
- type ObjectSet
- func (s *ObjectSet) Close() error
- func (s *ObjectSet) First() Object
- func (s *ObjectSet) ForEach(fn func(Object))
- func (s *ObjectSet) Get(name string, opts ...GetOption) Object
- func (s *ObjectSet) Init() error
- func (s *ObjectSet) Last() Object
- func (s *ObjectSet) Len() int
- func (s *ObjectSet) Less(i, j int) bool
- func (s *ObjectSet) ObjectUids() (uids []string)
- func (s *ObjectSet) Registry(obj Object)
- func (s *ObjectSet) SetPriority(v int) *ObjectSet
- func (s *ObjectSet) Sort()
- func (s *ObjectSet) Swap(i, j int)
- func (s *ObjectSet) UnPack() error
- type ObjectStroe
Constants ¶
View Source
const (
DEFAULT_VERSION = "v1"
)
Variables ¶
This section is empty.
Functions ¶
func LoadGoRestfulApi ¶
LoadHttpApp 装载所有的http app
func ValidateIocObject ¶ added in v1.9.19
Types ¶
type GRPCControllerObject ¶
GRPCService GRPC服务的实例
type GinApiObject ¶
type GoRestfulApiObject ¶
type GoRestfulApiObject interface {
Object
Registry(*restful.WebService)
}
type IocObjectImpl ¶
type IocObjectImpl struct {
}
func (*IocObjectImpl) AllowOverwrite ¶ added in v1.9.19
func (i *IocObjectImpl) AllowOverwrite() bool
func (*IocObjectImpl) Destory ¶ added in v1.9.19
func (i *IocObjectImpl) Destory()
func (*IocObjectImpl) Init ¶
func (i *IocObjectImpl) Init() error
func (*IocObjectImpl) Name ¶
func (i *IocObjectImpl) Name() string
func (*IocObjectImpl) Priority ¶
func (i *IocObjectImpl) Priority() int
func (*IocObjectImpl) Version ¶ added in v1.9.17
func (i *IocObjectImpl) Version() string
type Object ¶ added in v1.9.19
type Object interface {
// 对象初始化
Init() error
// 对象的名称
Name() string
// 对象版本
Version() string
// 对象优先级
Priority() int
// 对象的销毁
Destory()
// 是否允许同名对象被替换, 默认不允许被替换
AllowOverwrite() bool
}
Object 内部服务实例, 不需要暴露
type ObjectSet ¶ added in v1.9.19
func (*ObjectSet) ObjectUids ¶ added in v1.9.19
func (*ObjectSet) SetPriority ¶ added in v1.9.19
Source Files
¶
Click to show internal directories.
Click to hide internal directories.