322 lines
12 KiB
Go
322 lines
12 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.2.0
|
|
// - protoc v5.27.1
|
|
// source: realm.proto
|
|
|
|
package proto
|
|
|
|
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.32.0 or later.
|
|
const _ = grpc.SupportPackageIsVersion7
|
|
|
|
// RealmClient is the client API for Realm 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.
|
|
type RealmClient interface {
|
|
ListCommunityRealm(ctx context.Context, in *ListRealmRequest, opts ...grpc.CallOption) (*ListRealmResponse, error)
|
|
ListAvailableRealm(ctx context.Context, in *LookupUserRealmRequest, opts ...grpc.CallOption) (*ListRealmResponse, error)
|
|
ListOwnedRealm(ctx context.Context, in *LookupUserRealmRequest, opts ...grpc.CallOption) (*ListRealmResponse, error)
|
|
GetRealm(ctx context.Context, in *LookupRealmRequest, opts ...grpc.CallOption) (*RealmInfo, error)
|
|
ListRealmMember(ctx context.Context, in *RealmMemberLookupRequest, opts ...grpc.CallOption) (*ListRealmMemberResponse, error)
|
|
GetRealmMember(ctx context.Context, in *RealmMemberLookupRequest, opts ...grpc.CallOption) (*RealmMemberInfo, error)
|
|
CheckRealmMemberPerm(ctx context.Context, in *CheckRealmPermRequest, opts ...grpc.CallOption) (*CheckRealmPermResponse, error)
|
|
}
|
|
|
|
type realmClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewRealmClient(cc grpc.ClientConnInterface) RealmClient {
|
|
return &realmClient{cc}
|
|
}
|
|
|
|
func (c *realmClient) ListCommunityRealm(ctx context.Context, in *ListRealmRequest, opts ...grpc.CallOption) (*ListRealmResponse, error) {
|
|
out := new(ListRealmResponse)
|
|
err := c.cc.Invoke(ctx, "/proto.Realm/ListCommunityRealm", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *realmClient) ListAvailableRealm(ctx context.Context, in *LookupUserRealmRequest, opts ...grpc.CallOption) (*ListRealmResponse, error) {
|
|
out := new(ListRealmResponse)
|
|
err := c.cc.Invoke(ctx, "/proto.Realm/ListAvailableRealm", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *realmClient) ListOwnedRealm(ctx context.Context, in *LookupUserRealmRequest, opts ...grpc.CallOption) (*ListRealmResponse, error) {
|
|
out := new(ListRealmResponse)
|
|
err := c.cc.Invoke(ctx, "/proto.Realm/ListOwnedRealm", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *realmClient) GetRealm(ctx context.Context, in *LookupRealmRequest, opts ...grpc.CallOption) (*RealmInfo, error) {
|
|
out := new(RealmInfo)
|
|
err := c.cc.Invoke(ctx, "/proto.Realm/GetRealm", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *realmClient) ListRealmMember(ctx context.Context, in *RealmMemberLookupRequest, opts ...grpc.CallOption) (*ListRealmMemberResponse, error) {
|
|
out := new(ListRealmMemberResponse)
|
|
err := c.cc.Invoke(ctx, "/proto.Realm/ListRealmMember", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *realmClient) GetRealmMember(ctx context.Context, in *RealmMemberLookupRequest, opts ...grpc.CallOption) (*RealmMemberInfo, error) {
|
|
out := new(RealmMemberInfo)
|
|
err := c.cc.Invoke(ctx, "/proto.Realm/GetRealmMember", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *realmClient) CheckRealmMemberPerm(ctx context.Context, in *CheckRealmPermRequest, opts ...grpc.CallOption) (*CheckRealmPermResponse, error) {
|
|
out := new(CheckRealmPermResponse)
|
|
err := c.cc.Invoke(ctx, "/proto.Realm/CheckRealmMemberPerm", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// RealmServer is the server API for Realm service.
|
|
// All implementations must embed UnimplementedRealmServer
|
|
// for forward compatibility
|
|
type RealmServer interface {
|
|
ListCommunityRealm(context.Context, *ListRealmRequest) (*ListRealmResponse, error)
|
|
ListAvailableRealm(context.Context, *LookupUserRealmRequest) (*ListRealmResponse, error)
|
|
ListOwnedRealm(context.Context, *LookupUserRealmRequest) (*ListRealmResponse, error)
|
|
GetRealm(context.Context, *LookupRealmRequest) (*RealmInfo, error)
|
|
ListRealmMember(context.Context, *RealmMemberLookupRequest) (*ListRealmMemberResponse, error)
|
|
GetRealmMember(context.Context, *RealmMemberLookupRequest) (*RealmMemberInfo, error)
|
|
CheckRealmMemberPerm(context.Context, *CheckRealmPermRequest) (*CheckRealmPermResponse, error)
|
|
mustEmbedUnimplementedRealmServer()
|
|
}
|
|
|
|
// UnimplementedRealmServer must be embedded to have forward compatible implementations.
|
|
type UnimplementedRealmServer struct {
|
|
}
|
|
|
|
func (UnimplementedRealmServer) ListCommunityRealm(context.Context, *ListRealmRequest) (*ListRealmResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ListCommunityRealm not implemented")
|
|
}
|
|
func (UnimplementedRealmServer) ListAvailableRealm(context.Context, *LookupUserRealmRequest) (*ListRealmResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ListAvailableRealm not implemented")
|
|
}
|
|
func (UnimplementedRealmServer) ListOwnedRealm(context.Context, *LookupUserRealmRequest) (*ListRealmResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ListOwnedRealm not implemented")
|
|
}
|
|
func (UnimplementedRealmServer) GetRealm(context.Context, *LookupRealmRequest) (*RealmInfo, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetRealm not implemented")
|
|
}
|
|
func (UnimplementedRealmServer) ListRealmMember(context.Context, *RealmMemberLookupRequest) (*ListRealmMemberResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ListRealmMember not implemented")
|
|
}
|
|
func (UnimplementedRealmServer) GetRealmMember(context.Context, *RealmMemberLookupRequest) (*RealmMemberInfo, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetRealmMember not implemented")
|
|
}
|
|
func (UnimplementedRealmServer) CheckRealmMemberPerm(context.Context, *CheckRealmPermRequest) (*CheckRealmPermResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method CheckRealmMemberPerm not implemented")
|
|
}
|
|
func (UnimplementedRealmServer) mustEmbedUnimplementedRealmServer() {}
|
|
|
|
// UnsafeRealmServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to RealmServer will
|
|
// result in compilation errors.
|
|
type UnsafeRealmServer interface {
|
|
mustEmbedUnimplementedRealmServer()
|
|
}
|
|
|
|
func RegisterRealmServer(s grpc.ServiceRegistrar, srv RealmServer) {
|
|
s.RegisterService(&Realm_ServiceDesc, srv)
|
|
}
|
|
|
|
func _Realm_ListCommunityRealm_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ListRealmRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(RealmServer).ListCommunityRealm(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/proto.Realm/ListCommunityRealm",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(RealmServer).ListCommunityRealm(ctx, req.(*ListRealmRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Realm_ListAvailableRealm_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(LookupUserRealmRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(RealmServer).ListAvailableRealm(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/proto.Realm/ListAvailableRealm",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(RealmServer).ListAvailableRealm(ctx, req.(*LookupUserRealmRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Realm_ListOwnedRealm_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(LookupUserRealmRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(RealmServer).ListOwnedRealm(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/proto.Realm/ListOwnedRealm",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(RealmServer).ListOwnedRealm(ctx, req.(*LookupUserRealmRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Realm_GetRealm_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(LookupRealmRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(RealmServer).GetRealm(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/proto.Realm/GetRealm",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(RealmServer).GetRealm(ctx, req.(*LookupRealmRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Realm_ListRealmMember_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(RealmMemberLookupRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(RealmServer).ListRealmMember(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/proto.Realm/ListRealmMember",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(RealmServer).ListRealmMember(ctx, req.(*RealmMemberLookupRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Realm_GetRealmMember_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(RealmMemberLookupRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(RealmServer).GetRealmMember(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/proto.Realm/GetRealmMember",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(RealmServer).GetRealmMember(ctx, req.(*RealmMemberLookupRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Realm_CheckRealmMemberPerm_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CheckRealmPermRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(RealmServer).CheckRealmMemberPerm(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/proto.Realm/CheckRealmMemberPerm",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(RealmServer).CheckRealmMemberPerm(ctx, req.(*CheckRealmPermRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// Realm_ServiceDesc is the grpc.ServiceDesc for Realm service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var Realm_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "proto.Realm",
|
|
HandlerType: (*RealmServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "ListCommunityRealm",
|
|
Handler: _Realm_ListCommunityRealm_Handler,
|
|
},
|
|
{
|
|
MethodName: "ListAvailableRealm",
|
|
Handler: _Realm_ListAvailableRealm_Handler,
|
|
},
|
|
{
|
|
MethodName: "ListOwnedRealm",
|
|
Handler: _Realm_ListOwnedRealm_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetRealm",
|
|
Handler: _Realm_GetRealm_Handler,
|
|
},
|
|
{
|
|
MethodName: "ListRealmMember",
|
|
Handler: _Realm_ListRealmMember_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetRealmMember",
|
|
Handler: _Realm_GetRealmMember_Handler,
|
|
},
|
|
{
|
|
MethodName: "CheckRealmMemberPerm",
|
|
Handler: _Realm_CheckRealmMemberPerm_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "realm.proto",
|
|
}
|