permissionsv1

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_iam_permissions_v1_permissions_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type AddPermissionRequest

type AddPermissionRequest struct {

	// Role - роль которая выдаётся
	Role string `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"`
	// ObjectID - идентификатор объекта на который выдаётся роль
	ObjectId string `protobuf:"bytes,2,opt,name=object_id,json=objectId,proto3" json:"object_id,omitempty"`
	// ObjectType - тип объекта на который выдаётся роль
	// Возможные значения:
	//   "customer"
	//   "resource"
	ObjectType string `protobuf:"bytes,3,opt,name=object_type,json=objectType,proto3" json:"object_type,omitempty"`
	// SubjectID - идентификатор субъекта которому выдаются права доступа
	SubjectId string `protobuf:"bytes,4,opt,name=subject_id,json=subjectId,proto3" json:"subject_id,omitempty"`
	// SubjectType - тип субъекта которому выдаются права доступа
	// Возможные значения:
	//   "user"
	//   "user_group"
	//   "service_account"
	SubjectType string `protobuf:"bytes,5,opt,name=subject_type,json=subjectType,proto3" json:"subject_type,omitempty"`
	// ExpiresAt - дата истечения срока действия разрешения
	ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"`
	// contains filtered or unexported fields
}

AddPermissionRequest - запрос на добавление нового права доступа

func (*AddPermissionRequest) Descriptor deprecated

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

Deprecated: Use AddPermissionRequest.ProtoReflect.Descriptor instead.

func (*AddPermissionRequest) GetExpiresAt

func (x *AddPermissionRequest) GetExpiresAt() *timestamppb.Timestamp

func (*AddPermissionRequest) GetObjectId

func (x *AddPermissionRequest) GetObjectId() string

func (*AddPermissionRequest) GetObjectType

func (x *AddPermissionRequest) GetObjectType() string

func (*AddPermissionRequest) GetRole

func (x *AddPermissionRequest) GetRole() string

func (*AddPermissionRequest) GetSubjectId

func (x *AddPermissionRequest) GetSubjectId() string

func (*AddPermissionRequest) GetSubjectType

func (x *AddPermissionRequest) GetSubjectType() string

func (*AddPermissionRequest) ProtoMessage

func (*AddPermissionRequest) ProtoMessage()

func (*AddPermissionRequest) ProtoReflect

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

func (*AddPermissionRequest) Reset

func (x *AddPermissionRequest) Reset()

func (*AddPermissionRequest) String

func (x *AddPermissionRequest) String() string

func (*AddPermissionRequest) Validate

func (m *AddPermissionRequest) Validate() error

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

func (m *AddPermissionRequest) ValidateAll() error

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

type AddPermissionRequestMultiError

type AddPermissionRequestMultiError []error

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

func (AddPermissionRequestMultiError) AllErrors

