Documentation
¶
Index ¶
- func NewMainModule() *application.ModuleBuilder
- func NewTestModule() *application.ModuleBuilder
- type BinaryEntry
- type Class
- type ClassAlias
- type ClassGetter
- type ClassInfo
- type ClassLoader
- type ClassName
- type Configuration
- type Driver
- type DriverGetter
- type DriverInfo
- type Entry
- type JSONEntry
- type NS
- type Namespace
- type NamespaceGetter
- type NamespaceInfo
- type NamespaceLoader
- type Options
- type Registration
- type Registry
- type Service
- type SimpleName
- type Store
- type StoreGetter
- type StoreInfo
- type StoreLoader
- type TextEntry
- type Want
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BinaryEntry ¶
BinaryEntry 是 二进制 形式的 Entry
type Class ¶
type Class interface {
Name() ClassName
Alias() ClassAlias
Namespace() Namespace
GetTextEntry(id string) TextEntry
GetBinaryEntry(id string) BinaryEntry
GetJSONEntry(id string) JSONEntry
}
Class 代表一个类型
type ClassAlias ¶
type ClassAlias string
ClassAlias 表示类型的别名
func (ClassAlias) String ¶
func (cn ClassAlias) String() string
type ClassGetter ¶
ClassGetter ...
type ClassInfo ¶
type ClassInfo struct {
ID string // 在 properties 中的 ID
Namespace NS // refer to NS.name
Store string // refer to Store.name
SimpleName SimpleName // simple name of this class
MaxAge time.Duration
Enabled bool
Class Class
Loader ClassLoader
}
ClassInfo ...
type ClassLoader ¶
ClassLoader ...
type Configuration ¶
type Configuration struct {
Name string // name of this config
Driver string
Host string
Port int
Username string
Password string
DefaultMaxAge time.Duration
Enabled bool
}
Configuration 表示 store 的配置
type DriverGetter ¶
DriverGetter ...
type Namespace ¶
type Namespace interface {
Name() NS
GetClass(alias ClassAlias) (Class, error)
}
Namespace 代表命名空间
type NamespaceGetter ¶
NamespaceGetter ...
type NamespaceLoader ¶
NamespaceLoader ...
type Registration ¶
type Registration struct {
Enabled bool
Priority int
Driver *DriverInfo
}
Registration 注册信息
type Service ¶
type Service interface {
GetClassNS(ns NS, alias ClassAlias) (Class, error)
ClassGetter
DriverGetter
NamespaceGetter
StoreGetter
}
Service 提供面向客户端的服务
type Store ¶
type Store interface {
Put(key string, value []byte, opt *Options) error
Get(key string) ([]byte, error)
Contains(key string) (bool, error)
}
Store 代表一个存储库
type StoreGetter ¶
StoreGetter ...
type StoreInfo ¶
type StoreInfo struct {
Enabled bool
Name string
Host string
Port int
Username string
Password string
Driver string
MaxAge time.Duration
Store Store
}
StoreInfo ...
type StoreLoader ¶
StoreLoader ...
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
gen
|
|
|
modules
|
|
|
src
|
|
|
configen/golang
command
|
|
|
main/golang
command
|
|
|
test/golang
command
|
|
Click to show internal directories.
Click to hide internal directories.