v2

package
v2.0.0-...-5c24666 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Permission_Type_name = map[int32]string{
		0: "READ",
		1: "WRITE",
		2: "READWRITE",
	}
	Permission_Type_value = map[string]int32{
		"READ":      0,
		"WRITE":     1,
		"READWRITE": 2,
	}
)

Enum value maps for Permission_Type.

View Source
var File_auth_auth_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Permission

type Permission struct {
	PermType Permission_Type `protobuf:"varint,1,opt,name=permType,proto3,enum=auth.Permission_Type" json:"permType,omitempty"`
	// contains filtered or unexported fields
}

func (*Permission) Descriptor deprecated

func (*Permission) Descriptor() ([]byte, []int)

Deprecated: Use Permission.ProtoReflect.Descriptor instead.

func (*Permission) GetPermType

func (x *Permission) GetPermType() Permission_Type

func (*Permission) ProtoMessage

func (*Permission) ProtoMessage()

func (*Permission) ProtoReflect

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

func (*Permission) Reset

func (x *Permission) Reset()

func (*Permission) String

func (x *Permission) String() string

func (*Permission) Validate

func (m *Permission) Validate() error

Validate checks the field values on Permission 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 (*Permission) ValidateAll

func (m *Permission) ValidateAll() error

ValidateAll checks the field values on Permission 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 PermissionMultiError, or nil if none found.

type PermissionMultiError

type PermissionMultiError []error

PermissionMultiError is an error wrapping multiple validation errors returned by Permission.ValidateAll() if the designated constraints aren't met.

func (PermissionMultiError) AllErrors

