Documentation ¶
Index ¶
- Constants
- func InitDB() error
- type SParameter
- func (model *SParameter) AllowDeleteItem(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (model *SParameter) AllowGetDetails(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (model *SParameter) AllowUpdateItem(ctx context.Context, userCred mcclient.TokenCredential) bool
- func (model *SParameter) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (model *SParameter) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (model *SParameter) IsOwner(userCred mcclient.TokenCredential) bool
- func (model *SParameter) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*jsonutils.JSONDict, error)
- type SParameterManager
- func (manager *SParameterManager) AllowCreateItem(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (manager *SParameterManager) AllowListItems(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (manager *SParameterManager) FilterById(q *sqlchemy.SQuery, idStr string) *sqlchemy.SQuery
- func (manager *SParameterManager) FilterByName(q *sqlchemy.SQuery, name string) *sqlchemy.SQuery
- func (manager *SParameterManager) FilterByOwner(q *sqlchemy.SQuery, owner string) *sqlchemy.SQuery
- func (manager *SParameterManager) GetOwnerId(userCred mcclient.IIdentityProvider) string
- func (manager *SParameterManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SParameterManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, ...) (*jsonutils.JSONDict, error)
Constants ¶
View Source
const ( NAMESPACE_USER = "user" NAMESPACE_SERVICE = "service" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type SParameter ¶
type SParameter struct { db.SResourceBase Id int64 `primary:"true" auto_increment:"true" list:"user"` // = Column(BigInteger, primary_key=True) CreatedBy string `width:"128" charset:"ascii" nullable:"false" create:"required" list:"user"` // Column(VARCHAR(length=128, charset='ascii'), nullable=False) UpdatedBy string `width:"128" charset:"ascii" nullable:"false" create:"required" update:"user" list:"user"` // Column(VARCHAR(length=128, charset='ascii'), nullable=False) "user"/ serviceName/ "admin" Namespace string `width:"64" charset:"ascii" default:"user" nullable:"false" create:"required" list:"admin"` // Column(VARCHAR(length=128, charset='ascii'), nullable=False) user_id / serviceid NamespaceId string `width:"128" charset:"ascii" nullable:"false" index:"true" create:"required" list:"admin"` // Column(VARCHAR(length=128, charset='ascii'), nullable=False) Name string `width:"128" charset:"ascii" nullable:"false" index:"true" create:"required" list:"user"` // Column(VARCHAR(length=128, charset='ascii'), nullable=false) Value jsonutils.JSONObject `charset:"utf8" create:"required" update:"user" update:"user" list:"user"` // Column(VARCHAR(charset='utf-8')) }
func (*SParameter) AllowDeleteItem ¶
func (model *SParameter) AllowDeleteItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SParameter) AllowGetDetails ¶
func (model *SParameter) AllowGetDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool
func (*SParameter) AllowUpdateItem ¶
func (model *SParameter) AllowUpdateItem(ctx context.Context, userCred mcclient.TokenCredential) bool
func (*SParameter) CustomizeDelete ¶
func (model *SParameter) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) error
func (*SParameter) Delete ¶
func (model *SParameter) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
func (*SParameter) IsOwner ¶
func (model *SParameter) IsOwner(userCred mcclient.TokenCredential) bool
func (*SParameter) ValidateUpdateData ¶
func (model *SParameter) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
type SParameterManager ¶
type SParameterManager struct {
db.SResourceBaseManager
}
var ParameterManager *SParameterManager
func (*SParameterManager) AllowCreateItem ¶
func (manager *SParameterManager) AllowCreateItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
func (*SParameterManager) AllowListItems ¶
func (manager *SParameterManager) AllowListItems(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool
func (*SParameterManager) FilterById ¶
func (*SParameterManager) FilterByName ¶
func (*SParameterManager) FilterByOwner ¶
func (*SParameterManager) GetOwnerId ¶
func (manager *SParameterManager) GetOwnerId(userCred mcclient.IIdentityProvider) string
func (*SParameterManager) ListItemFilter ¶
func (manager *SParameterManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*sqlchemy.SQuery, error)
func (*SParameterManager) ValidateCreateData ¶
func (manager *SParameterManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
Click to show internal directories.
Click to hide internal directories.