2024-07-15 14:20:37 +00:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
2024-08-01 06:05:23 +00:00
// - protoc-gen-go-grpc v1.5.1
2024-07-15 14:20:37 +00:00
// - 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.
2024-08-01 06:05:23 +00:00
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc . SupportPackageIsVersion9
2024-07-30 10:31:26 +00:00
const (
Realm_ListCommunityRealm_FullMethodName = "/proto.Realm/ListCommunityRealm"
Realm_ListAvailableRealm_FullMethodName = "/proto.Realm/ListAvailableRealm"
Realm_ListOwnedRealm_FullMethodName = "/proto.Realm/ListOwnedRealm"
Realm_GetRealm_FullMethodName = "/proto.Realm/GetRealm"
Realm_ListRealmMember_FullMethodName = "/proto.Realm/ListRealmMember"
Realm_GetRealmMember_FullMethodName = "/proto.Realm/GetRealmMember"
Realm_CheckRealmMemberPerm_FullMethodName = "/proto.Realm/CheckRealmMemberPerm"
)
2024-07-15 14:20:37 +00:00
// 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 )
2024-07-16 02:45:24 +00:00
GetRealmMember ( ctx context . Context , in * RealmMemberLookupRequest , opts ... grpc . CallOption ) ( * RealmMemberInfo , error )
2024-07-15 14:20:37 +00:00
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 ) {
2024-07-30 10:31:26 +00:00
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
2024-07-15 14:20:37 +00:00
out := new ( ListRealmResponse )
2024-07-30 10:31:26 +00:00
err := c . cc . Invoke ( ctx , Realm_ListCommunityRealm_FullMethodName , in , out , cOpts ... )
2024-07-15 14:20:37 +00:00
if err != nil {
return nil , err
}
return out , nil
}
func ( c * realmClient ) ListAvailableRealm ( ctx context . Context , in * LookupUserRealmRequest , opts ... grpc . CallOption ) ( * ListRealmResponse , error ) {
2024-07-30 10:31:26 +00:00
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
2024-07-15 14:20:37 +00:00
out := new ( ListRealmResponse )
2024-07-30 10:31:26 +00:00
err := c . cc . Invoke ( ctx , Realm_ListAvailableRealm_FullMethodName , in , out , cOpts ... )
2024-07-15 14:20:37 +00:00
if err != nil {
return nil , err
}
return out , nil
}
func ( c * realmClient ) ListOwnedRealm ( ctx context . Context , in * LookupUserRealmRequest , opts ... grpc . CallOption ) ( * ListRealmResponse , error ) {
2024-07-30 10:31:26 +00:00
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
2024-07-15 14:20:37 +00:00
out := new ( ListRealmResponse )
2024-07-30 10:31:26 +00:00
err := c . cc . Invoke ( ctx , Realm_ListOwnedRealm_FullMethodName , in , out , cOpts ... )
2024-07-15 14:20:37 +00:00
if err != nil {
return nil , err
}
return out , nil
}
func ( c * realmClient ) GetRealm ( ctx context . Context , in * LookupRealmRequest , opts ... grpc . CallOption ) ( * RealmInfo , error ) {
2024-07-30 10:31:26 +00:00
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
2024-07-15 14:20:37 +00:00
out := new ( RealmInfo )
2024-07-30 10:31:26 +00:00
err := c . cc . Invoke ( ctx , Realm_GetRealm_FullMethodName , in , out , cOpts ... )
2024-07-15 14:20:37 +00:00
if err != nil {
return nil , err
}
return out , nil
}
func ( c * realmClient ) ListRealmMember ( ctx context . Context , in * RealmMemberLookupRequest , opts ... grpc . CallOption ) ( * ListRealmMemberResponse , error ) {
2024-07-30 10:31:26 +00:00
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
2024-07-15 14:20:37 +00:00
out := new ( ListRealmMemberResponse )
2024-07-30 10:31:26 +00:00
err := c . cc . Invoke ( ctx , Realm_ListRealmMember_FullMethodName , in , out , cOpts ... )
2024-07-15 14:20:37 +00:00
if err != nil {
return nil , err
}
return out , nil
}
2024-07-16 02:45:24 +00:00
func ( c * realmClient ) GetRealmMember ( ctx context . Context , in * RealmMemberLookupRequest , opts ... grpc . CallOption ) ( * RealmMemberInfo , error ) {
2024-07-30 10:31:26 +00:00
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
2024-07-16 02:45:24 +00:00
out := new ( RealmMemberInfo )
2024-07-30 10:31:26 +00:00
err := c . cc . Invoke ( ctx , Realm_GetRealmMember_FullMethodName , in , out , cOpts ... )
2024-07-15 14:20:37 +00:00
if err != nil {
return nil , err
}
return out , nil
}
func ( c * realmClient ) CheckRealmMemberPerm ( ctx context . Context , in * CheckRealmPermRequest , opts ... grpc . CallOption ) ( * CheckRealmPermResponse , error ) {
2024-07-30 10:31:26 +00:00
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
2024-07-15 14:20:37 +00:00
out := new ( CheckRealmPermResponse )
2024-07-30 10:31:26 +00:00
err := c . cc . Invoke ( ctx , Realm_CheckRealmMemberPerm_FullMethodName , in , out , cOpts ... )
2024-07-15 14:20:37 +00:00
if err != nil {
return nil , err
}
return out , nil
}
// RealmServer is the server API for Realm service.
// All implementations must embed UnimplementedRealmServer
2024-08-01 06:05:23 +00:00
// for forward compatibility.
2024-07-15 14:20:37 +00:00
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 )
2024-07-16 02:45:24 +00:00
GetRealmMember ( context . Context , * RealmMemberLookupRequest ) ( * RealmMemberInfo , error )
2024-07-15 14:20:37 +00:00
CheckRealmMemberPerm ( context . Context , * CheckRealmPermRequest ) ( * CheckRealmPermResponse , error )
mustEmbedUnimplementedRealmServer ( )
}
2024-08-01 06:05:23 +00:00
// UnimplementedRealmServer 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 UnimplementedRealmServer struct { }
2024-07-15 14:20:37 +00:00
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" )
}
2024-07-16 02:45:24 +00:00
func ( UnimplementedRealmServer ) GetRealmMember ( context . Context , * RealmMemberLookupRequest ) ( * RealmMemberInfo , error ) {
2024-07-15 14:20:37 +00:00
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 ( ) { }
2024-08-01 06:05:23 +00:00
func ( UnimplementedRealmServer ) testEmbeddedByValue ( ) { }
2024-07-15 14:20:37 +00:00
// 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 ) {
2024-08-01 06:05:23 +00:00
// If the following call pancis, it indicates UnimplementedRealmServer 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 ( )
}
2024-07-15 14:20:37 +00:00
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 ,
2024-07-30 10:31:26 +00:00
FullMethod : Realm_ListCommunityRealm_FullMethodName ,
2024-07-15 14:20:37 +00:00
}
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 ,
2024-07-30 10:31:26 +00:00
FullMethod : Realm_ListAvailableRealm_FullMethodName ,
2024-07-15 14:20:37 +00:00
}
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 ,
2024-07-30 10:31:26 +00:00
FullMethod : Realm_ListOwnedRealm_FullMethodName ,
2024-07-15 14:20:37 +00:00
}
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 ,
2024-07-30 10:31:26 +00:00
FullMethod : Realm_GetRealm_FullMethodName ,
2024-07-15 14:20:37 +00:00
}
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 ,
2024-07-30 10:31:26 +00:00
FullMethod : Realm_ListRealmMember_FullMethodName ,
2024-07-15 14:20:37 +00:00
}
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 ,
2024-07-30 10:31:26 +00:00
FullMethod : Realm_GetRealmMember_FullMethodName ,
2024-07-15 14:20:37 +00:00
}
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 ,
2024-07-30 10:31:26 +00:00
FullMethod : Realm_CheckRealmMemberPerm_FullMethodName ,
2024-07-15 14:20:37 +00:00
}
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" ,
}