func (m PermissionMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (PermissionMultiError) Error

func (m PermissionMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type PermissionValidationError

type PermissionValidationError struct {
	// contains filtered or unexported fields
}

PermissionValidationError is the validation error returned by Permission.Validate if the designated constraints aren't met.

func (PermissionValidationError) Cause

func (e PermissionValidationError) Cause() error

Cause function returns cause value.

func (PermissionValidationError) Error

Error satisfies the builtin error interface

func (PermissionValidationError) ErrorName

func (e PermissionValidationError) ErrorName() string

ErrorName returns error name.

func (PermissionValidationError) Field

Field function returns field value.

func (PermissionValidationError) Key

Key function returns key value.

func (PermissionValidationError) Reason

func (e PermissionValidationError) Reason() string

Reason function returns reason value.

type Permission_Type

type Permission_Type int32
const (
	Permission_READ      Permission_Type = 0
	Permission_WRITE     Permission_Type = 1
	Permission_READWRITE Permission_Type = 2
)

func (Permission_Type) Descriptor

func (Permission_Type) Enum

func (x Permission_Type) Enum() *Permission_Type

func (Permission_Type) EnumDescriptor deprecated

func (Permission_Type) EnumDescriptor() ([]byte, []int)

Deprecated: Use Permission_Type.Descriptor instead.

func (Permission_Type) Number

func (Permission_Type) String

func (x Permission_Type) String() string

func (Permission_Type) Type

type Role

type Role struct {
	Name          string        `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	KeyPermission []*Permission `protobuf:"bytes,2,rep,name=keyPermission,proto3" json:"keyPermission,omitempty"`
	// contains filtered or unexported fields
}

func (*Role) Descriptor deprecated

func (*Role) Descriptor() ([]byte, []int)

Deprecated: Use Role.ProtoReflect.Descriptor instead.

func (*Role) GetKeyPermission

func (x *Role) GetKeyPermission() []*Permission

func (*Role) GetName

func (x *Role) GetName() string

func (*Role) ProtoMessage

func (*Role) ProtoMessage()

func (*Role) ProtoReflect

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

func (*Role) Reset

func (x *Role) Reset()

func (*Role) String

func (x *Role) String() string

func (*Role) Validate

func (m *Role) Validate() error

Validate checks the field values on Role 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 (*Role) ValidateAll

func (m *Role) ValidateAll() error

ValidateAll checks the field values on Role 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 RoleMultiError, or nil if none found.

type RoleMultiError

type RoleMultiError []error

RoleMultiError is an error wrapping multiple validation errors returned by Role.ValidateAll() if the designated constraints aren't met.

func (RoleMultiError) AllErrors

func (m RoleMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (RoleMultiError) Error

func (m RoleMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type RoleValidationError

type RoleValidationError struct {
	// contains filtered or unexported fields
}

RoleValidationError is the validation error returned by Role.Validate if the designated constraints aren't met.

func (RoleValidationError) Cause

func (e RoleValidationError) Cause() error

Cause function returns cause value.

func (RoleValidationError) Error

func (e RoleValidationError) Error() string

Error satisfies the builtin error interface

func (RoleValidationError) ErrorName

func (e RoleValidationError) ErrorName() string

ErrorName returns error name.

func (RoleValidationError) Field

func (e RoleValidationError) Field() string

Field function returns field value.

func (RoleValidationError) Key

func (e RoleValidationError) Key() bool

Key function returns key value.

func (RoleValidationError) Reason

func (e RoleValidationError) Reason() string

Reason function returns reason value.

type User

type User struct {
	Name     string               `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Password string               `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	Roles    []string             `protobuf:"bytes,3,rep,name=roles,proto3" json:"roles,omitempty"`
	Options  *User_UserAddOptions `protobuf:"bytes,4,opt,name=options,proto3" json:"options,omitempty"`
	// contains filtered or unexported fields
}

func (*User) Descriptor deprecated

func (*User) Descriptor() ([]byte, []int)

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetName

func (x *User) GetName() string

func (*User) GetOptions

func (x *User) GetOptions() *User_UserAddOptions

func (*User) GetPassword

func (x *User) GetPassword() string

func (*User) GetRoles

func (x *User) GetRoles() []string

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

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

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

func (*User) Validate

func (m *User) Validate() error

Validate checks the field values on User 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 (*User) ValidateAll

func (m *User) ValidateAll() error

ValidateAll checks the field values on User 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 UserMultiError, or nil if none found.

type UserMultiError

type UserMultiError []error

UserMultiError is an error wrapping multiple validation errors returned by User.ValidateAll() if the designated constraints aren't met.

func (UserMultiError) AllErrors

func (m UserMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (UserMultiError) Error

func (m UserMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type UserValidationError

type UserValidationError struct {
	// contains filtered or unexported fields
}

UserValidationError is the validation error returned by User.Validate if the designated constraints aren't met.

func (UserValidationError) Cause

func (e UserValidationError) Cause() error

Cause function returns cause value.

func (UserValidationError) Error

func (e UserValidationError) Error() string

Error satisfies the builtin error interface

func (UserValidationError) ErrorName

func (e UserValidationError) ErrorName() string

ErrorName returns error name.

func (UserValidationError) Field

func (e UserValidationError) Field() string

Field function returns field value.

func (UserValidationError) Key

func (e UserValidationError) Key() bool

Key function returns key value.

func (UserValidationError) Reason

func (e UserValidationError) Reason() string

Reason function returns reason value.

type User_UserAddOptions

type User_UserAddOptions struct {
	NoPassword bool `protobuf:"varint,1,opt,name=no_password,json=noPassword,proto3" json:"no_password,omitempty"`
	// contains filtered or unexported fields
}

func (*User_UserAddOptions) Descriptor deprecated

func (*User_UserAddOptions) Descriptor() ([]byte, []int)

Deprecated: Use User_UserAddOptions.ProtoReflect.Descriptor instead.

func (*User_UserAddOptions) GetNoPassword

func (x *User_UserAddOptions) GetNoPassword() bool

func (*User_UserAddOptions) ProtoMessage

func (*User_UserAddOptions) ProtoMessage()

func (*User_UserAddOptions) ProtoReflect

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

func (*User_UserAddOptions) Reset

func (x *User_UserAddOptions) Reset()

func (*User_UserAddOptions) String

func (x *User_UserAddOptions) String() string

func (*User_UserAddOptions) Validate

func (m *User_UserAddOptions) Validate() error

Validate checks the field values on User_UserAddOptions 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 (*User_UserAddOptions) ValidateAll

func (m *User_UserAddOptions) ValidateAll() error

ValidateAll checks the field values on User_UserAddOptions 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 User_UserAddOptionsMultiError, or nil if none found.

type User_UserAddOptionsMultiError

type User_UserAddOptionsMultiError []error

User_UserAddOptionsMultiError is an error wrapping multiple validation errors returned by User_UserAddOptions.ValidateAll() if the designated constraints aren't met.

func (User_UserAddOptionsMultiError) AllErrors

func (m User_UserAddOptionsMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (User_UserAddOptionsMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type User_UserAddOptionsValidationError

type User_UserAddOptionsValidationError struct {
	// contains filtered or unexported fields
}

User_UserAddOptionsValidationError is the validation error returned by User_UserAddOptions.Validate if the designated constraints aren't met.

func (User_UserAddOptionsValidationError) Cause

Cause function returns cause value.

func (User_UserAddOptionsValidationError) Error

Error satisfies the builtin error interface

func (User_UserAddOptionsValidationError) ErrorName

ErrorName returns error name.

func (User_UserAddOptionsValidationError) Field

Field function returns field value.

func (User_UserAddOptionsValidationError) Key

Key function returns key value.

func (User_UserAddOptionsValidationError) Reason

Reason function returns reason value.

Jump to

Keyboard shortcuts

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