Documentation ¶
Index ¶
- func GetHostLayers(ctx context.Context, coreService coreservice.CoreServiceClientInterface, ...) (bkBizID int64, batchLayers [][]meta.Item, err error)
- type AuditCategorySimplify
- type AuthManager
- func (am *AuthManager) AuthorizeAuditRead(ctx context.Context, header http.Header, businessID int64) error
- func (am *AuthManager) AuthorizeByBusiness(ctx context.Context, header http.Header, action meta.Action, ...) error
- func (am *AuthManager) AuthorizeByBusinessID(ctx context.Context, header http.Header, action meta.Action, ...) error
- func (am *AuthManager) AuthorizeByHosts(ctx context.Context, header http.Header, action meta.Action, ...) error
- func (am *AuthManager) AuthorizeByHostsIDs(ctx context.Context, header http.Header, action meta.Action, hostIDs ...int64) error
- func (am *AuthManager) AuthorizeByHostsIDsNoPermissionsResponse(businessID int64) metadata.BaseResp
- func (am *AuthManager) AuthorizeByInstanceID(ctx context.Context, header http.Header, action meta.Action, objID string, ...) error
- func (am *AuthManager) AuthorizeByInstances(ctx context.Context, header http.Header, action meta.Action, ...) error
- func (am *AuthManager) AuthorizeByModule(ctx context.Context, header http.Header, action meta.Action, ...) error
- func (am *AuthManager) AuthorizeByModuleID(ctx context.Context, header http.Header, action meta.Action, ids ...int64) error
- func (am *AuthManager) AuthorizeByPlat(ctx context.Context, header http.Header, action meta.Action, ...) error
- func (am *AuthManager) AuthorizeByPlatIDs(ctx context.Context, header http.Header, action meta.Action, platIDs ...int64) error
- func (am *AuthManager) AuthorizeByProcessID(ctx context.Context, header http.Header, action meta.Action, ids ...int64) error
- func (am *AuthManager) AuthorizeByProcesses(ctx context.Context, header http.Header, action meta.Action, ...) error
- func (am *AuthManager) AuthorizeBySet(ctx context.Context, header http.Header, action meta.Action, ...) error
- func (am *AuthManager) AuthorizeBySetID(ctx context.Context, header http.Header, action meta.Action, ids ...int64) error
- func (am *AuthManager) AuthorizeCreateHost(ctx context.Context, header http.Header, bizID int64) error
- func (am *AuthManager) AuthorizeResourceCreate(ctx context.Context, header http.Header, businessID int64, ...) error
- func (am *AuthManager) CollectAllBusiness(ctx context.Context, header http.Header) ([]BusinessSimplify, error)
- func (am *AuthManager) CollectAuditCategoryByBusinessID(ctx context.Context, header http.Header, businessID int64) ([]AuditCategorySimplify, error)
- func (am *AuthManager) CollectClassificationByBusinessIDs(ctx context.Context, header http.Header, businessID int64) ([]metadata.Classification, error)
- func (am *AuthManager) CollectDynamicGroupByBusinessID(ctx context.Context, header http.Header, businessID int64) ([]DynamicGroupSimplify, error)
- func (am *AuthManager) CollectHostByBusinessID(ctx context.Context, header http.Header, businessID int64) ([]HostSimplify, error)
- func (am *AuthManager) CollectInstancesByModelID(ctx context.Context, header http.Header, objectID string) ([]InstanceSimplify, error)
- func (am *AuthManager) CollectModuleByBusinessIDs(ctx context.Context, header http.Header, businessID int64) ([]ModuleSimplify, error)
- func (am *AuthManager) CollectObjectsByBusinessID(ctx context.Context, header http.Header, businessID int64) ([]metadata.Object, error)
- func (am *AuthManager) CollectProcessesByBusinessID(ctx context.Context, header http.Header, businessID int64) ([]ProcessSimplify, error)
- func (am *AuthManager) CollectSetByBusinessID(ctx context.Context, header http.Header, businessID int64) ([]SetSimplify, error)
- func (am *AuthManager) DeregisterAssociationTypeByIDs(ctx context.Context, header http.Header, ids ...int64) error
- func (am *AuthManager) DeregisterBusinessByRawID(ctx context.Context, header http.Header, ids ...int64) error
- func (am *AuthManager) DeregisterBusinesses(ctx context.Context, header http.Header, businesses ...BusinessSimplify) error
- func (am *AuthManager) DeregisterBusinessesByID(ctx context.Context, header http.Header, businessIDs ...int64) error
- func (am *AuthManager) DeregisterClassification(ctx context.Context, header http.Header, ...) error
- func (am *AuthManager) DeregisterDynamicGroupByID(ctx context.Context, header http.Header, configMeta metadata.UserConfigMeta) error
- func (am *AuthManager) DeregisterHosts(ctx context.Context, header http.Header, hosts ...HostSimplify) error
- func (am *AuthManager) DeregisterHostsByID(ctx context.Context, header http.Header, ids ...int64) error
- func (am *AuthManager) DeregisterInstanceByRawID(ctx context.Context, header http.Header, objectID string, ids ...int64) error
- func (am *AuthManager) DeregisterInstances(ctx context.Context, header http.Header, instances ...InstanceSimplify) error
- func (am *AuthManager) DeregisterMainlineModelByObjectID(ctx context.Context, header http.Header, businessID int64, objectIDs ...string) error
- func (am *AuthManager) DeregisterModelAttribute(ctx context.Context, header http.Header, attributes ...metadata.Attribute) error
- func (am *AuthManager) DeregisterModelAttributeByID(ctx context.Context, header http.Header, attributeIDs ...int64) error
- func (am *AuthManager) DeregisterModelAttributeGroup(ctx context.Context, header http.Header, attributeGroups ...metadata.Group) error
- func (am *AuthManager) DeregisterModelAttributeGroupByID(ctx context.Context, header http.Header, groupIDs ...int64) error
- func (am *AuthManager) DeregisterModelUnique(ctx context.Context, header http.Header, uniques ...ModelUniqueSimplify) error
- func (am *AuthManager) DeregisterModelUniqueByID(ctx context.Context, header http.Header, uniqueIDs ...int64) error
- func (am *AuthManager) DeregisterModule(ctx context.Context, header http.Header, modules ...ModuleSimplify) error
- func (am *AuthManager) DeregisterModuleByID(ctx context.Context, header http.Header, ids ...int64) error
- func (am *AuthManager) DeregisterObject(ctx context.Context, header http.Header, objects ...metadata.Object) error
- func (am *AuthManager) DeregisterPlat(ctx context.Context, header http.Header, plats ...PlatSimplify) error
- func (am *AuthManager) DeregisterPlatByID(ctx context.Context, header http.Header, platIDs ...int64) error
- func (am *AuthManager) DeregisterPlatByRawID(ctx context.Context, header http.Header, ids ...int64) error
- func (am *AuthManager) DeregisterProcesses(ctx context.Context, header http.Header, processes ...ProcessSimplify) error
- func (am *AuthManager) DeregisterSet(ctx context.Context, header http.Header, sets ...SetSimplify) error
- func (am *AuthManager) DeregisterSetByID(ctx context.Context, header http.Header, ids ...int64) error
- func (am *AuthManager) DryRunAuthorizeByHostsIDs(ctx context.Context, header http.Header, action meta.Action, hostIDs ...int64) ([]meta.ResourceAttribute, error)
- func (am *AuthManager) Enabled() bool
- func (am *AuthManager) ExtractBusinessIDFromAttributeGroup(attributeGroups ...metadata.Group) (int64, error)
- func (am *AuthManager) ExtractBusinessIDFromAuditCategories(categories ...AuditCategorySimplify) (int64, error)
- func (am *AuthManager) ExtractBusinessIDFromModelAttributes(attributes ...metadata.Attribute) (int64, error)
- func (am *AuthManager) ExtractBusinessIDFromObject(object metadata.Object) (int64, error)
- func (am *AuthManager) ExtractBusinessIDFromObjects(objects ...metadata.Object) (map[int64]int64, error)
- func (am *AuthManager) ExtractBusinessIDFromUniques(uniques ...ModelUniqueSimplify) (int64, error)
- func (am *AuthManager) GenAuthorizeAuditReadNoPermissionsResponse(ctx context.Context, header http.Header, businessID int64) (*metadata.BaseResp, error)
- func (am *AuthManager) GenBusinessAuditNoPermissionResp(ctx context.Context, header http.Header, businessID int64) (*metadata.BaseResp, error)
- func (am *AuthManager) GenBusinessNoPermissionResp(ctx context.Context, header http.Header, businessID int64) (*metadata.BaseResp, error)
- func (am *AuthManager) GenDeleteHostBatchNoPermissionResp(hostIDs []int64) *metadata.BaseResp
- func (am *AuthManager) GenModuleSetNoPermissionResp() *metadata.BaseResp
- func (am *AuthManager) GenMoveHostFromModuleToIdleFaultModuleResp(hostIDs []int64) *metadata.BaseResp
- func (am *AuthManager) GenProcessNoPermissionResp(ctx context.Context, header http.Header, businessID int64) (*metadata.BaseResp, error)
- func (am *AuthManager) MakeAuthorizedAuditListCondition(ctx context.Context, header http.Header, businessID int64) (cond []mapstr.MapStr, hasAuthorization bool, err error)
- func (am *AuthManager) MakeResourcesByAuditCategories(ctx context.Context, header http.Header, action meta.Action, businessID int64, ...) ([]meta.ResourceAttribute, error)
- func (am *AuthManager) MakeResourcesByBusiness(header http.Header, action meta.Action, businesses ...BusinessSimplify) []meta.ResourceAttribute
- func (am *AuthManager) MakeResourcesByClassifications(header http.Header, action meta.Action, businessID int64, ...) []meta.ResourceAttribute
- func (am *AuthManager) MakeResourcesByDynamicGroups(header http.Header, action meta.Action, businessID int64, ...) []meta.ResourceAttribute
- func (am *AuthManager) MakeResourcesByHosts(ctx context.Context, header http.Header, action meta.Action, ...) ([]meta.ResourceAttribute, error)
- func (am *AuthManager) MakeResourcesByInstances(ctx context.Context, header http.Header, action meta.Action, ...) ([]meta.ResourceAttribute, error)
- func (am *AuthManager) MakeResourcesByModule(header http.Header, action meta.Action, businessID int64, ...) []meta.ResourceAttribute
- func (am *AuthManager) MakeResourcesByObjects(ctx context.Context, header http.Header, action meta.Action, ...) ([]meta.ResourceAttribute, error)
- func (am *AuthManager) MakeResourcesByProcesses(header http.Header, action meta.Action, businessID int64, ...) []meta.ResourceAttribute
- func (am *AuthManager) MakeResourcesBySet(header http.Header, action meta.Action, businessID int64, sets ...SetSimplify) []meta.ResourceAttribute
- func (am *AuthManager) RegisterAssociationType(ctx context.Context, header http.Header, aks ...*metadata.AssociationKind) error
- func (am *AuthManager) RegisterAssociationTypeByID(ctx context.Context, header http.Header, ids ...int64) error
- func (am *AuthManager) RegisterAuditCategories(ctx context.Context, header http.Header, categories ...AuditCategorySimplify) error
- func (am *AuthManager) RegisterBusinesses(ctx context.Context, header http.Header, businesses ...BusinessSimplify) error
- func (am *AuthManager) RegisterBusinessesByID(ctx context.Context, header http.Header, businessIDs ...int64) error
- func (am *AuthManager) RegisterClassification(ctx context.Context, header http.Header, ...) error
- func (am *AuthManager) RegisterDynamicGroupByID(ctx context.Context, header http.Header, ids ...string) error
- func (am *AuthManager) RegisterDynamicGroups(ctx context.Context, header http.Header, dynamicGroups ...DynamicGroupSimplify) error
- func (am *AuthManager) RegisterHosts(ctx context.Context, header http.Header, hosts ...HostSimplify) error
- func (am *AuthManager) RegisterHostsByID(ctx context.Context, header http.Header, hostIDs ...int64) error
- func (am *AuthManager) RegisterInstancesByID(ctx context.Context, header http.Header, objectID string, ids ...int64) error
- func (am *AuthManager) RegisterMainlineObject(ctx context.Context, header http.Header, objects ...metadata.Object) error
- func (am *AuthManager) RegisterModelAttribute(ctx context.Context, header http.Header, attributes ...metadata.Attribute) error
- func (am *AuthManager) RegisterModelAttributeGroup(ctx context.Context, header http.Header, attributeGroups ...metadata.Group) error
- func (am *AuthManager) RegisterModelUnique(ctx context.Context, header http.Header, uniques ...ModelUniqueSimplify) error
- func (am *AuthManager) RegisterModule(ctx context.Context, header http.Header, modules ...ModuleSimplify) error
- func (am *AuthManager) RegisterModuleByID(ctx context.Context, header http.Header, moduleIDs ...int64) error
- func (am *AuthManager) RegisterModuleUniqueByID(ctx context.Context, header http.Header, uniqueIDs ...int64) error
- func (am *AuthManager) RegisterObject(ctx context.Context, header http.Header, objects ...metadata.Object) error
- func (am *AuthManager) RegisterPlat(ctx context.Context, header http.Header, plats ...PlatSimplify) error
- func (am *AuthManager) RegisterPlatByID(ctx context.Context, header http.Header, platIDs ...int64) error
- func (am *AuthManager) RegisterProcesses(ctx context.Context, header http.Header, processes ...ProcessSimplify) error
- func (am *AuthManager) RegisterSet(ctx context.Context, header http.Header, sets ...SetSimplify) error
- func (am *AuthManager) RegisterSetByID(ctx context.Context, header http.Header, setIDs ...int64) error
- func (am *AuthManager) UpdateAssociationTypeByID(ctx context.Context, header http.Header, ids ...int64) error
- func (am *AuthManager) UpdateRegisteredBusiness(ctx context.Context, header http.Header, businesses ...BusinessSimplify) error
- func (am *AuthManager) UpdateRegisteredBusinessByID(ctx context.Context, header http.Header, ids ...int64) error
- func (am *AuthManager) UpdateRegisteredBusinessByRawID(ctx context.Context, header http.Header, ids ...int64) error
- func (am *AuthManager) UpdateRegisteredClassification(ctx context.Context, header http.Header, ...) error
- func (am *AuthManager) UpdateRegisteredClassificationByID(ctx context.Context, header http.Header, classificationIDs ...string) error
- func (am *AuthManager) UpdateRegisteredClassificationByRawID(ctx context.Context, header http.Header, ids ...int64) error
- func (am *AuthManager) UpdateRegisteredDynamicGroupByID(ctx context.Context, header http.Header, ids ...string) error
- func (am *AuthManager) UpdateRegisteredDynamicGroups(ctx context.Context, header http.Header, dynamicGroups ...DynamicGroupSimplify) error
- func (am *AuthManager) UpdateRegisteredHosts(ctx context.Context, header http.Header, hosts ...HostSimplify) error
- func (am *AuthManager) UpdateRegisteredHostsByID(ctx context.Context, header http.Header, hostIDs ...int64) error
- func (am *AuthManager) UpdateRegisteredInstanceByID(ctx context.Context, header http.Header, objectID string, ids ...int64) error
- func (am *AuthManager) UpdateRegisteredInstanceByRawID(ctx context.Context, header http.Header, objectID string, ids ...int64) error
- func (am *AuthManager) UpdateRegisteredInstances(ctx context.Context, header http.Header, instances ...InstanceSimplify) error
- func (am *AuthManager) UpdateRegisteredModelAttribute(ctx context.Context, header http.Header, attributes ...metadata.Attribute) error
- func (am *AuthManager) UpdateRegisteredModelAttributeByID(ctx context.Context, header http.Header, attributeIDs ...int64) error
- func (am *AuthManager) UpdateRegisteredModelAttributeGroup(ctx context.Context, header http.Header, attributeGroups ...metadata.Group) error
- func (am *AuthManager) UpdateRegisteredModelAttributeGroupByID(ctx context.Context, header http.Header, attributeIDs ...int64) error
- func (am *AuthManager) UpdateRegisteredModelUnique(ctx context.Context, header http.Header, uniques ...ModelUniqueSimplify) error
- func (am *AuthManager) UpdateRegisteredModelUniqueByID(ctx context.Context, header http.Header, uniqueIDs ...int64) error
- func (am *AuthManager) UpdateRegisteredModule(ctx context.Context, header http.Header, modules ...ModuleSimplify) error
- func (am *AuthManager) UpdateRegisteredModuleByID(ctx context.Context, header http.Header, moduleIDs ...int64) error
- func (am *AuthManager) UpdateRegisteredObjects(ctx context.Context, header http.Header, businessID int64, ...) error
- func (am *AuthManager) UpdateRegisteredObjectsByRawIDs(ctx context.Context, header http.Header, businessID int64, ids ...int64) error
- func (am *AuthManager) UpdateRegisteredPlat(ctx context.Context, header http.Header, plats ...PlatSimplify) error
- func (am *AuthManager) UpdateRegisteredPlatByID(ctx context.Context, header http.Header, ids ...int64) error
- func (am *AuthManager) UpdateRegisteredPlatByRawID(ctx context.Context, header http.Header, ids ...int64) error
- func (am *AuthManager) UpdateRegisteredProcesses(ctx context.Context, header http.Header, processes ...ProcessSimplify) error
- func (am *AuthManager) UpdateRegisteredProcessesByID(ctx context.Context, header http.Header, ids ...int64) error
- func (am *AuthManager) UpdateRegisteredSet(ctx context.Context, header http.Header, sets ...SetSimplify) error
- func (am *AuthManager) UpdateRegisteredSetByID(ctx context.Context, header http.Header, setIDs ...int64) error
- type BusinessSimplify
- type DynamicGroupSimplify
- type HostSimplify
- type InstanceSimplify
- type ModelUniqueSimplify
- type ModuleSimplify
- type PlatSimplify
- type ProcessSimplify
- type SetSimplify
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetHostLayers ¶
func GetHostLayers(ctx context.Context, coreService coreservice.CoreServiceClientInterface, requestHeader *http.Header, hostIDArr *[]int64) ( bkBizID int64, batchLayers [][]meta.Item, err error)
GetHostLayers get resource layers id by hostID(layers is a data structure for call iam)
Types ¶
type AuditCategorySimplify ¶
type AuditCategorySimplify struct { BKAppIDField int64 `field:"bk_biz_id"` BKOpTargetField string `field:"op_target"` }
func (*AuditCategorySimplify) Parse ¶
func (is *AuditCategorySimplify) Parse(data mapstr.MapStr) (*AuditCategorySimplify, error)
type AuthManager ¶
type AuthManager struct { Authorize auth.Authorize RegisterModelAttributeEnabled bool RegisterModelUniqueEnabled bool RegisterModuleEnabled bool RegisterSetEnabled bool RegisterAuditCategoryEnabled bool SkipReadAuthorization bool // contains filtered or unexported fields }
func NewAuthManager ¶
func NewAuthManager(clientSet apimachinery.ClientSetInterface, Authorize auth.Authorize) *AuthManager
func (*AuthManager) AuthorizeAuditRead ¶
func (*AuthManager) AuthorizeByBusiness ¶
func (am *AuthManager) AuthorizeByBusiness(ctx context.Context, header http.Header, action meta.Action, businesses ...BusinessSimplify) error
func (*AuthManager) AuthorizeByBusinessID ¶
func (*AuthManager) AuthorizeByHosts ¶
func (am *AuthManager) AuthorizeByHosts(ctx context.Context, header http.Header, action meta.Action, hosts ...HostSimplify) error
func (*AuthManager) AuthorizeByHostsIDs ¶
func (*AuthManager) AuthorizeByHostsIDsNoPermissionsResponse ¶
func (am *AuthManager) AuthorizeByHostsIDsNoPermissionsResponse(businessID int64) metadata.BaseResp
func (*AuthManager) AuthorizeByInstanceID ¶
func (*AuthManager) AuthorizeByInstances ¶
func (am *AuthManager) AuthorizeByInstances(ctx context.Context, header http.Header, action meta.Action, instances ...InstanceSimplify) error
func (*AuthManager) AuthorizeByModule ¶
func (am *AuthManager) AuthorizeByModule(ctx context.Context, header http.Header, action meta.Action, modules ...ModuleSimplify) error
func (*AuthManager) AuthorizeByModuleID ¶
func (*AuthManager) AuthorizeByPlat ¶
func (am *AuthManager) AuthorizeByPlat(ctx context.Context, header http.Header, action meta.Action, plats ...PlatSimplify) error
func (*AuthManager) AuthorizeByPlatIDs ¶
func (*AuthManager) AuthorizeByProcessID ¶
func (*AuthManager) AuthorizeByProcesses ¶
func (am *AuthManager) AuthorizeByProcesses(ctx context.Context, header http.Header, action meta.Action, processes ...ProcessSimplify) error
func (*AuthManager) AuthorizeBySet ¶
func (am *AuthManager) AuthorizeBySet(ctx context.Context, header http.Header, action meta.Action, sets ...SetSimplify) error
func (*AuthManager) AuthorizeBySetID ¶
func (*AuthManager) AuthorizeCreateHost ¶
func (*AuthManager) AuthorizeResourceCreate ¶
func (am *AuthManager) AuthorizeResourceCreate(ctx context.Context, header http.Header, businessID int64, resourceType meta.ResourceType) error
func (*AuthManager) CollectAllBusiness ¶
func (am *AuthManager) CollectAllBusiness(ctx context.Context, header http.Header) ([]BusinessSimplify, error)
CollectAllBusiness get all business
func (*AuthManager) CollectAuditCategoryByBusinessID ¶
func (am *AuthManager) CollectAuditCategoryByBusinessID(ctx context.Context, header http.Header, businessID int64) ([]AuditCategorySimplify, error)
func (*AuthManager) CollectClassificationByBusinessIDs ¶
func (am *AuthManager) CollectClassificationByBusinessIDs(ctx context.Context, header http.Header, businessID int64) ([]metadata.Classification, error)
func (*AuthManager) CollectDynamicGroupByBusinessID ¶
func (am *AuthManager) CollectDynamicGroupByBusinessID(ctx context.Context, header http.Header, businessID int64) ([]DynamicGroupSimplify, error)
func (*AuthManager) CollectHostByBusinessID ¶
func (am *AuthManager) CollectHostByBusinessID(ctx context.Context, header http.Header, businessID int64) ([]HostSimplify, error)
func (*AuthManager) CollectInstancesByModelID ¶
func (am *AuthManager) CollectInstancesByModelID(ctx context.Context, header http.Header, objectID string) ([]InstanceSimplify, error)
func (*AuthManager) CollectModuleByBusinessIDs ¶
func (am *AuthManager) CollectModuleByBusinessIDs(ctx context.Context, header http.Header, businessID int64) ([]ModuleSimplify, error)
func (*AuthManager) CollectObjectsByBusinessID ¶
func (am *AuthManager) CollectObjectsByBusinessID(ctx context.Context, header http.Header, businessID int64) ([]metadata.Object, error)
CollectObjectsByBusinessID get models by business businessID=0 ==> get all global models
func (*AuthManager) CollectProcessesByBusinessID ¶
func (am *AuthManager) CollectProcessesByBusinessID(ctx context.Context, header http.Header, businessID int64) ([]ProcessSimplify, error)
func (*AuthManager) CollectSetByBusinessID ¶
func (am *AuthManager) CollectSetByBusinessID(ctx context.Context, header http.Header, businessID int64) ([]SetSimplify, error)
func (*AuthManager) DeregisterAssociationTypeByIDs ¶
func (*AuthManager) DeregisterBusinessByRawID ¶
func (*AuthManager) DeregisterBusinesses ¶
func (am *AuthManager) DeregisterBusinesses(ctx context.Context, header http.Header, businesses ...BusinessSimplify) error
func (*AuthManager) DeregisterBusinessesByID ¶
func (*AuthManager) DeregisterClassification ¶
func (am *AuthManager) DeregisterClassification(ctx context.Context, header http.Header, classifications ...metadata.Classification) error
func (*AuthManager) DeregisterDynamicGroupByID ¶
func (am *AuthManager) DeregisterDynamicGroupByID(ctx context.Context, header http.Header, configMeta metadata.UserConfigMeta) error
func (*AuthManager) DeregisterHosts ¶
func (am *AuthManager) DeregisterHosts(ctx context.Context, header http.Header, hosts ...HostSimplify) error
func (*AuthManager) DeregisterHostsByID ¶
func (*AuthManager) DeregisterInstanceByRawID ¶
func (*AuthManager) DeregisterInstances ¶
func (am *AuthManager) DeregisterInstances(ctx context.Context, header http.Header, instances ...InstanceSimplify) error
func (*AuthManager) DeregisterMainlineModelByObjectID ¶
func (*AuthManager) DeregisterModelAttribute ¶
func (*AuthManager) DeregisterModelAttributeByID ¶
func (*AuthManager) DeregisterModelAttributeGroup ¶
func (*AuthManager) DeregisterModelAttributeGroupByID ¶
func (*AuthManager) DeregisterModelUnique ¶
func (am *AuthManager) DeregisterModelUnique(ctx context.Context, header http.Header, uniques ...ModelUniqueSimplify) error
func (*AuthManager) DeregisterModelUniqueByID ¶
func (*AuthManager) DeregisterModule ¶
func (am *AuthManager) DeregisterModule(ctx context.Context, header http.Header, modules ...ModuleSimplify) error
func (*AuthManager) DeregisterModuleByID ¶
func (*AuthManager) DeregisterObject ¶
func (*AuthManager) DeregisterPlat ¶
func (am *AuthManager) DeregisterPlat(ctx context.Context, header http.Header, plats ...PlatSimplify) error
func (*AuthManager) DeregisterPlatByID ¶
func (*AuthManager) DeregisterPlatByRawID ¶
func (*AuthManager) DeregisterProcesses ¶
func (am *AuthManager) DeregisterProcesses(ctx context.Context, header http.Header, processes ...ProcessSimplify) error
func (*AuthManager) DeregisterSet ¶
func (am *AuthManager) DeregisterSet(ctx context.Context, header http.Header, sets ...SetSimplify) error
func (*AuthManager) DeregisterSetByID ¶
func (*AuthManager) DryRunAuthorizeByHostsIDs ¶
func (*AuthManager) Enabled ¶
func (am *AuthManager) Enabled() bool
func (*AuthManager) ExtractBusinessIDFromAttributeGroup ¶
func (am *AuthManager) ExtractBusinessIDFromAttributeGroup(attributeGroups ...metadata.Group) (int64, error)
func (*AuthManager) ExtractBusinessIDFromAuditCategories ¶
func (am *AuthManager) ExtractBusinessIDFromAuditCategories(categories ...AuditCategorySimplify) (int64, error)
func (*AuthManager) ExtractBusinessIDFromModelAttributes ¶
func (am *AuthManager) ExtractBusinessIDFromModelAttributes(attributes ...metadata.Attribute) (int64, error)
func (*AuthManager) ExtractBusinessIDFromObject ¶
func (am *AuthManager) ExtractBusinessIDFromObject(object metadata.Object) (int64, error)
func (*AuthManager) ExtractBusinessIDFromObjects ¶
func (*AuthManager) ExtractBusinessIDFromUniques ¶
func (am *AuthManager) ExtractBusinessIDFromUniques(uniques ...ModelUniqueSimplify) (int64, error)
func (*AuthManager) GenAuthorizeAuditReadNoPermissionsResponse ¶
func (*AuthManager) GenBusinessAuditNoPermissionResp ¶
func (*AuthManager) GenBusinessNoPermissionResp ¶
func (*AuthManager) GenDeleteHostBatchNoPermissionResp ¶
func (am *AuthManager) GenDeleteHostBatchNoPermissionResp(hostIDs []int64) *metadata.BaseResp
func (*AuthManager) GenModuleSetNoPermissionResp ¶
func (am *AuthManager) GenModuleSetNoPermissionResp() *metadata.BaseResp
func (*AuthManager) GenMoveHostFromModuleToIdleFaultModuleResp ¶
func (am *AuthManager) GenMoveHostFromModuleToIdleFaultModuleResp(hostIDs []int64) *metadata.BaseResp
func (*AuthManager) GenProcessNoPermissionResp ¶
func (*AuthManager) MakeAuthorizedAuditListCondition ¶
func (am *AuthManager) MakeAuthorizedAuditListCondition(ctx context.Context, header http.Header, businessID int64) (cond []mapstr.MapStr, hasAuthorization bool, err error)
MakeAuthorizedAuditListCondition make a query condition, with which user can only search audit log under it. ==> [{"bk_biz_id":2,"op_target":{"$in":["module"]}}]
func (*AuthManager) MakeResourcesByAuditCategories ¶
func (am *AuthManager) MakeResourcesByAuditCategories(ctx context.Context, header http.Header, action meta.Action, businessID int64, categories ...AuditCategorySimplify) ([]meta.ResourceAttribute, error)
func (*AuthManager) MakeResourcesByBusiness ¶
func (am *AuthManager) MakeResourcesByBusiness(header http.Header, action meta.Action, businesses ...BusinessSimplify) []meta.ResourceAttribute
func (*AuthManager) MakeResourcesByClassifications ¶
func (am *AuthManager) MakeResourcesByClassifications(header http.Header, action meta.Action, businessID int64, classifications ...metadata.Classification) []meta.ResourceAttribute
func (*AuthManager) MakeResourcesByDynamicGroups ¶
func (am *AuthManager) MakeResourcesByDynamicGroups(header http.Header, action meta.Action, businessID int64, dynamicGroups ...DynamicGroupSimplify) []meta.ResourceAttribute
func (*AuthManager) MakeResourcesByHosts ¶
func (am *AuthManager) MakeResourcesByHosts(ctx context.Context, header http.Header, action meta.Action, hosts ...HostSimplify) ([]meta.ResourceAttribute, error)
func (*AuthManager) MakeResourcesByInstances ¶
func (am *AuthManager) MakeResourcesByInstances(ctx context.Context, header http.Header, action meta.Action, instances ...InstanceSimplify) ([]meta.ResourceAttribute, error)
func (*AuthManager) MakeResourcesByModule ¶
func (am *AuthManager) MakeResourcesByModule(header http.Header, action meta.Action, businessID int64, modules ...ModuleSimplify) []meta.ResourceAttribute
func (*AuthManager) MakeResourcesByObjects ¶
func (am *AuthManager) MakeResourcesByObjects(ctx context.Context, header http.Header, action meta.Action, objects ...metadata.Object) ([]meta.ResourceAttribute, error)
MakeResourcesByObjects make object resource with businessID and objects
func (*AuthManager) MakeResourcesByProcesses ¶
func (am *AuthManager) MakeResourcesByProcesses(header http.Header, action meta.Action, businessID int64, processes ...ProcessSimplify) []meta.ResourceAttribute
func (*AuthManager) MakeResourcesBySet ¶
func (am *AuthManager) MakeResourcesBySet(header http.Header, action meta.Action, businessID int64, sets ...SetSimplify) []meta.ResourceAttribute
func (*AuthManager) RegisterAssociationType ¶
func (am *AuthManager) RegisterAssociationType(ctx context.Context, header http.Header, aks ...*metadata.AssociationKind) error
func (*AuthManager) RegisterAssociationTypeByID ¶
func (*AuthManager) RegisterAuditCategories ¶
func (am *AuthManager) RegisterAuditCategories(ctx context.Context, header http.Header, categories ...AuditCategorySimplify) error
func (*AuthManager) RegisterBusinesses ¶
func (am *AuthManager) RegisterBusinesses(ctx context.Context, header http.Header, businesses ...BusinessSimplify) error
func (*AuthManager) RegisterBusinessesByID ¶
func (*AuthManager) RegisterClassification ¶
func (am *AuthManager) RegisterClassification(ctx context.Context, header http.Header, classifications ...metadata.Classification) error
func (*AuthManager) RegisterDynamicGroupByID ¶
func (*AuthManager) RegisterDynamicGroups ¶
func (am *AuthManager) RegisterDynamicGroups(ctx context.Context, header http.Header, dynamicGroups ...DynamicGroupSimplify) error
func (*AuthManager) RegisterHosts ¶
func (am *AuthManager) RegisterHosts(ctx context.Context, header http.Header, hosts ...HostSimplify) error
func (*AuthManager) RegisterHostsByID ¶
func (*AuthManager) RegisterInstancesByID ¶
func (*AuthManager) RegisterMainlineObject ¶
func (*AuthManager) RegisterModelAttribute ¶
func (*AuthManager) RegisterModelAttributeGroup ¶
func (*AuthManager) RegisterModelUnique ¶
func (am *AuthManager) RegisterModelUnique(ctx context.Context, header http.Header, uniques ...ModelUniqueSimplify) error
func (*AuthManager) RegisterModule ¶
func (am *AuthManager) RegisterModule(ctx context.Context, header http.Header, modules ...ModuleSimplify) error
func (*AuthManager) RegisterModuleByID ¶
func (*AuthManager) RegisterModuleUniqueByID ¶
func (*AuthManager) RegisterObject ¶
func (*AuthManager) RegisterPlat ¶
func (am *AuthManager) RegisterPlat(ctx context.Context, header http.Header, plats ...PlatSimplify) error
func (*AuthManager) RegisterPlatByID ¶
func (*AuthManager) RegisterProcesses ¶
func (am *AuthManager) RegisterProcesses(ctx context.Context, header http.Header, processes ...ProcessSimplify) error
func (*AuthManager) RegisterSet ¶
func (am *AuthManager) RegisterSet(ctx context.Context, header http.Header, sets ...SetSimplify) error
func (*AuthManager) RegisterSetByID ¶
func (*AuthManager) UpdateAssociationTypeByID ¶
func (*AuthManager) UpdateRegisteredBusiness ¶
func (am *AuthManager) UpdateRegisteredBusiness(ctx context.Context, header http.Header, businesses ...BusinessSimplify) error
func (*AuthManager) UpdateRegisteredBusinessByID ¶
func (*AuthManager) UpdateRegisteredBusinessByRawID ¶
func (*AuthManager) UpdateRegisteredClassification ¶
func (am *AuthManager) UpdateRegisteredClassification(ctx context.Context, header http.Header, classifications ...metadata.Classification) error
func (*AuthManager) UpdateRegisteredClassificationByID ¶
func (*AuthManager) UpdateRegisteredClassificationByRawID ¶
func (*AuthManager) UpdateRegisteredDynamicGroupByID ¶
func (*AuthManager) UpdateRegisteredDynamicGroups ¶
func (am *AuthManager) UpdateRegisteredDynamicGroups(ctx context.Context, header http.Header, dynamicGroups ...DynamicGroupSimplify) error
func (*AuthManager) UpdateRegisteredHosts ¶
func (am *AuthManager) UpdateRegisteredHosts(ctx context.Context, header http.Header, hosts ...HostSimplify) error
func (*AuthManager) UpdateRegisteredHostsByID ¶
func (*AuthManager) UpdateRegisteredInstanceByID ¶
func (*AuthManager) UpdateRegisteredInstanceByRawID ¶
func (*AuthManager) UpdateRegisteredInstances ¶
func (am *AuthManager) UpdateRegisteredInstances(ctx context.Context, header http.Header, instances ...InstanceSimplify) error
func (*AuthManager) UpdateRegisteredModelAttribute ¶
func (*AuthManager) UpdateRegisteredModelAttributeByID ¶
func (*AuthManager) UpdateRegisteredModelAttributeGroup ¶
func (*AuthManager) UpdateRegisteredModelAttributeGroupByID ¶
func (*AuthManager) UpdateRegisteredModelUnique ¶
func (am *AuthManager) UpdateRegisteredModelUnique(ctx context.Context, header http.Header, uniques ...ModelUniqueSimplify) error
func (*AuthManager) UpdateRegisteredModelUniqueByID ¶
func (*AuthManager) UpdateRegisteredModule ¶
func (am *AuthManager) UpdateRegisteredModule(ctx context.Context, header http.Header, modules ...ModuleSimplify) error
func (*AuthManager) UpdateRegisteredModuleByID ¶
func (*AuthManager) UpdateRegisteredObjects ¶
func (*AuthManager) UpdateRegisteredObjectsByRawIDs ¶
func (*AuthManager) UpdateRegisteredPlat ¶
func (am *AuthManager) UpdateRegisteredPlat(ctx context.Context, header http.Header, plats ...PlatSimplify) error
func (*AuthManager) UpdateRegisteredPlatByID ¶
func (*AuthManager) UpdateRegisteredPlatByRawID ¶
func (*AuthManager) UpdateRegisteredProcesses ¶
func (am *AuthManager) UpdateRegisteredProcesses(ctx context.Context, header http.Header, processes ...ProcessSimplify) error
func (*AuthManager) UpdateRegisteredProcessesByID ¶
func (*AuthManager) UpdateRegisteredSet ¶
func (am *AuthManager) UpdateRegisteredSet(ctx context.Context, header http.Header, sets ...SetSimplify) error
func (*AuthManager) UpdateRegisteredSetByID ¶
type BusinessSimplify ¶
type BusinessSimplify struct { BKAppIDField int64 `field:"bk_biz_id"` BKAppNameField string `field:"bk_biz_name"` BKSupplierIDField int64 `field:"bk_supplier_id"` BKOwnerIDField string `field:"bk_supplier_account"` IsDefault int64 `field:"default"` }
func (*BusinessSimplify) Parse ¶
func (business *BusinessSimplify) Parse(data mapstr.MapStr) (*BusinessSimplify, error)
Parse load the data from mapstr attribute into ObjectUnique instance
type DynamicGroupSimplify ¶
type DynamicGroupSimplify struct { BKAppIDField int64 `field:"bk_biz_id"` ID string `field:"id"` Name string `field:"name"` }
func (*DynamicGroupSimplify) Parse ¶
func (is *DynamicGroupSimplify) Parse(data mapstr.MapStr) (*DynamicGroupSimplify, error)
type HostSimplify ¶
type HostSimplify struct { BKAppIDField int64 `field:"bk_biz_id"` BKModuleIDField int64 `field:"bk_module_id"` BKSetIDField int64 `field:"bk_set_id"` BKHostIDField int64 `field:"bk_host_id"` BKHostNameField string `field:"bk_host_name"` BKHostInnerIPField string `field:"bk_host_innerip"` }
func (*HostSimplify) Parse ¶
func (is *HostSimplify) Parse(data mapstr.MapStr) (*HostSimplify, error)
type InstanceSimplify ¶
type InstanceSimplify struct { InstanceID int64 `field:"bk_inst_id"` Name string `field:"bk_inst_name"` BizID int64 `field:"bk_biz_id"` ObjectID string `field:"bk_obj_id"` }
func (*InstanceSimplify) Parse ¶
func (is *InstanceSimplify) Parse(data mapstr.MapStr) (*InstanceSimplify, error)
Parse load the data from mapstr attribute into ObjectUnique instance
func (*InstanceSimplify) ParseBizID ¶
func (is *InstanceSimplify) ParseBizID(data mapstr.MapStr) (int64, error)
type ModelUniqueSimplify ¶
type ModelUniqueSimplify struct { ID uint64 `field:"id" json:"id" bson:"id"` ObjID string `field:"bk_obj_id" json:"bk_obj_id" bson:"bk_obj_id"` Ispre bool `field:"ispre" json:"ispre" bson:"ispre"` BusinessID int64 }
func (*ModelUniqueSimplify) Parse ¶
func (cls *ModelUniqueSimplify) Parse(data mapstr.MapStr) (*ModelUniqueSimplify, error)
type ModuleSimplify ¶
type ModuleSimplify struct { BKAppIDField int64 `field:"bk_biz_id"` BKModuleIDField int64 `field:"bk_module_id"` BKModuleNameField string `field:"bk_module_name"` }
func (*ModuleSimplify) Parse ¶
func (is *ModuleSimplify) Parse(data mapstr.MapStr) (*ModuleSimplify, error)
Parse load the data from mapstr attribute into ObjectUnique instance
type PlatSimplify ¶
type PlatSimplify struct { BKCloudIDField int64 `field:"bk_cloud_id"` BKCloudNameField string `field:"bk_cloud_name"` }
func (*PlatSimplify) Parse ¶
func (is *PlatSimplify) Parse(data mapstr.MapStr) (*PlatSimplify, error)
type ProcessSimplify ¶
type ProcessSimplify struct { ProcessID int64 `field:"bk_process_id"` ProcessName string `field:"bk_process_name"` BKAppIDField int64 `field:"bk_biz_id"` }
func (*ProcessSimplify) Parse ¶
func (is *ProcessSimplify) Parse(data mapstr.MapStr) (*ProcessSimplify, error)
type SetSimplify ¶
type SetSimplify struct { BKAppIDField int64 `field:"bk_biz_id"` BKSetIDField int64 `field:"bk_set_id"` BKSetNameField string `field:"bk_set_name"` }
func (*SetSimplify) Parse ¶
func (is *SetSimplify) Parse(data mapstr.MapStr) (*SetSimplify, error)
Parse load the data from mapstr attribute into ObjectUnique instance