Documentation ¶
Index ¶
- Constants
- func ConfigIocObject(req *LoadConfigRequest) error
- 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 ValidateFileType(ext string) error
- func ValidateIocObject(obj Object) error
- type ConfigEnv
- type ConfigFile
- type GRPCControllerObject
- type GetOption
- type GinApiObject
- type GoRestfulApiObject
- type LoadConfigRequest
- type NamespaceStore
- func (s *NamespaceStore) Close() error
- func (s *NamespaceStore) First() Object
- func (s *NamespaceStore) ForEach(fn func(Object))
- func (s *NamespaceStore) Get(name string, opts ...GetOption) Object
- func (s *NamespaceStore) Init() error
- func (s *NamespaceStore) Last() Object
- func (s *NamespaceStore) Len() int
- func (s *NamespaceStore) Less(i, j int) bool
- func (i *NamespaceStore) LoadFromEnv(prefix string) error
- func (i *NamespaceStore) LoadFromFile(filename string) error
- func (s *NamespaceStore) ObjectUids() (uids []string)
- func (s *NamespaceStore) Registry(obj Object)
- func (s *NamespaceStore) SetPriority(v int) *NamespaceStore
- func (s *NamespaceStore) Sort()
- func (s *NamespaceStore) Swap(i, j int)
- type Object
- type ObjectImpl
- type StoreManage
- type StoreUser
- type Stroe
Constants ¶
View Source
const (
DEFAULT_VERSION = "v1"
)
Variables ¶
This section is empty.
Functions ¶
func ConfigIocObject ¶ added in v1.9.20
func ConfigIocObject(req *LoadConfigRequest) error
func InitIocObject ¶
func InitIocObject() error
func LoadGoRestfulApi ¶
func LoadGoRestfulApi(pathPrefix string, root *restful.Container)
LoadHttpApp 装载所有的http app
func ValidateFileType ¶ added in v1.9.20
func ValidateIocObject ¶ added in v1.9.19
Types ¶
type ConfigFile ¶ added in v1.9.20
type GRPCControllerObject ¶
GRPCService GRPC服务的实例
type GinApiObject ¶
type GoRestfulApiObject ¶
type GoRestfulApiObject interface { Object Registry(*restful.WebService) }
type LoadConfigRequest ¶ added in v1.9.20
type LoadConfigRequest struct { // 环境变量配置 ConfigEnv *ConfigEnv // 文件配置方式 ConfigFile *ConfigFile }
func NewLoadConfigRequest ¶ added in v1.9.20
func NewLoadConfigRequest() *LoadConfigRequest
type NamespaceStore ¶ added in v1.9.20
type NamespaceStore struct { // 空间名称 Namespace string // 空间优先级 Priority int // 空间对象列表 Items []Object }
func (*NamespaceStore) Close ¶ added in v1.9.20
func (s *NamespaceStore) Close() error
func (*NamespaceStore) ForEach ¶ added in v1.9.20
func (s *NamespaceStore) ForEach(fn func(Object))
func (*NamespaceStore) Get ¶ added in v1.9.20
func (s *NamespaceStore) Get(name string, opts ...GetOption) Object
func (*NamespaceStore) Init ¶ added in v1.9.20
func (s *NamespaceStore) Init() error
func (*NamespaceStore) Len ¶ added in v1.9.20
func (s *NamespaceStore) Len() int
func (*NamespaceStore) Less ¶ added in v1.9.20
func (s *NamespaceStore) Less(i, j int) bool
func (*NamespaceStore) LoadFromEnv ¶ added in v1.9.20
func (i *NamespaceStore) LoadFromEnv(prefix string) error
从环境变量中加载对象配置
func (*NamespaceStore) LoadFromFile ¶ added in v1.9.20
func (i *NamespaceStore) LoadFromFile(filename string) error
func (*NamespaceStore) ObjectUids ¶ added in v1.9.20
func (s *NamespaceStore) ObjectUids() (uids []string)
func (*NamespaceStore) Registry ¶ added in v1.9.20
func (s *NamespaceStore) Registry(obj Object)
func (*NamespaceStore) SetPriority ¶ added in v1.9.20
func (s *NamespaceStore) SetPriority(v int) *NamespaceStore
func (*NamespaceStore) Swap ¶ added in v1.9.20
func (s *NamespaceStore) Swap(i, j int)
type Object ¶ added in v1.9.19
type Object interface { // 对象初始化 Init() error // 对象的名称 Name() string // 对象版本 Version() string // 对象优先级 Priority() int // 对象的销毁 Destory() // 是否允许同名对象被替换, 默认不允许被替换 AllowOverwrite() bool }
Object 内部服务实例, 不需要暴露
type ObjectImpl ¶ added in v1.9.20
type ObjectImpl struct { }
func (*ObjectImpl) AllowOverwrite ¶ added in v1.9.20
func (i *ObjectImpl) AllowOverwrite() bool
func (*ObjectImpl) Destory ¶ added in v1.9.20
func (i *ObjectImpl) Destory()
func (*ObjectImpl) Init ¶ added in v1.9.20
func (i *ObjectImpl) Init() error
func (*ObjectImpl) Name ¶ added in v1.9.20
func (i *ObjectImpl) Name() string
func (*ObjectImpl) Priority ¶ added in v1.9.20
func (i *ObjectImpl) Priority() int
func (*ObjectImpl) Version ¶ added in v1.9.20
func (i *ObjectImpl) Version() string
type StoreManage ¶ added in v1.9.20
type StoreUser ¶ added in v1.9.20
type Stroe ¶ added in v1.9.20
type Stroe interface { StoreUser StoreManage }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.