Documentation ¶
Index ¶
- Variables
- type Element
- func (*Element) Descriptor() ([]byte, []int)deprecated
- func (x *Element) GetElementName() string
- func (x *Element) GetElementType() ElementType
- func (*Element) ProtoMessage()
- func (x *Element) ProtoReflect() protoreflect.Message
- func (x *Element) Reset()
- func (x *Element) String() string
- func (m *Element) Validate() error
- func (m *Element) ValidateAll() error
- type ElementMultiError
- type ElementPermission
- func (*ElementPermission) Descriptor() ([]byte, []int)deprecated
- func (x *ElementPermission) GetElement() *Element
- func (x *ElementPermission) GetRole() Role
- func (*ElementPermission) ProtoMessage()
- func (x *ElementPermission) ProtoReflect() protoreflect.Message
- func (x *ElementPermission) Reset()
- func (x *ElementPermission) String() string
- func (m *ElementPermission) Validate() error
- func (m *ElementPermission) ValidateAll() error
- type ElementPermissionMultiError
- type ElementPermissionValidationError
- func (e ElementPermissionValidationError) Cause() error
- func (e ElementPermissionValidationError) Error() string
- func (e ElementPermissionValidationError) ErrorName() string
- func (e ElementPermissionValidationError) Field() string
- func (e ElementPermissionValidationError) Key() bool
- func (e ElementPermissionValidationError) Reason() string
- type ElementType
- func (ElementType) Descriptor() protoreflect.EnumDescriptor
- func (x ElementType) Enum() *ElementType
- func (ElementType) EnumDescriptor() ([]byte, []int)deprecated
- func (x ElementType) Number() protoreflect.EnumNumber
- func (x ElementType) String() string
- func (ElementType) Type() protoreflect.EnumType
- type ElementValidationError
- type Role
Constants ¶
This section is empty.
Variables ¶
var ( Role_name = map[int32]string{ 0: "READER", 10: "WRITER", 20: "OWNER", } Role_value = map[string]int32{ "READER": 0, "WRITER": 10, "OWNER": 20, } )
Enum value maps for Role.
var ( ElementType_name = map[int32]string{ 0: "USER", 1: "GROUP", } ElementType_value = map[string]int32{ "USER": 0, "GROUP": 1, } )
Enum value maps for ElementType.
var File_gsloc_api_config_permission_v1_permission_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Element ¶
type Element struct { ElementType ElementType `` /* 143-byte string literal not displayed */ ElementName string `protobuf:"bytes,2,opt,name=element_name,json=elementName,proto3" json:"element_name,omitempty"` // contains filtered or unexported fields }
Member is a user or a group.
func (*Element) Descriptor
deprecated
func (*Element) GetElementName ¶
func (*Element) GetElementType ¶
func (x *Element) GetElementType() ElementType
func (*Element) ProtoMessage ¶
func (*Element) ProtoMessage()
func (*Element) ProtoReflect ¶
func (x *Element) ProtoReflect() protoreflect.Message
func (*Element) Validate ¶
Validate checks the field values on Element 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 (*Element) ValidateAll ¶
ValidateAll checks the field values on Element 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 ElementMultiError, or nil if none found.
type ElementMultiError ¶
type ElementMultiError []error
ElementMultiError is an error wrapping multiple validation errors returned by Element.ValidateAll() if the designated constraints aren't met.
func (ElementMultiError) AllErrors ¶
func (m ElementMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ElementMultiError) Error ¶
func (m ElementMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ElementPermission ¶
type ElementPermission struct { Role Role `protobuf:"varint,1,opt,name=role,proto3,enum=gsloc.api.config.permission.v1.Role" json:"role,omitempty"` Element *Element `protobuf:"bytes,2,opt,name=element,proto3" json:"element,omitempty"` // contains filtered or unexported fields }
MemberPermission is a permission on a resource for a given member.
func (*ElementPermission) Descriptor
deprecated
func (*ElementPermission) Descriptor() ([]byte, []int)
Deprecated: Use ElementPermission.ProtoReflect.Descriptor instead.
func (*ElementPermission) GetElement ¶
func (x *ElementPermission) GetElement() *Element
func (*ElementPermission) GetRole ¶
func (x *ElementPermission) GetRole() Role
func (*ElementPermission) ProtoMessage ¶
func (*ElementPermission) ProtoMessage()
func (*ElementPermission) ProtoReflect ¶
func (x *ElementPermission) ProtoReflect() protoreflect.Message
func (*ElementPermission) Reset ¶
func (x *ElementPermission) Reset()
func (*ElementPermission) String ¶
func (x *ElementPermission) String() string
func (*ElementPermission) Validate ¶
func (m *ElementPermission) Validate() error
Validate checks the field values on ElementPermission 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 (*ElementPermission) ValidateAll ¶
func (m *ElementPermission) ValidateAll() error
ValidateAll checks the field values on ElementPermission 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 ElementPermissionMultiError, or nil if none found.
type ElementPermissionMultiError ¶
type ElementPermissionMultiError []error
ElementPermissionMultiError is an error wrapping multiple validation errors returned by ElementPermission.ValidateAll() if the designated constraints aren't met.
func (ElementPermissionMultiError) AllErrors ¶
func (m ElementPermissionMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ElementPermissionMultiError) Error ¶
func (m ElementPermissionMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ElementPermissionValidationError ¶
type ElementPermissionValidationError struct {
// contains filtered or unexported fields
}
ElementPermissionValidationError is the validation error returned by ElementPermission.Validate if the designated constraints aren't met.
func (ElementPermissionValidationError) Cause ¶
func (e ElementPermissionValidationError) Cause() error
Cause function returns cause value.
func (ElementPermissionValidationError) Error ¶
func (e ElementPermissionValidationError) Error() string
Error satisfies the builtin error interface
func (ElementPermissionValidationError) ErrorName ¶
func (e ElementPermissionValidationError) ErrorName() string
ErrorName returns error name.
func (ElementPermissionValidationError) Field ¶
func (e ElementPermissionValidationError) Field() string
Field function returns field value.
func (ElementPermissionValidationError) Key ¶
func (e ElementPermissionValidationError) Key() bool
Key function returns key value.
func (ElementPermissionValidationError) Reason ¶
func (e ElementPermissionValidationError) Reason() string
Reason function returns reason value.
type ElementType ¶
type ElementType int32
MemberType is the type of the member.
const ( ElementType_USER ElementType = 0 ElementType_GROUP ElementType = 1 )
func (ElementType) Descriptor ¶
func (ElementType) Descriptor() protoreflect.EnumDescriptor
func (ElementType) Enum ¶
func (x ElementType) Enum() *ElementType
func (ElementType) EnumDescriptor
deprecated
func (ElementType) EnumDescriptor() ([]byte, []int)
Deprecated: Use ElementType.Descriptor instead.
func (ElementType) Number ¶
func (x ElementType) Number() protoreflect.EnumNumber
func (ElementType) String ¶
func (x ElementType) String() string
func (ElementType) Type ¶
func (ElementType) Type() protoreflect.EnumType
type ElementValidationError ¶
type ElementValidationError struct {
// contains filtered or unexported fields
}
ElementValidationError is the validation error returned by Element.Validate if the designated constraints aren't met.
func (ElementValidationError) Cause ¶
func (e ElementValidationError) Cause() error
Cause function returns cause value.
func (ElementValidationError) Error ¶
func (e ElementValidationError) Error() string
Error satisfies the builtin error interface
func (ElementValidationError) ErrorName ¶
func (e ElementValidationError) ErrorName() string
ErrorName returns error name.
func (ElementValidationError) Field ¶
func (e ElementValidationError) Field() string
Field function returns field value.
func (ElementValidationError) Key ¶
func (e ElementValidationError) Key() bool
Key function returns key value.
func (ElementValidationError) Reason ¶
func (e ElementValidationError) Reason() string
Reason function returns reason value.
type Role ¶
type Role int32
Role is the permission role. READER: can read the entry. WRITER: can read and update the entry. OWNER: can read, update, delete and set permission on the entry. Order is important, it is used to check if a user has a permission or higher.
func (Role) Descriptor ¶
func (Role) Descriptor() protoreflect.EnumDescriptor
func (Role) EnumDescriptor
deprecated
func (Role) Number ¶
func (x Role) Number() protoreflect.EnumNumber
func (Role) Type ¶
func (Role) Type() protoreflect.EnumType