Documentation ¶
Index ¶
- Variables
- type Policy
- func (*Policy) Descriptor() ([]byte, []int)deprecated
- func (x *Policy) GetAction() string
- func (x *Policy) GetDomain() []string
- func (x *Policy) GetExtras() map[string]string
- func (x *Policy) GetObject() string
- func (x *Policy) GetSubject() string
- func (*Policy) ProtoMessage()
- func (x *Policy) ProtoReflect() protoreflect.Message
- func (x *Policy) Reset()
- func (x *Policy) String() string
- func (m *Policy) Validate() error
- func (m *Policy) ValidateAll() error
- type PolicyMultiError
- type PolicyValidationError
Constants ¶
This section is empty.
Variables ¶
var File_security_casbin_v1_policy_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Policy ¶
type Policy struct { Subject string `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"` Object string `protobuf:"bytes,2,opt,name=object,proto3" json:"object,omitempty"` Action string `protobuf:"bytes,3,opt,name=action,proto3" json:"action,omitempty"` Domain []string `protobuf:"bytes,4,rep,name=domain,proto3" json:"domain,omitempty"` Extras map[string]string `` /* 153-byte string literal not displayed */ // contains filtered or unexported fields }
func (*Policy) Descriptor
deprecated
func (*Policy) GetSubject ¶
func (*Policy) ProtoMessage ¶
func (*Policy) ProtoMessage()
func (*Policy) ProtoReflect ¶
func (x *Policy) ProtoReflect() protoreflect.Message
func (*Policy) Validate ¶
Validate checks the field values on Policy with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Policy) ValidateAll ¶
ValidateAll checks the field values on Policy with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in PolicyMultiError, or nil if none found.
type PolicyMultiError ¶
type PolicyMultiError []error
PolicyMultiError is an error wrapping multiple validation errors returned by Policy.ValidateAll() if the designated constraints aren't met.
func (PolicyMultiError) AllErrors ¶
func (m PolicyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (PolicyMultiError) Error ¶
func (m PolicyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type PolicyValidationError ¶
type PolicyValidationError struct {
// contains filtered or unexported fields
}
PolicyValidationError is the validation error returned by Policy.Validate if the designated constraints aren't met.
func (PolicyValidationError) Cause ¶
func (e PolicyValidationError) Cause() error
Cause function returns cause value.
func (PolicyValidationError) Error ¶
func (e PolicyValidationError) Error() string
Error satisfies the builtin error interface
func (PolicyValidationError) ErrorName ¶
func (e PolicyValidationError) ErrorName() string
ErrorName returns error name.
func (PolicyValidationError) Field ¶
func (e PolicyValidationError) Field() string
Field function returns field value.
func (PolicyValidationError) Key ¶
func (e PolicyValidationError) Key() bool
Key function returns key value.
func (PolicyValidationError) Reason ¶
func (e PolicyValidationError) Reason() string
Reason function returns reason value.