casbinv1

package
v0.1.34 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 24, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Policy.ProtoReflect.Descriptor instead.

func (*Policy) GetAction

func (x *Policy) GetAction() string

func (*Policy) GetDomain

func (x *Policy) GetDomain() []string

func (*Policy) GetExtras

func (x *Policy) GetExtras() map[string]string

func (*Policy) GetObject

func (x *Policy) GetObject() string

func (*Policy) GetSubject

func (x *Policy) GetSubject() string

func (*Policy) ProtoMessage

func (*Policy) ProtoMessage()

func (*Policy) ProtoReflect

func (x *Policy) ProtoReflect() protoreflect.Message

func (*Policy) Reset

func (x *Policy) Reset()

func (*Policy) String

func (x *Policy) String() string

func (*Policy) Validate

func (m *Policy) Validate() error

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

func (m *Policy) ValidateAll() error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL