rights

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2021 License: MIT Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AccessRights_name = map[int32]string{
		0: "ACCESS_RIGHTS_READ_UNSPECIFIED",
		1: "ACCESS_RIGHTS_WRITE",
		2: "ACCESS_RIGHTS_DELETE",
	}
	AccessRights_value = map[string]int32{
		"ACCESS_RIGHTS_READ_UNSPECIFIED": 0,
		"ACCESS_RIGHTS_WRITE":            1,
		"ACCESS_RIGHTS_DELETE":           2,
	}
)

Enum value maps for AccessRights.

View Source
var File_users_rights_rights_v1_proto protoreflect.FileDescriptor
View Source
var Rights_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "users.Rights",
	HandlerType: (*RightsServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Create",
			Handler:    _Rights_Create_Handler,
		},
		{
			MethodName: "Update",
			Handler:    _Rights_Update_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _Rights_Delete_Handler,
		},
		{
			MethodName: "Get",
			Handler:    _Rights_Get_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "List",
			Handler:       _Rights_List_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "users/rights/rights_v1.proto",
}

Rights_ServiceDesc is the grpc.ServiceDesc for Rights service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterRightsServer

func RegisterRightsServer(s grpc.ServiceRegistrar, srv RightsServer)

Types

type AccessRights

type AccessRights int32
const (
	AccessRights_ACCESS_RIGHTS_READ_UNSPECIFIED AccessRights = 0
	AccessRights_ACCESS_RIGHTS_WRITE            AccessRights = 1
	AccessRights_ACCESS_RIGHTS_DELETE           AccessRights = 2
)

func (AccessRights) Descriptor

func (AccessRights) Enum

func (x AccessRights) Enum() *AccessRights

func (AccessRights) EnumDescriptor deprecated

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

Deprecated: Use AccessRights.Descriptor instead.

func (AccessRights) Number

func (AccessRights) String

func (x AccessRights) String() string

func (AccessRights) Type

type AccessRuleId

type AccessRuleId struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*AccessRuleId) Descriptor deprecated

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

Deprecated: Use AccessRuleId.ProtoReflect.Descriptor instead.

func (*AccessRuleId) GetId

func (x *AccessRuleId) GetId() string

func (*AccessRuleId) ProtoMessage

func (*AccessRuleId) ProtoMessage()

func (*AccessRuleId) ProtoReflect

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

func (*AccessRuleId) Reset

func (x *AccessRuleId) Reset()

func (*AccessRuleId) String

func (x *AccessRuleId) String() string

type AccessRuleIdAndRight

type AccessRuleIdAndRight struct {
	Id          string       `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	AccessRight AccessRights `protobuf:"varint,3,opt,name=access_right,json=accessRight,proto3,enum=users.AccessRights" json:"access_right,omitempty"`
	// contains filtered or unexported fields
}

func (*AccessRuleIdAndRight) Descriptor deprecated

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

Deprecated: Use AccessRuleIdAndRight.ProtoReflect.Descriptor instead.

func (*AccessRuleIdAndRight) GetAccessRight

func (x *AccessRuleIdAndRight) GetAccessRight() AccessRights

func (*AccessRuleIdAndRight) GetId

func (x *AccessRuleIdAndRight) GetId() string

func (*AccessRuleIdAndRight) ProtoMessage

func (*AccessRuleIdAndRight) ProtoMessage()

func (*AccessRuleIdAndRight) ProtoReflect

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

func (*AccessRuleIdAndRight) Reset

func (x *AccessRuleIdAndRight) Reset()

func (*AccessRuleIdAndRight) String

func (x *AccessRuleIdAndRight) String() string

type AccessRuleInfo

type AccessRuleInfo struct {
	Id            string       `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	UserId        string       `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	ApplicationId string       `protobuf:"bytes,3,opt,name=application_id,json=applicationId,proto3" json:"application_id,omitempty"`
	AccessRight   AccessRights `protobuf:"varint,4,opt,name=access_right,json=accessRight,proto3,enum=users.AccessRights" json:"access_right,omitempty"`
	// contains filtered or unexported fields
}

func (*AccessRuleInfo) Descriptor deprecated

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

Deprecated: Use AccessRuleInfo.ProtoReflect.Descriptor instead.

func (*AccessRuleInfo) GetAccessRight

func (x *AccessRuleInfo) GetAccessRight() AccessRights

func (*AccessRuleInfo) GetApplicationId

func (x *AccessRuleInfo) GetApplicationId() string

func (*AccessRuleInfo) GetId

func (x *AccessRuleInfo) GetId() string

func (*AccessRuleInfo) GetUserId added in v0.0.4

func (x *AccessRuleInfo) GetUserId() string

func (*AccessRuleInfo) ProtoMessage

func (*AccessRuleInfo) ProtoMessage()

func (*AccessRuleInfo) ProtoReflect

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

func (*AccessRuleInfo) Reset

func (x *AccessRuleInfo) Reset()

func (*AccessRuleInfo) String

func (x *AccessRuleInfo) String() string

type AccessRuleWithoutId

type AccessRuleWithoutId struct {
	UserId        string       `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	ApplicationId string       `protobuf:"bytes,2,opt,name=application_id,json=applicationId,proto3" json:"application_id,omitempty"`
	AccessRight   AccessRights `protobuf:"varint,3,opt,name=access_right,json=accessRight,proto3,enum=users.AccessRights" json:"access_right,omitempty"`
	// contains filtered or unexported fields
}

func (*AccessRuleWithoutId) Descriptor deprecated

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

Deprecated: Use AccessRuleWithoutId.ProtoReflect.Descriptor instead.

func (*AccessRuleWithoutId) GetAccessRight

func (x *AccessRuleWithoutId) GetAccessRight() AccessRights

func (*AccessRuleWithoutId) GetApplicationId

func (x *AccessRuleWithoutId) GetApplicationId() string

func (*AccessRuleWithoutId) GetUserId

func (x *AccessRuleWithoutId) GetUserId() string

func (*AccessRuleWithoutId) ProtoMessage

func (*AccessRuleWithoutId) ProtoMessage()

func (*AccessRuleWithoutId) ProtoReflect

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

func (*AccessRuleWithoutId) Reset

func (x *AccessRuleWithoutId) Reset()

func (*AccessRuleWithoutId) String

func (x *AccessRuleWithoutId) String() string

type ListOptions

type ListOptions struct {
	AppId *applications.AppId `protobuf:"bytes,1,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"`
	// contains filtered or unexported fields
}

func (*ListOptions) Descriptor deprecated

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

Deprecated: Use ListOptions.ProtoReflect.Descriptor instead.

func (*ListOptions) GetAppId

func (x *ListOptions) GetAppId() *applications.AppId

func (*ListOptions) ProtoMessage

func (*ListOptions) ProtoMessage()

func (*ListOptions) ProtoReflect

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

func (*ListOptions) Reset

func (x *ListOptions) Reset()

func (*ListOptions) String

func (x *ListOptions) String() string

type RightsClient

RightsClient is the client API for Rights 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.

func NewRightsClient

func NewRightsClient(cc grpc.ClientConnInterface) RightsClient

type RightsServer

type RightsServer interface {
	Create(context.Context, *AccessRuleWithoutId) (*AccessRuleInfo, error)
	Update(context.Context, *AccessRuleIdAndRight) (*AccessRuleIdAndRight, error)
	Delete(context.Context, *AccessRuleId) (*common.EmptyMessage, error)
	Get(context.Context, *AccessRuleId) (*AccessRuleInfo, error)
	List(*ListOptions, Rights_ListServer) error
	// contains filtered or unexported methods
}

RightsServer is the server API for Rights service. All implementations must embed UnimplementedRightsServer for forward compatibility

type Rights_ListClient

type Rights_ListClient interface {
	Recv() (*AccessRuleInfo, error)
	grpc.ClientStream
}

type Rights_ListServer

type Rights_ListServer interface {
	Send(*AccessRuleInfo) error
	grpc.ServerStream
}

type UnimplementedRightsServer

type UnimplementedRightsServer struct {
}

UnimplementedRightsServer must be embedded to have forward compatible implementations.

func (UnimplementedRightsServer) Create

func (UnimplementedRightsServer) Delete

func (UnimplementedRightsServer) Get

func (UnimplementedRightsServer) List

func (UnimplementedRightsServer) Update

type UnsafeRightsServer

type UnsafeRightsServer interface {
	// contains filtered or unexported methods
}

UnsafeRightsServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RightsServer will result in compilation errors.

Jump to

Keyboard shortcuts

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