first commit
This commit is contained in:
No files matched your search
@@ -0,0 +1,484 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc v3.12.4
|
||||
// source: internal/infrastructure/transport/grpc/proto/permission/v1/permission.proto
|
||||
|
||||
package permissionV1
|
||||
|
||||
import (
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
|
||||
wrappers "github.com/golang/protobuf/ptypes/wrappers"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// Pesan request untuk RPC GetRolePermissionTree.
|
||||
type GetRolePermissionTreeRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
RoleKeycloak string `protobuf:"bytes,1,opt,name=role_keycloak,json=roleKeycloak,proto3" json:"role_keycloak,omitempty"`
|
||||
GroupKeycloak []string `protobuf:"bytes,2,rep,name=group_keycloak,json=groupKeycloak,proto3" json:"group_keycloak,omitempty"`
|
||||
// Menggunakan wrapper BoolValue untuk membedakan antara 'false' dan 'tidak diset'.
|
||||
ActiveOnly *wrappers.BoolValue `protobuf:"bytes,3,opt,name=active_only,json=activeOnly,proto3" json:"active_only,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetRolePermissionTreeRequest) Reset() {
|
||||
*x = GetRolePermissionTreeRequest{}
|
||||
mi := &file_internal_infrastructure_transport_grpc_proto_permission_v1_permission_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetRolePermissionTreeRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetRolePermissionTreeRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetRolePermissionTreeRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_internal_infrastructure_transport_grpc_proto_permission_v1_permission_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetRolePermissionTreeRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetRolePermissionTreeRequest) Descriptor() ([]byte, []int) {
|
||||
return file_internal_infrastructure_transport_grpc_proto_permission_v1_permission_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *GetRolePermissionTreeRequest) GetRoleKeycloak() string {
|
||||
if x != nil {
|
||||
return x.RoleKeycloak
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *GetRolePermissionTreeRequest) GetGroupKeycloak() []string {
|
||||
if x != nil {
|
||||
return x.GroupKeycloak
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *GetRolePermissionTreeRequest) GetActiveOnly() *wrappers.BoolValue {
|
||||
if x != nil {
|
||||
return x.ActiveOnly
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Pesan response untuk RPC GetRolePermissionTree.
|
||||
type RolePermissionTreeResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
|
||||
Data *RolePermissionData `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *RolePermissionTreeResponse) Reset() {
|
||||
*x = RolePermissionTreeResponse{}
|
||||
mi := &file_internal_infrastructure_transport_grpc_proto_permission_v1_permission_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *RolePermissionTreeResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*RolePermissionTreeResponse) ProtoMessage() {}
|
||||
|
||||
func (x *RolePermissionTreeResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_internal_infrastructure_transport_grpc_proto_permission_v1_permission_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use RolePermissionTreeResponse.ProtoReflect.Descriptor instead.
|
||||
func (*RolePermissionTreeResponse) Descriptor() ([]byte, []int) {
|
||||
return file_internal_infrastructure_transport_grpc_proto_permission_v1_permission_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *RolePermissionTreeResponse) GetSuccess() bool {
|
||||
if x != nil {
|
||||
return x.Success
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *RolePermissionTreeResponse) GetData() *RolePermissionData {
|
||||
if x != nil {
|
||||
return x.Data
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type RolePermissionData struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Role string `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"`
|
||||
Group []string `protobuf:"bytes,2,rep,name=group,proto3" json:"group,omitempty"`
|
||||
Access []*AccessTreeItem `protobuf:"bytes,3,rep,name=access,proto3" json:"access,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *RolePermissionData) Reset() {
|
||||
*x = RolePermissionData{}
|
||||
mi := &file_internal_infrastructure_transport_grpc_proto_permission_v1_permission_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *RolePermissionData) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*RolePermissionData) ProtoMessage() {}
|
||||
|
||||
func (x *RolePermissionData) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_internal_infrastructure_transport_grpc_proto_permission_v1_permission_proto_msgTypes[2]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use RolePermissionData.ProtoReflect.Descriptor instead.
|
||||
func (*RolePermissionData) Descriptor() ([]byte, []int) {
|
||||
return file_internal_infrastructure_transport_grpc_proto_permission_v1_permission_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *RolePermissionData) GetRole() string {
|
||||
if x != nil {
|
||||
return x.Role
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *RolePermissionData) GetGroup() []string {
|
||||
if x != nil {
|
||||
return x.Group
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *RolePermissionData) GetAccess() []*AccessTreeItem {
|
||||
if x != nil {
|
||||
return x.Access
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type AccessTreeItem struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Icon string `protobuf:"bytes,3,opt,name=icon,proto3" json:"icon,omitempty"`
|
||||
Url string `protobuf:"bytes,4,opt,name=url,proto3" json:"url,omitempty"`
|
||||
Level int32 `protobuf:"varint,5,opt,name=level,proto3" json:"level,omitempty"`
|
||||
Sort int32 `protobuf:"varint,6,opt,name=sort,proto3" json:"sort,omitempty"`
|
||||
Active bool `protobuf:"varint,7,opt,name=active,proto3" json:"active,omitempty"`
|
||||
Permission *Permission `protobuf:"bytes,8,opt,name=permission,proto3,oneof" json:"permission,omitempty"`
|
||||
Children []*AccessTreeItem `protobuf:"bytes,9,rep,name=children,proto3" json:"children,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *AccessTreeItem) Reset() {
|
||||
*x = AccessTreeItem{}
|
||||
mi := &file_internal_infrastructure_transport_grpc_proto_permission_v1_permission_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *AccessTreeItem) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*AccessTreeItem) ProtoMessage() {}
|
||||
|
||||
func (x *AccessTreeItem) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_internal_infrastructure_transport_grpc_proto_permission_v1_permission_proto_msgTypes[3]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use AccessTreeItem.ProtoReflect.Descriptor instead.
|
||||
func (*AccessTreeItem) Descriptor() ([]byte, []int) {
|
||||
return file_internal_infrastructure_transport_grpc_proto_permission_v1_permission_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *AccessTreeItem) GetId() int64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *AccessTreeItem) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *AccessTreeItem) GetIcon() string {
|
||||
if x != nil {
|
||||
return x.Icon
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *AccessTreeItem) GetUrl() string {
|
||||
if x != nil {
|
||||
return x.Url
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *AccessTreeItem) GetLevel() int32 {
|
||||
if x != nil {
|
||||
return x.Level
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *AccessTreeItem) GetSort() int32 {
|
||||
if x != nil {
|
||||
return x.Sort
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *AccessTreeItem) GetActive() bool {
|
||||
if x != nil {
|
||||
return x.Active
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *AccessTreeItem) GetPermission() *Permission {
|
||||
if x != nil {
|
||||
return x.Permission
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *AccessTreeItem) GetChildren() []*AccessTreeItem {
|
||||
if x != nil {
|
||||
return x.Children
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type Permission struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Create bool `protobuf:"varint,1,opt,name=create,proto3" json:"create,omitempty"`
|
||||
Read bool `protobuf:"varint,2,opt,name=read,proto3" json:"read,omitempty"`
|
||||
Update bool `protobuf:"varint,3,opt,name=update,proto3" json:"update,omitempty"`
|
||||
Delete bool `protobuf:"varint,4,opt,name=delete,proto3" json:"delete,omitempty"`
|
||||
Disable bool `protobuf:"varint,5,opt,name=disable,proto3" json:"disable,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *Permission) Reset() {
|
||||
*x = Permission{}
|
||||
mi := &file_internal_infrastructure_transport_grpc_proto_permission_v1_permission_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *Permission) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Permission) ProtoMessage() {}
|
||||
|
||||
func (x *Permission) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_internal_infrastructure_transport_grpc_proto_permission_v1_permission_proto_msgTypes[4]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Permission.ProtoReflect.Descriptor instead.
|
||||
func (*Permission) Descriptor() ([]byte, []int) {
|
||||
return file_internal_infrastructure_transport_grpc_proto_permission_v1_permission_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *Permission) GetCreate() bool {
|
||||
if x != nil {
|
||||
return x.Create
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *Permission) GetRead() bool {
|
||||
if x != nil {
|
||||
return x.Read
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *Permission) GetUpdate() bool {
|
||||
if x != nil {
|
||||
return x.Update
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *Permission) GetDelete() bool {
|
||||
if x != nil {
|
||||
return x.Delete
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *Permission) GetDisable() bool {
|
||||
if x != nil {
|
||||
return x.Disable
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
var File_internal_infrastructure_transport_grpc_proto_permission_v1_permission_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_internal_infrastructure_transport_grpc_proto_permission_v1_permission_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"Kinternal/infrastructure/transport/grpc/proto/permission/v1/permission.proto\x12\rpermission.v1\x1a\x1egoogle/protobuf/wrappers.proto\"\xa7\x01\n" +
|
||||
"\x1cGetRolePermissionTreeRequest\x12#\n" +
|
||||
"\rrole_keycloak\x18\x01 \x01(\tR\froleKeycloak\x12%\n" +
|
||||
"\x0egroup_keycloak\x18\x02 \x03(\tR\rgroupKeycloak\x12;\n" +
|
||||
"\vactive_only\x18\x03 \x01(\v2\x1a.google.protobuf.BoolValueR\n" +
|
||||
"activeOnly\"m\n" +
|
||||
"\x1aRolePermissionTreeResponse\x12\x18\n" +
|
||||
"\asuccess\x18\x01 \x01(\bR\asuccess\x125\n" +
|
||||
"\x04data\x18\x02 \x01(\v2!.permission.v1.RolePermissionDataR\x04data\"u\n" +
|
||||
"\x12RolePermissionData\x12\x12\n" +
|
||||
"\x04role\x18\x01 \x01(\tR\x04role\x12\x14\n" +
|
||||
"\x05group\x18\x02 \x03(\tR\x05group\x125\n" +
|
||||
"\x06access\x18\x03 \x03(\v2\x1d.permission.v1.AccessTreeItemR\x06access\"\xa6\x02\n" +
|
||||
"\x0eAccessTreeItem\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\x03R\x02id\x12\x12\n" +
|
||||
"\x04name\x18\x02 \x01(\tR\x04name\x12\x12\n" +
|
||||
"\x04icon\x18\x03 \x01(\tR\x04icon\x12\x10\n" +
|
||||
"\x03url\x18\x04 \x01(\tR\x03url\x12\x14\n" +
|
||||
"\x05level\x18\x05 \x01(\x05R\x05level\x12\x12\n" +
|
||||
"\x04sort\x18\x06 \x01(\x05R\x04sort\x12\x16\n" +
|
||||
"\x06active\x18\a \x01(\bR\x06active\x12>\n" +
|
||||
"\n" +
|
||||
"permission\x18\b \x01(\v2\x19.permission.v1.PermissionH\x00R\n" +
|
||||
"permission\x88\x01\x01\x129\n" +
|
||||
"\bchildren\x18\t \x03(\v2\x1d.permission.v1.AccessTreeItemR\bchildrenB\r\n" +
|
||||
"\v_permission\"\x82\x01\n" +
|
||||
"\n" +
|
||||
"Permission\x12\x16\n" +
|
||||
"\x06create\x18\x01 \x01(\bR\x06create\x12\x12\n" +
|
||||
"\x04read\x18\x02 \x01(\bR\x04read\x12\x16\n" +
|
||||
"\x06update\x18\x03 \x01(\bR\x06update\x12\x16\n" +
|
||||
"\x06delete\x18\x04 \x01(\bR\x06delete\x12\x18\n" +
|
||||
"\adisable\x18\x05 \x01(\bR\adisable2\x87\x01\n" +
|
||||
"\x14RolPermissionService\x12o\n" +
|
||||
"\x15GetRolePermissionTree\x12+.permission.v1.GetRolePermissionTreeRequest\x1a).permission.v1.RolePermissionTreeResponseBGZEinternal/infrastructure/transport/grpc/gen/permission/v1;permissionV1b\x06proto3"
|
||||
|
||||
var (
|
||||
file_internal_infrastructure_transport_grpc_proto_permission_v1_permission_proto_rawDescOnce sync.Once
|
||||
file_internal_infrastructure_transport_grpc_proto_permission_v1_permission_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_internal_infrastructure_transport_grpc_proto_permission_v1_permission_proto_rawDescGZIP() []byte {
|
||||
file_internal_infrastructure_transport_grpc_proto_permission_v1_permission_proto_rawDescOnce.Do(func() {
|
||||
file_internal_infrastructure_transport_grpc_proto_permission_v1_permission_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_internal_infrastructure_transport_grpc_proto_permission_v1_permission_proto_rawDesc), len(file_internal_infrastructure_transport_grpc_proto_permission_v1_permission_proto_rawDesc)))
|
||||
})
|
||||
return file_internal_infrastructure_transport_grpc_proto_permission_v1_permission_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_internal_infrastructure_transport_grpc_proto_permission_v1_permission_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
|
||||
var file_internal_infrastructure_transport_grpc_proto_permission_v1_permission_proto_goTypes = []any{
|
||||
(*GetRolePermissionTreeRequest)(nil), // 0: permission.v1.GetRolePermissionTreeRequest
|
||||
(*RolePermissionTreeResponse)(nil), // 1: permission.v1.RolePermissionTreeResponse
|
||||
(*RolePermissionData)(nil), // 2: permission.v1.RolePermissionData
|
||||
(*AccessTreeItem)(nil), // 3: permission.v1.AccessTreeItem
|
||||
(*Permission)(nil), // 4: permission.v1.Permission
|
||||
(*wrappers.BoolValue)(nil), // 5: google.protobuf.BoolValue
|
||||
}
|
||||
var file_internal_infrastructure_transport_grpc_proto_permission_v1_permission_proto_depIdxs = []int32{
|
||||
5, // 0: permission.v1.GetRolePermissionTreeRequest.active_only:type_name -> google.protobuf.BoolValue
|
||||
2, // 1: permission.v1.RolePermissionTreeResponse.data:type_name -> permission.v1.RolePermissionData
|
||||
3, // 2: permission.v1.RolePermissionData.access:type_name -> permission.v1.AccessTreeItem
|
||||
4, // 3: permission.v1.AccessTreeItem.permission:type_name -> permission.v1.Permission
|
||||
3, // 4: permission.v1.AccessTreeItem.children:type_name -> permission.v1.AccessTreeItem
|
||||
0, // 5: permission.v1.RolPermissionService.GetRolePermissionTree:input_type -> permission.v1.GetRolePermissionTreeRequest
|
||||
1, // 6: permission.v1.RolPermissionService.GetRolePermissionTree:output_type -> permission.v1.RolePermissionTreeResponse
|
||||
6, // [6:7] is the sub-list for method output_type
|
||||
5, // [5:6] is the sub-list for method input_type
|
||||
5, // [5:5] is the sub-list for extension type_name
|
||||
5, // [5:5] is the sub-list for extension extendee
|
||||
0, // [0:5] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_internal_infrastructure_transport_grpc_proto_permission_v1_permission_proto_init() }
|
||||
func file_internal_infrastructure_transport_grpc_proto_permission_v1_permission_proto_init() {
|
||||
if File_internal_infrastructure_transport_grpc_proto_permission_v1_permission_proto != nil {
|
||||
return
|
||||
}
|
||||
file_internal_infrastructure_transport_grpc_proto_permission_v1_permission_proto_msgTypes[3].OneofWrappers = []any{}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_internal_infrastructure_transport_grpc_proto_permission_v1_permission_proto_rawDesc), len(file_internal_infrastructure_transport_grpc_proto_permission_v1_permission_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 5,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_internal_infrastructure_transport_grpc_proto_permission_v1_permission_proto_goTypes,
|
||||
DependencyIndexes: file_internal_infrastructure_transport_grpc_proto_permission_v1_permission_proto_depIdxs,
|
||||
MessageInfos: file_internal_infrastructure_transport_grpc_proto_permission_v1_permission_proto_msgTypes,
|
||||
}.Build()
|
||||
File_internal_infrastructure_transport_grpc_proto_permission_v1_permission_proto = out.File
|
||||
file_internal_infrastructure_transport_grpc_proto_permission_v1_permission_proto_goTypes = nil
|
||||
file_internal_infrastructure_transport_grpc_proto_permission_v1_permission_proto_depIdxs = nil
|
||||
}
|
||||
@@ -0,0 +1,128 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.6.0
|
||||
// - protoc v3.12.4
|
||||
// source: internal/infrastructure/transport/grpc/proto/permission/v1/permission.proto
|
||||
|
||||
package permissionV1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
RolPermissionService_GetRolePermissionTree_FullMethodName = "/permission.v1.RolPermissionService/GetRolePermissionTree"
|
||||
)
|
||||
|
||||
// RolPermissionServiceClient is the client API for RolPermissionService 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.
|
||||
//
|
||||
// Definisi service.
|
||||
type RolPermissionServiceClient interface {
|
||||
// Mengambil permission tree untuk role dan/atau group tertentu.
|
||||
GetRolePermissionTree(ctx context.Context, in *GetRolePermissionTreeRequest, opts ...grpc.CallOption) (*RolePermissionTreeResponse, error)
|
||||
}
|
||||
|
||||
type rolPermissionServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewRolPermissionServiceClient(cc grpc.ClientConnInterface) RolPermissionServiceClient {
|
||||
return &rolPermissionServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *rolPermissionServiceClient) GetRolePermissionTree(ctx context.Context, in *GetRolePermissionTreeRequest, opts ...grpc.CallOption) (*RolePermissionTreeResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(RolePermissionTreeResponse)
|
||||
err := c.cc.Invoke(ctx, RolPermissionService_GetRolePermissionTree_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// RolPermissionServiceServer is the server API for RolPermissionService service.
|
||||
// All implementations must embed UnimplementedRolPermissionServiceServer
|
||||
// for forward compatibility.
|
||||
//
|
||||
// Definisi service.
|
||||
type RolPermissionServiceServer interface {
|
||||
// Mengambil permission tree untuk role dan/atau group tertentu.
|
||||
GetRolePermissionTree(context.Context, *GetRolePermissionTreeRequest) (*RolePermissionTreeResponse, error)
|
||||
mustEmbedUnimplementedRolPermissionServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedRolPermissionServiceServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedRolPermissionServiceServer struct{}
|
||||
|
||||
func (UnimplementedRolPermissionServiceServer) GetRolePermissionTree(context.Context, *GetRolePermissionTreeRequest) (*RolePermissionTreeResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method GetRolePermissionTree not implemented")
|
||||
}
|
||||
func (UnimplementedRolPermissionServiceServer) mustEmbedUnimplementedRolPermissionServiceServer() {}
|
||||
func (UnimplementedRolPermissionServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeRolPermissionServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to RolPermissionServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeRolPermissionServiceServer interface {
|
||||
mustEmbedUnimplementedRolPermissionServiceServer()
|
||||
}
|
||||
|
||||
func RegisterRolPermissionServiceServer(s grpc.ServiceRegistrar, srv RolPermissionServiceServer) {
|
||||
// If the following call panics, it indicates UnimplementedRolPermissionServiceServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&RolPermissionService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _RolPermissionService_GetRolePermissionTree_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetRolePermissionTreeRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RolPermissionServiceServer).GetRolePermissionTree(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: RolPermissionService_GetRolePermissionTree_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RolPermissionServiceServer).GetRolePermissionTree(ctx, req.(*GetRolePermissionTreeRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// RolPermissionService_ServiceDesc is the grpc.ServiceDesc for RolPermissionService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var RolPermissionService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "permission.v1.RolPermissionService",
|
||||
HandlerType: (*RolPermissionServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "GetRolePermissionTree",
|
||||
Handler: _RolPermissionService_GetRolePermissionTree_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "internal/infrastructure/transport/grpc/proto/permission/v1/permission.proto",
|
||||
}
|
||||
Reference in New Issue
Block a user