Documentation ¶
Index ¶
- Constants
- Variables
- type IEtcdModel
- type IEtcdModelManager
- type SEtcdBaseModel
- func (model *SEtcdBaseModel) GetExtraDetailsHeaders(ctx context.Context, userCred mcclient.TokenCredential, ...) map[string]string
- func (model *SEtcdBaseModel) GetId() string
- func (model *SEtcdBaseModel) GetModelManager() IEtcdModelManager
- func (model *SEtcdBaseModel) Keyword() string
- func (model *SEtcdBaseModel) SetId(id string)
- func (model *SEtcdBaseModel) SetModelManager(manager IEtcdModelManager, virtual IEtcdModel)
- type SEtcdBaseModelManager
- func (manager *SEtcdBaseModelManager) All(ctx context.Context, dest interface{}) error
- func (manager *SEtcdBaseModelManager) AllJson(ctx context.Context) ([]jsonutils.JSONObject, error)
- func (manager *SEtcdBaseModelManager) Allocate() IEtcdModel
- func (manager *SEtcdBaseModelManager) CustomizeHandlerInfo(handler *appsrv.SHandlerInfo)
- func (manager *SEtcdBaseModelManager) Delete(ctx context.Context, model IEtcdModel) error
- func (manager *SEtcdBaseModelManager) FetchCreateHeaderData(ctx context.Context, header http.Header) (jsonutils.JSONObject, error)
- func (manager *SEtcdBaseModelManager) FetchUpdateHeaderData(ctx context.Context, header http.Header) (jsonutils.JSONObject, error)
- func (manager *SEtcdBaseModelManager) Get(ctx context.Context, idstr string, model IEtcdModel) error
- func (manager *SEtcdBaseModelManager) GetJson(ctx context.Context, idstr string) (jsonutils.JSONObject, error)
- func (manager *SEtcdBaseModelManager) Keyword() string
- func (manager *SEtcdBaseModelManager) KeywordPlural() string
- func (manager *SEtcdBaseModelManager) Save(ctx context.Context, model IEtcdModel) error
- func (manager *SEtcdBaseModelManager) Session(ctx context.Context, model IEtcdModel) error
- func (manager *SEtcdBaseModelManager) Watch(ctx context.Context, onCreate etcd.TEtcdCreateEventFunc, ...)
Constants ¶
View Source
const ( MODEL_KEY_SEPARATOR = "/" GLOBAL_MODEL_NAMESPACE = "models" )
Variables ¶
View Source
var (
ErrNotJson = errors.New("Not a JSON")
)
Functions ¶
This section is empty.
Types ¶
type IEtcdModel ¶
type IEtcdModel interface { lockman.ILockedObject GetModelManager() IEtcdModelManager SetModelManager(IEtcdModelManager, IEtcdModel) SetId(id string) GetExtraDetailsHeaders(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) map[string]string }
type IEtcdModelManager ¶
type IEtcdModelManager interface { lockman.ILockedClass KeywordPlural() string Allocate() IEtcdModel AllJson(ctx context.Context) ([]jsonutils.JSONObject, error) GetJson(ctx context.Context, idstr string) (jsonutils.JSONObject, error) Get(ctx context.Context, idstr string, model IEtcdModel) error All(ctx context.Context, dest interface{}) error Save(ctx context.Context, model IEtcdModel) error Delete(ctx context.Context, model IEtcdModel) error Session(ctx context.Context, model IEtcdModel) error Watch(ctx context.Context, onCreate etcd.TEtcdCreateEventFunc, onModify etcd.TEtcdModifyEventFunc, onDelete etcd.TEtcdDeleteEventFunc) CustomizeHandlerInfo(handler *appsrv.SHandlerInfo) FetchCreateHeaderData(ctx context.Context, header http.Header) (jsonutils.JSONObject, error) FetchUpdateHeaderData(ctx context.Context, header http.Header) (jsonutils.JSONObject, error) }
type SEtcdBaseModel ¶
func (*SEtcdBaseModel) GetExtraDetailsHeaders ¶
func (model *SEtcdBaseModel) GetExtraDetailsHeaders(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) map[string]string
func (*SEtcdBaseModel) GetId ¶
func (model *SEtcdBaseModel) GetId() string
func (*SEtcdBaseModel) GetModelManager ¶
func (model *SEtcdBaseModel) GetModelManager() IEtcdModelManager
func (*SEtcdBaseModel) Keyword ¶
func (model *SEtcdBaseModel) Keyword() string
func (*SEtcdBaseModel) SetId ¶
func (model *SEtcdBaseModel) SetId(id string)
func (*SEtcdBaseModel) SetModelManager ¶
func (model *SEtcdBaseModel) SetModelManager(manager IEtcdModelManager, virtual IEtcdModel)
type SEtcdBaseModelManager ¶
func NewEtcdBaseModelManager ¶
func NewEtcdBaseModelManager(model IEtcdModel, keyword string, keywordPlural string) SEtcdBaseModelManager
func (*SEtcdBaseModelManager) All ¶
func (manager *SEtcdBaseModelManager) All(ctx context.Context, dest interface{}) error
func (*SEtcdBaseModelManager) AllJson ¶
func (manager *SEtcdBaseModelManager) AllJson(ctx context.Context) ([]jsonutils.JSONObject, error)
func (*SEtcdBaseModelManager) Allocate ¶
func (manager *SEtcdBaseModelManager) Allocate() IEtcdModel
func (*SEtcdBaseModelManager) CustomizeHandlerInfo ¶
func (manager *SEtcdBaseModelManager) CustomizeHandlerInfo(handler *appsrv.SHandlerInfo)
func (*SEtcdBaseModelManager) Delete ¶
func (manager *SEtcdBaseModelManager) Delete(ctx context.Context, model IEtcdModel) error
func (*SEtcdBaseModelManager) FetchCreateHeaderData ¶
func (manager *SEtcdBaseModelManager) FetchCreateHeaderData(ctx context.Context, header http.Header) (jsonutils.JSONObject, error)
func (*SEtcdBaseModelManager) FetchUpdateHeaderData ¶
func (manager *SEtcdBaseModelManager) FetchUpdateHeaderData(ctx context.Context, header http.Header) (jsonutils.JSONObject, error)
func (*SEtcdBaseModelManager) Get ¶
func (manager *SEtcdBaseModelManager) Get(ctx context.Context, idstr string, model IEtcdModel) error
func (*SEtcdBaseModelManager) GetJson ¶
func (manager *SEtcdBaseModelManager) GetJson(ctx context.Context, idstr string) (jsonutils.JSONObject, error)
func (*SEtcdBaseModelManager) Keyword ¶
func (manager *SEtcdBaseModelManager) Keyword() string
func (*SEtcdBaseModelManager) KeywordPlural ¶
func (manager *SEtcdBaseModelManager) KeywordPlural() string
func (*SEtcdBaseModelManager) Save ¶
func (manager *SEtcdBaseModelManager) Save(ctx context.Context, model IEtcdModel) error
func (*SEtcdBaseModelManager) Session ¶
func (manager *SEtcdBaseModelManager) Session(ctx context.Context, model IEtcdModel) error
func (*SEtcdBaseModelManager) Watch ¶
func (manager *SEtcdBaseModelManager) Watch(ctx context.Context, onCreate etcd.TEtcdCreateEventFunc, onModify etcd.TEtcdModifyEventFunc, onDelete etcd.TEtcdDeleteEventFunc, )
Click to show internal directories.
Click to hide internal directories.