Documentation ¶
Index ¶
- Constants
- func InitDB() error
- type SParameter
- 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) GetId() string
- func (model *SParameter) GetName() string
- func (model *SParameter) GetOwnerId() mcclient.IIdentityProvider
- func (parameter *SParameter) GetShortDesc(ctx context.Context) *jsonutils.JSONDict
- func (model *SParameter) IsOwner(userCred mcclient.TokenCredential) bool
- func (parameter *SParameter) PerformClone(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (model *SParameter) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*jsonutils.JSONDict, error)
- type SParameterManager
- func (manager *SParameterManager) CreateByInsertOrUpdate() bool
- func (manager *SParameterManager) DisableBugReport(ctx context.Context) error
- func (manager *SParameterManager) EnableBugReport(ctx context.Context) bool
- func (manager *SParameterManager) FetchOwnerId(ctx context.Context, data jsonutils.JSONObject) (mcclient.IIdentityProvider, error)
- func (manager *SParameterManager) FetchParameters(nsType string, nsId string, name string) ([]SParameter, error)
- 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(ctx context.Context, q *sqlchemy.SQuery, man db.FilterByOwnerProvider, ...) *sqlchemy.SQuery
- func (manager *SParameterManager) GetBugReportEnabled() bool
- func (manager *SParameterManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SParameterManager) NamespaceScope() rbacscope.TRbacScope
- func (manager *SParameterManager) OrderByExtraFields(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SParameterManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)
- func (manager *SParameterManager) ResourceScope() rbacscope.TRbacScope
- func (manager *SParameterManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*jsonutils.JSONDict, error)
- type SScopedPolicy
- func (policy *SScopedPolicy) PerformBind(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (policy *SScopedPolicy) ValidateDeleteCondition(ctx context.Context, info jsonutils.JSONObject) error
- func (policy *SScopedPolicy) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (api.ScopedPolicyUpdateInput, error)
- type SScopedPolicyBinding
- type SScopedPolicyBindingManager
- func (manager *SScopedPolicyBindingManager) FetchCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) []api.ScopedPolicyBindingDetails
- func (manager *SScopedPolicyBindingManager) FilterById(q *sqlchemy.SQuery, idStr string) *sqlchemy.SQuery
- func (manager *SScopedPolicyBindingManager) FilterByName(q *sqlchemy.SQuery, name string) *sqlchemy.SQuery
- func (manager *SScopedPolicyBindingManager) FilterByNotId(q *sqlchemy.SQuery, idStr string) *sqlchemy.SQuery
- func (manager *SScopedPolicyBindingManager) GetResourceCount() ([]db.SScopeResourceCount, error)
- func (manager *SScopedPolicyBindingManager) ListItemExportKeys(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SScopedPolicyBindingManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SScopedPolicyBindingManager) OrderByExtraFields(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SScopedPolicyBindingManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)
- func (manager *SScopedPolicyBindingManager) ResourceScope() rbacscope.TRbacScope
- type SScopedPolicyManager
- func (manager *SScopedPolicyManager) FetchCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) []api.ScopedPolicyDetails
- func (manager *SScopedPolicyManager) ListItemExportKeys(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SScopedPolicyManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SScopedPolicyManager) OrderByExtraFields(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (manager *SScopedPolicyManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field string) (*sqlchemy.SQuery, error)
- func (manager *SScopedPolicyManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (api.ScopedPolicyCreateInput, error)
Constants ¶
View Source
const ( NAMESPACE_USER = api.NAMESPACE_USER NAMESPACE_SERVICE = api.NAMESPACE_SERVICE NAMESPACE_BUG_REPORT = api.NAMESPACE_BUG_REPORT )
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) 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) GetId ¶
func (model *SParameter) GetId() string
func (*SParameter) GetName ¶
func (model *SParameter) GetName() string
func (*SParameter) GetOwnerId ¶
func (model *SParameter) GetOwnerId() mcclient.IIdentityProvider
func (*SParameter) GetShortDesc ¶
func (parameter *SParameter) GetShortDesc(ctx context.Context) *jsonutils.JSONDict
func (*SParameter) IsOwner ¶
func (model *SParameter) IsOwner(userCred mcclient.TokenCredential) bool
func (*SParameter) PerformClone ¶
func (parameter *SParameter) PerformClone( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input *api.ParameterCloneInput, ) (jsonutils.JSONObject, error)
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) CreateByInsertOrUpdate ¶
func (manager *SParameterManager) CreateByInsertOrUpdate() bool
func (*SParameterManager) DisableBugReport ¶
func (manager *SParameterManager) DisableBugReport(ctx context.Context) error
func (*SParameterManager) EnableBugReport ¶
func (manager *SParameterManager) EnableBugReport(ctx context.Context) bool
func (*SParameterManager) FetchOwnerId ¶
func (manager *SParameterManager) FetchOwnerId(ctx context.Context, data jsonutils.JSONObject) (mcclient.IIdentityProvider, error)
func (*SParameterManager) FetchParameters ¶
func (manager *SParameterManager) FetchParameters(nsType string, nsId string, name string) ([]SParameter, error)
func (*SParameterManager) FilterById ¶
func (*SParameterManager) FilterByName ¶
func (*SParameterManager) FilterByOwner ¶
func (manager *SParameterManager) FilterByOwner(ctx context.Context, q *sqlchemy.SQuery, man db.FilterByOwnerProvider, userCred mcclient.TokenCredential, owner mcclient.IIdentityProvider, scope rbacscope.TRbacScope) *sqlchemy.SQuery
func (*SParameterManager) GetBugReportEnabled ¶
func (manager *SParameterManager) GetBugReportEnabled() bool
func (*SParameterManager) ListItemFilter ¶
func (manager *SParameterManager) ListItemFilter( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query api.ParameterListInput, ) (*sqlchemy.SQuery, error)
配置参数列表
func (*SParameterManager) NamespaceScope ¶
func (manager *SParameterManager) NamespaceScope() rbacscope.TRbacScope
func (*SParameterManager) OrderByExtraFields ¶
func (manager *SParameterManager) OrderByExtraFields( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query api.ParameterListInput, ) (*sqlchemy.SQuery, error)
func (*SParameterManager) QueryDistinctExtraField ¶
func (*SParameterManager) ResourceScope ¶
func (manager *SParameterManager) ResourceScope() rbacscope.TRbacScope
func (*SParameterManager) ValidateCreateData ¶
func (manager *SParameterManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
type SScopedPolicy ¶
type SScopedPolicy struct { db.SInfrasResourceBase // 策略类别 Category string `width:"64" charset:"utf8" nullable:"false" list:"domain" create:"domain_required" index:"true"` // 策略内容 Policies jsonutils.JSONObject `charset:"utf8" nullable:"true" list:"domain" update:"domain" create:"domain_optional"` }
func (*SScopedPolicy) PerformBind ¶
func (policy *SScopedPolicy) PerformBind( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.ScopedPolicyBindInput, ) (jsonutils.JSONObject, error)
func (*SScopedPolicy) ValidateDeleteCondition ¶
func (policy *SScopedPolicy) ValidateDeleteCondition(ctx context.Context, info jsonutils.JSONObject) error
func (*SScopedPolicy) ValidateUpdateData ¶
func (policy *SScopedPolicy) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.ScopedPolicyUpdateInput) (api.ScopedPolicyUpdateInput, error)
type SScopedPolicyBinding ¶
type SScopedPolicyBinding struct { db.SResourceBase Category string `width:"64" charset:"utf8" nullable:"false" primary:"true" list:"user"` DomainId string `width:"128" charset:"ascii" nullable:"false" primary:"true" list:"user"` ProjectId string `width:"128" charset:"ascii" nullable:"false" primary:"true" list:"user"` PolicyId string `width:"128" charset:"ascii" nullable:"false" list:"user"` Priority int `nullable:"false" list:"user"` }
func (*SScopedPolicyBinding) GetId ¶
func (binding *SScopedPolicyBinding) GetId() string
func (*SScopedPolicyBinding) GetName ¶
func (binding *SScopedPolicyBinding) GetName() string
type SScopedPolicyBindingManager ¶
type SScopedPolicyBindingManager struct {
db.SResourceBaseManager
}
+onecloud:swagger-gen-model-singular=scopedpolicybinding +onecloud:swagger-gen-model-plural=scopedpolicybindings
var ScopedPolicyBindingManager *SScopedPolicyBindingManager
func (*SScopedPolicyBindingManager) FetchCustomizeColumns ¶
func (manager *SScopedPolicyBindingManager) FetchCustomizeColumns( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, objs []interface{}, fields stringutils2.SSortedStrings, isList bool, ) []api.ScopedPolicyBindingDetails
func (*SScopedPolicyBindingManager) FilterById ¶
func (*SScopedPolicyBindingManager) FilterByName ¶
func (*SScopedPolicyBindingManager) FilterByNotId ¶
func (*SScopedPolicyBindingManager) GetResourceCount ¶
func (manager *SScopedPolicyBindingManager) GetResourceCount() ([]db.SScopeResourceCount, error)
func (*SScopedPolicyBindingManager) ListItemExportKeys ¶
func (manager *SScopedPolicyBindingManager) ListItemExportKeys(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, keys stringutils2.SSortedStrings, ) (*sqlchemy.SQuery, error)
func (*SScopedPolicyBindingManager) ListItemFilter ¶
func (manager *SScopedPolicyBindingManager) ListItemFilter( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query api.ScopedPolicyBindingListInput, ) (*sqlchemy.SQuery, error)
范围策略列表
func (*SScopedPolicyBindingManager) OrderByExtraFields ¶
func (manager *SScopedPolicyBindingManager) OrderByExtraFields( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query api.ScopedPolicyBindingListInput, ) (*sqlchemy.SQuery, error)
func (*SScopedPolicyBindingManager) QueryDistinctExtraField ¶
func (*SScopedPolicyBindingManager) ResourceScope ¶
func (manager *SScopedPolicyBindingManager) ResourceScope() rbacscope.TRbacScope
type SScopedPolicyManager ¶
type SScopedPolicyManager struct {
db.SInfrasResourceBaseManager
}
+onecloud:swagger-gen-model-singular=scopedpolicy +onecloud:swagger-gen-model-plural=scopedpolicies
var ScopedPolicyManager *SScopedPolicyManager
func (*SScopedPolicyManager) FetchCustomizeColumns ¶
func (manager *SScopedPolicyManager) FetchCustomizeColumns( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, objs []interface{}, fields stringutils2.SSortedStrings, isList bool, ) []api.ScopedPolicyDetails
func (*SScopedPolicyManager) ListItemExportKeys ¶
func (manager *SScopedPolicyManager) ListItemExportKeys(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, keys stringutils2.SSortedStrings, ) (*sqlchemy.SQuery, error)
func (*SScopedPolicyManager) ListItemFilter ¶
func (manager *SScopedPolicyManager) ListItemFilter( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query api.ScopedPolicyListInput, ) (*sqlchemy.SQuery, error)
范围策略列表
func (*SScopedPolicyManager) OrderByExtraFields ¶
func (manager *SScopedPolicyManager) OrderByExtraFields( ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query api.ScopedPolicyListInput, ) (*sqlchemy.SQuery, error)
func (*SScopedPolicyManager) QueryDistinctExtraField ¶
func (*SScopedPolicyManager) ValidateCreateData ¶
func (manager *SScopedPolicyManager) ValidateCreateData( ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, input api.ScopedPolicyCreateInput, ) (api.ScopedPolicyCreateInput, error)
Click to show internal directories.
Click to hide internal directories.