Passport/pkg/proto/realms_grpc.pb.go
2024-06-16 23:17:32 +08:00

296 lines
11 KiB
Go

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc v5.26.1
// source: realms.proto
package proto
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
// 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
const (
Realms_ListCommunityRealm_FullMethodName = "/proto.Realms/ListCommunityRealm"
Realms_ListAvailableRealm_FullMethodName = "/proto.Realms/ListAvailableRealm"
Realms_ListOwnedRealm_FullMethodName = "/proto.Realms/ListOwnedRealm"
Realms_GetRealm_FullMethodName = "/proto.Realms/GetRealm"
Realms_ListRealmMember_FullMethodName = "/proto.Realms/ListRealmMember"
Realms_GetRealmMember_FullMethodName = "/proto.Realms/GetRealmMember"
)
// RealmsClient is the client API for Realms 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 RealmsClient interface {
ListCommunityRealm(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListRealmResponse, error)
ListAvailableRealm(ctx context.Context, in *RealmLookupWithUserRequest, opts ...grpc.CallOption) (*ListRealmResponse, error)
ListOwnedRealm(ctx context.Context, in *RealmLookupWithUserRequest, opts ...grpc.CallOption) (*ListRealmResponse, error)
GetRealm(ctx context.Context, in *RealmLookupRequest, opts ...grpc.CallOption) (*RealmResponse, error)
ListRealmMember(ctx context.Context, in *RealmMemberLookupRequest, opts ...grpc.CallOption) (*ListRealmMemberResponse, error)
GetRealmMember(ctx context.Context, in *RealmMemberLookupRequest, opts ...grpc.CallOption) (*RealmMemberResponse, error)
}
type realmsClient struct {
cc grpc.ClientConnInterface
}
func NewRealmsClient(cc grpc.ClientConnInterface) RealmsClient {
return &realmsClient{cc}
}
func (c *realmsClient) ListCommunityRealm(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListRealmResponse, error) {
out := new(ListRealmResponse)
err := c.cc.Invoke(ctx, Realms_ListCommunityRealm_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *realmsClient) ListAvailableRealm(ctx context.Context, in *RealmLookupWithUserRequest, opts ...grpc.CallOption) (*ListRealmResponse, error) {
out := new(ListRealmResponse)
err := c.cc.Invoke(ctx, Realms_ListAvailableRealm_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *realmsClient) ListOwnedRealm(ctx context.Context, in *RealmLookupWithUserRequest, opts ...grpc.CallOption) (*ListRealmResponse, error) {
out := new(ListRealmResponse)
err := c.cc.Invoke(ctx, Realms_ListOwnedRealm_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *realmsClient) GetRealm(ctx context.Context, in *RealmLookupRequest, opts ...grpc.CallOption) (*RealmResponse, error) {
out := new(RealmResponse)
err := c.cc.Invoke(ctx, Realms_GetRealm_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *realmsClient) ListRealmMember(ctx context.Context, in *RealmMemberLookupRequest, opts ...grpc.CallOption) (*ListRealmMemberResponse, error) {
out := new(ListRealmMemberResponse)
err := c.cc.Invoke(ctx, Realms_ListRealmMember_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *realmsClient) GetRealmMember(ctx context.Context, in *RealmMemberLookupRequest, opts ...grpc.CallOption) (*RealmMemberResponse, error) {
out := new(RealmMemberResponse)
err := c.cc.Invoke(ctx, Realms_GetRealmMember_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// RealmsServer is the server API for Realms service.
// All implementations must embed UnimplementedRealmsServer
// for forward compatibility
type RealmsServer interface {
ListCommunityRealm(context.Context, *emptypb.Empty) (*ListRealmResponse, error)
ListAvailableRealm(context.Context, *RealmLookupWithUserRequest) (*ListRealmResponse, error)
ListOwnedRealm(context.Context, *RealmLookupWithUserRequest) (*ListRealmResponse, error)
GetRealm(context.Context, *RealmLookupRequest) (*RealmResponse, error)
ListRealmMember(context.Context, *RealmMemberLookupRequest) (*ListRealmMemberResponse, error)
GetRealmMember(context.Context, *RealmMemberLookupRequest) (*RealmMemberResponse, error)
mustEmbedUnimplementedRealmsServer()
}
// UnimplementedRealmsServer must be embedded to have forward compatible implementations.
type UnimplementedRealmsServer struct {
}
func (UnimplementedRealmsServer) ListCommunityRealm(context.Context, *emptypb.Empty) (*ListRealmResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListCommunityRealm not implemented")
}
func (UnimplementedRealmsServer) ListAvailableRealm(context.Context, *RealmLookupWithUserRequest) (*ListRealmResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListAvailableRealm not implemented")
}
func (UnimplementedRealmsServer) ListOwnedRealm(context.Context, *RealmLookupWithUserRequest) (*ListRealmResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListOwnedRealm not implemented")
}
func (UnimplementedRealmsServer) GetRealm(context.Context, *RealmLookupRequest) (*RealmResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetRealm not implemented")
}
func (UnimplementedRealmsServer) ListRealmMember(context.Context, *RealmMemberLookupRequest) (*ListRealmMemberResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListRealmMember not implemented")
}
func (UnimplementedRealmsServer) GetRealmMember(context.Context, *RealmMemberLookupRequest) (*RealmMemberResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetRealmMember not implemented")
}
func (UnimplementedRealmsServer) mustEmbedUnimplementedRealmsServer() {}
// UnsafeRealmsServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to RealmsServer will
// result in compilation errors.
type UnsafeRealmsServer interface {
mustEmbedUnimplementedRealmsServer()
}
func RegisterRealmsServer(s grpc.ServiceRegistrar, srv RealmsServer) {
s.RegisterService(&Realms_ServiceDesc, srv)
}
func _Realms_ListCommunityRealm_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(emptypb.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RealmsServer).ListCommunityRealm(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Realms_ListCommunityRealm_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RealmsServer).ListCommunityRealm(ctx, req.(*emptypb.Empty))
}
return interceptor(ctx, in, info, handler)
}
func _Realms_ListAvailableRealm_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RealmLookupWithUserRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RealmsServer).ListAvailableRealm(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Realms_ListAvailableRealm_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RealmsServer).ListAvailableRealm(ctx, req.(*RealmLookupWithUserRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Realms_ListOwnedRealm_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RealmLookupWithUserRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RealmsServer).ListOwnedRealm(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Realms_ListOwnedRealm_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RealmsServer).ListOwnedRealm(ctx, req.(*RealmLookupWithUserRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Realms_GetRealm_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RealmLookupRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RealmsServer).GetRealm(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Realms_GetRealm_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RealmsServer).GetRealm(ctx, req.(*RealmLookupRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Realms_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.(RealmsServer).ListRealmMember(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Realms_ListRealmMember_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RealmsServer).ListRealmMember(ctx, req.(*RealmMemberLookupRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Realms_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.(RealmsServer).GetRealmMember(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Realms_GetRealmMember_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RealmsServer).GetRealmMember(ctx, req.(*RealmMemberLookupRequest))
}
return interceptor(ctx, in, info, handler)
}
// Realms_ServiceDesc is the grpc.ServiceDesc for Realms service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Realms_ServiceDesc = grpc.ServiceDesc{
ServiceName: "proto.Realms",
HandlerType: (*RealmsServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ListCommunityRealm",
Handler: _Realms_ListCommunityRealm_Handler,
},
{
MethodName: "ListAvailableRealm",
Handler: _Realms_ListAvailableRealm_Handler,
},
{
MethodName: "ListOwnedRealm",
Handler: _Realms_ListOwnedRealm_Handler,
},
{
MethodName: "GetRealm",
Handler: _Realms_GetRealm_Handler,
},
{
MethodName: "ListRealmMember",
Handler: _Realms_ListRealmMember_Handler,
},
{
MethodName: "GetRealmMember",
Handler: _Realms_GetRealmMember_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "realms.proto",
}