Documentation
¶
Overview ¶
Copyright 2022 The Casbin Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2022 The Casbin Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Variables
- func Init()
- func ModelMacroSubstitution(originalModelText string) string
- func MountDeploymentObject(admissionReview *admission.AdmissionReview) error
- func MountIngressObject(admissionReview *admission.AdmissionReview) error
- func MountPodObject(admissionReview *admission.AdmissionReview) error
- func MountServiceObject(admissionReview *admission.AdmissionReview) error
- type EnforcerWrapper
- type ModelAdaptorPair
- type ModelLoader
- type SyncEnforcerList
Constants ¶
This section is empty.
Variables ¶
var IsExternalClient bool = true
Functions ¶
func ModelMacroSubstitution ¶
func MountDeploymentObject ¶
func MountDeploymentObject(admissionReview *admission.AdmissionReview) error
func MountIngressObject ¶
func MountIngressObject(admissionReview *admission.AdmissionReview) error
func MountPodObject ¶
func MountPodObject(admissionReview *admission.AdmissionReview) error
func MountServiceObject ¶
func MountServiceObject(admissionReview *admission.AdmissionReview) error
Types ¶
type EnforcerWrapper ¶
type ModelAdaptorPair ¶
type ModelLoader ¶
type ModelLoader struct {
// contains filtered or unexported fields
}
func NewModelLoader ¶
func NewModelLoader(namespace string, isExternalClient bool) (*ModelLoader, error)
func (*ModelLoader) GetModelAndAdaptors ¶
func (m *ModelLoader) GetModelAndAdaptors() ([]ModelAdaptorPair, error)
type SyncEnforcerList ¶
type SyncEnforcerList struct { sync.Mutex Enforcers []*EnforcerWrapper // contains filtered or unexported fields }
var EnforcerList *SyncEnforcerList
func NewSyncEnforcerList ¶
func NewSyncEnforcerList() *SyncEnforcerList
func (*SyncEnforcerList) Enforce ¶
func (s *SyncEnforcerList) Enforce(admission *admission.AdmissionReview) error