func (m AddPermissionRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (AddPermissionRequestMultiError) Error

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

type AddPermissionRequestValidationError

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

AddPermissionRequestValidationError is the validation error returned by AddPermissionRequest.Validate if the designated constraints aren't met.

func (AddPermissionRequestValidationError) Cause

Cause function returns cause value.

func (AddPermissionRequestValidationError) Error

Error satisfies the builtin error interface

func (AddPermissionRequestValidationError) ErrorName

ErrorName returns error name.

func (AddPermissionRequestValidationError) Field

Field function returns field value.

func (AddPermissionRequestValidationError) Key

Key function returns key value.

func (AddPermissionRequestValidationError) Reason

Reason function returns reason value.

type DeletePermissionRequest

type DeletePermissionRequest struct {

	// UserID id разрешения
	Id *PermissionID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

DeletePermissionRequest запрос на удаление разрешения

func (*DeletePermissionRequest) Descriptor deprecated

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

Deprecated: Use DeletePermissionRequest.ProtoReflect.Descriptor instead.

func (*DeletePermissionRequest) GetId

func (*DeletePermissionRequest) ProtoMessage

func (*DeletePermissionRequest) ProtoMessage()

func (*DeletePermissionRequest) ProtoReflect

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

func (*DeletePermissionRequest) Reset

func (x *DeletePermissionRequest) Reset()

func (*DeletePermissionRequest) String

func (x *DeletePermissionRequest) String() string

func (*DeletePermissionRequest) Validate

func (m *DeletePermissionRequest) Validate() error

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

func (m *DeletePermissionRequest) ValidateAll() error

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

type DeletePermissionRequestMultiError

type DeletePermissionRequestMultiError []error

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

func (DeletePermissionRequestMultiError) AllErrors

func (m DeletePermissionRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (DeletePermissionRequestMultiError) Error

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

type DeletePermissionRequestValidationError

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

DeletePermissionRequestValidationError is the validation error returned by DeletePermissionRequest.Validate if the designated constraints aren't met.

func (DeletePermissionRequestValidationError) Cause

Cause function returns cause value.

func (DeletePermissionRequestValidationError) Error

Error satisfies the builtin error interface

func (DeletePermissionRequestValidationError) ErrorName

ErrorName returns error name.

func (DeletePermissionRequestValidationError) Field

Field function returns field value.

func (DeletePermissionRequestValidationError) Key

Key function returns key value.

func (DeletePermissionRequestValidationError) Reason

Reason function returns reason value.

type PermissionID

type PermissionID struct {

	// Role - роль которая выдаётся
	Role string `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"`
	// ObjectID - идентификатор объекта на который выдаётся роль
	ObjectId string `protobuf:"bytes,2,opt,name=object_id,json=objectId,proto3" json:"object_id,omitempty"`
	// ObjectType - тип объекта на который выдаётся роль
	// Возможные значения:
	//   "customer"
	//   "resource"
	ObjectType string `protobuf:"bytes,3,opt,name=object_type,json=objectType,proto3" json:"object_type,omitempty"`
	// SubjectID - идентификатор субъекта которому выдаются права доступа
	SubjectId string `protobuf:"bytes,4,opt,name=subject_id,json=subjectId,proto3" json:"subject_id,omitempty"`
	// SubjectType - тип субъекта которому выдаются права доступа
	// Возможные значения:
	//   "user"
	//   "user_group"
	//   "service_account"
	SubjectType string `protobuf:"bytes,5,opt,name=subject_type,json=subjectType,proto3" json:"subject_type,omitempty"`
	// contains filtered or unexported fields
}

PermissionID id разрешения

func (*PermissionID) Descriptor deprecated

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

Deprecated: Use PermissionID.ProtoReflect.Descriptor instead.

func (*PermissionID) GetObjectId

func (x *PermissionID) GetObjectId() string

func (*PermissionID) GetObjectType

func (x *PermissionID) GetObjectType() string

func (*PermissionID) GetRole

func (x *PermissionID) GetRole() string

func (*PermissionID) GetSubjectId

func (x *PermissionID) GetSubjectId() string

func (*PermissionID) GetSubjectType

func (x *PermissionID) GetSubjectType() string

func (*PermissionID) ProtoMessage

func (*PermissionID) ProtoMessage()

func (*PermissionID) ProtoReflect

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

func (*PermissionID) Reset

func (x *PermissionID) Reset()

func (*PermissionID) String

func (x *PermissionID) String() string

func (*PermissionID) Validate

func (m *PermissionID) Validate() error

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

func (m *PermissionID) ValidateAll() error

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

type PermissionIDMultiError

type PermissionIDMultiError []error

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

func (PermissionIDMultiError) AllErrors

func (m PermissionIDMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (PermissionIDMultiError) Error

func (m PermissionIDMultiError) Error() string

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

type PermissionIDValidationError

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

PermissionIDValidationError is the validation error returned by PermissionID.Validate if the designated constraints aren't met.

func (PermissionIDValidationError) Cause

Cause function returns cause value.

func (PermissionIDValidationError) Error

Error satisfies the builtin error interface

func (PermissionIDValidationError) ErrorName

func (e PermissionIDValidationError) ErrorName() string

ErrorName returns error name.

func (PermissionIDValidationError) Field

Field function returns field value.

func (PermissionIDValidationError) Key

Key function returns key value.

func (PermissionIDValidationError) Reason

Reason function returns reason value.

type PermissionsServiceClient

type PermissionsServiceClient interface {
	// Add добавляет новое разрешение
	Add(ctx context.Context, in *AddPermissionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Delete удаляет разрешение
	Delete(ctx context.Context, in *DeletePermissionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

PermissionsServiceClient is the client API for PermissionsService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

Jump to

Keyboard shortcuts

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