Documentation ¶
Index ¶
- type Reader
- type Scheme
- func (s *Scheme) AddKnownTypeWithName(kind string, obj any, keyFunc cache.KeyFunc) error
- func (s *Scheme) AddKnownTypes(types ...any) error
- func (s *Scheme) AllKnownTypes() map[string]reflect.Type
- func (s *Scheme) KindKeyFunc(kind string) (cache.KeyFunc, error)
- func (s *Scheme) New(kind string) (any, error)
- func (s *Scheme) ObjectKeyFunc(obj any) (cache.KeyFunc, error)
- func (s *Scheme) ObjectKind(obj any) (string, error)
- func (s *Scheme) ObjectsKeyFunc(objs any) (cache.KeyFunc, error)
- func (s *Scheme) ObjectsKind(objs any) (string, error)
- func (s *Scheme) Recognizes(kind string) bool
- type SchemeObject
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Reader ¶
type Reader interface { // Get 获取数据 Get(ctx context.Context, key string, out any) error // List 获取数据列表 List(ctx context.Context, out any) error }
Reader 读取器
type Scheme ¶
type Scheme struct {
// contains filtered or unexported fields
}
Scheme is a structure used for managing type registration and lookup by their kind names. It maintains a bidirectional mapping between kind names (strings) and their corresponding Go types (reflect.Type).
func (*Scheme) AddKnownTypeWithName ¶
AddKnownTypeWithName 添加已知类型
func (*Scheme) AddKnownTypes ¶
AddKnownTypes 添加已知类型
func (*Scheme) AllKnownTypes ¶
AllKnownTypes 获取所有已知类型
func (*Scheme) KindKeyFunc ¶
KindKeyFunc 获取类型的键
func (*Scheme) ObjectKeyFunc ¶
ObjectKeyFunc 获取对象的键
func (*Scheme) ObjectsKeyFunc ¶
ObjectsKeyFunc 获取对象的键
func (*Scheme) ObjectsKind ¶
ObjectsKind 获取对象的类型
type SchemeObject ¶
SchemeObject 方案对象
Click to show internal directories.
Click to hide internal directories.