github.com/greenpau/go-authcrunch@v1.1.4/pkg/errors/acl.go (about) 1 // Copyright 2022 Paul Greenberg greenpau@outlook.com 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 package errors 16 17 // ACL Errors 18 const ( 19 ErrAccessListRuleConfig StandardError = "acl rule configuration error: %v: %v" 20 ErrAccessListRuleConditionConfig StandardError = "acl rule condition configuration error: %v: %v" 21 ErrAccessListNoRules StandardError = "acl has no rules" 22 ErrACLRuleConditionSyntaxMatchNotFound StandardError = "invalid condition syntax, matcher not found: %v" 23 ErrACLRuleConditionSyntaxMatchFieldNotFound StandardError = "invalid condition syntax, matcher field not found: %v" 24 ErrACLRuleConditionSyntaxMatchValueNotFound StandardError = "invalid condition syntax, matcher values not found: %v" 25 ErrACLRuleConditionSyntaxCondDataType StandardError = "invalid condition syntax, matcher condition data type unsupported: %v" 26 ErrACLRuleConditionSyntaxUnsupported StandardError = "invalid condition syntax, failed creating rule condition: %v" 27 ErrACLRuleConditionSyntaxStrategyNotFound StandardError = "invalid condition syntax, matcher strategy not found: %v" 28 ErrACLRuleConditionSyntaxReservedWordUsage StandardError = "invalid condition syntax, found reserved keyword %q: %v" 29 30 ErrACLRuleSyntaxExtractCondToken StandardError = "invalid rule syntax, failed to extract condition tokens: %v" 31 ErrACLRuleSyntaxDuplicateField StandardError = "invalid rule syntax, duplicate field: %s" 32 ErrACLRuleSyntaxExtractActionToken StandardError = "invalid rule syntax, failed to extract action tokens: %v" 33 34 ErrACLRuleSyntaxAllowPreceed StandardError = "invalid rule syntax, %q must preceed stop/counter/log directives" 35 ErrACLRuleSyntaxTagFollowedByValue StandardError = "invalid rule syntax, %q tag must be followed by value" 36 ErrACLRuleSyntaxInvalidToken StandardError = "invalid rule syntax, invalid %q token" 37 ErrACLRuleSyntaxCondNotFound StandardError = "invalid rule syntax, no match conditions found" 38 ErrACLRuleSyntaxTypeUnsupported StandardError = "invalid rule syntax, type %q is unsupported" 39 ErrACLRuleSyntaxLoggerNotFound StandardError = "invalid rule syntax, no logger found for log enabled rule: %s" 40 41 ErrACLRuleSyntax StandardError = "invalid rule syntax: %v" 42 )