entpb

package
v0.0.0-...-04b2c92 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Code generated by protoc-gen-entgrpc. DO NOT EDIT.

Index

Constants

View Source
const (
	UserService_Get_FullMethodName = "/entpb.UserService/Get"
)

Variables

View Source
var (
	User_UserType_name = map[int32]string{
		0: "USER_TYPE_UNSPECIFIED",
		1: "USER_TYPE_ACCOUNT",
		2: "USER_TYPE_MEMBER",
	}
	User_UserType_value = map[string]int32{
		"USER_TYPE_UNSPECIFIED": 0,
		"USER_TYPE_ACCOUNT":     1,
		"USER_TYPE_MEMBER":      2,
	}
)

Enum value maps for User_UserType.

View Source
var (
	User_CreationType_name = map[int32]string{
		0: "CREATION_TYPE_UNSPECIFIED",
		1: "CREATION_TYPE_INVITATION",
		2: "CREATION_TYPE_REGISTER",
		3: "CREATION_TYPE_MANUAL",
	}
	User_CreationType_value = map[string]int32{
		"CREATION_TYPE_UNSPECIFIED": 0,
		"CREATION_TYPE_INVITATION":  1,
		"CREATION_TYPE_REGISTER":    2,
		"CREATION_TYPE_MANUAL":      3,
	}
)

Enum value maps for User_CreationType.

View Source
var (
	GetUserRequest_View_name = map[int32]string{
		0: "VIEW_UNSPECIFIED",
		1: "BASIC",
		2: "WITH_EDGE_IDS",
	}
	GetUserRequest_View_value = map[string]int32{
		"VIEW_UNSPECIFIED": 0,
		"BASIC":            1,
		"WITH_EDGE_IDS":    2,
	}
)

Enum value maps for GetUserRequest_View.

View Source
var File_entpb_entpb_proto protoreflect.FileDescriptor
View Source
var UserService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "entpb.UserService",
	HandlerType: (*UserServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Get",
			Handler:    _UserService_Get_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "entpb/entpb.proto",
}

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

Functions

func RegisterUserServiceServer

func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)

Types

type GetUserRequest

type GetUserRequest struct {
	Id   int64               `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	View GetUserRequest_View `protobuf:"varint,2,opt,name=view,proto3,enum=entpb.GetUserRequest_View" json:"view,omitempty"`
	// contains filtered or unexported fields
}

func (*GetUserRequest) Descriptor deprecated

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

Deprecated: Use GetUserRequest.ProtoReflect.Descriptor instead.

func (*GetUserRequest) GetId

func (x *GetUserRequest) GetId() int64

func (*GetUserRequest) GetView

func (x *GetUserRequest) GetView() GetUserRequest_View

func (*GetUserRequest) ProtoMessage

func (*GetUserRequest) ProtoMessage()

func (*GetUserRequest) ProtoReflect

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

func (*GetUserRequest) Reset

func (x *GetUserRequest) Reset()

func (*GetUserRequest) String

func (x *GetUserRequest) String() string

type GetUserRequest_View

type GetUserRequest_View int32
const (
	GetUserRequest_VIEW_UNSPECIFIED GetUserRequest_View = 0
	GetUserRequest_BASIC            GetUserRequest_View = 1
	GetUserRequest_WITH_EDGE_IDS    GetUserRequest_View = 2
)

func (GetUserRequest_View) Descriptor

func (GetUserRequest_View) Enum

func (GetUserRequest_View) EnumDescriptor deprecated

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

Deprecated: Use GetUserRequest_View.Descriptor instead.

func (GetUserRequest_View) Number

func (GetUserRequest_View) String

func (x GetUserRequest_View) String() string

func (GetUserRequest_View) Type

type UnimplementedUserServiceServer

type UnimplementedUserServiceServer struct {
}

UnimplementedUserServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedUserServiceServer) Get

type UnsafeUserServiceServer

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

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

type User

type User struct {
	Id            int64                   `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	CreatedBy     int64                   `protobuf:"varint,2,opt,name=created_by,json=createdBy,proto3" json:"created_by,omitempty"`
	CreatedAt     *timestamppb.Timestamp  `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	UpdatedBy     *wrapperspb.Int64Value  `protobuf:"bytes,4,opt,name=updated_by,json=updatedBy,proto3" json:"updated_by,omitempty"`
	UpdatedAt     *timestamppb.Timestamp  `protobuf:"bytes,5,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	PrincipalName string                  `protobuf:"bytes,7,opt,name=principal_name,json=principalName,proto3" json:"principal_name,omitempty"`
	DisplayName   string                  `protobuf:"bytes,8,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
	Email         *wrapperspb.StringValue `protobuf:"bytes,9,opt,name=email,proto3" json:"email,omitempty"`
	Mobile        *wrapperspb.StringValue `protobuf:"bytes,10,opt,name=mobile,proto3" json:"mobile,omitempty"`
	UserType      User_UserType           `protobuf:"varint,11,opt,name=user_type,json=userType,proto3,enum=entpb.User_UserType" json:"user_type,omitempty"`
	CreationType  User_CreationType       `` /* 128-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*User) Descriptor deprecated

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetCreatedAt

func (x *User) GetCreatedAt() *timestamppb.Timestamp

func (*User) GetCreatedBy

func (x *User) GetCreatedBy() int64

func (*User) GetCreationType

func (x *User) GetCreationType() User_CreationType

func (*User) GetDisplayName

func (x *User) GetDisplayName() string

func (*User) GetEmail

func (x *User) GetEmail() *wrapperspb.StringValue

func (*User) GetId

func (x *User) GetId() int64

func (*User) GetMobile

func (x *User) GetMobile() *wrapperspb.StringValue

func (*User) GetPrincipalName

func (x *User) GetPrincipalName() string

func (*User) GetUpdatedAt

func (x *User) GetUpdatedAt() *timestamppb.Timestamp

func (*User) GetUpdatedBy

func (x *User) GetUpdatedBy() *wrapperspb.Int64Value

func (*User) GetUserType

func (x *User) GetUserType() User_UserType

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

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

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

type UserService

type UserService struct {
	UnimplementedUserServiceServer
	// contains filtered or unexported fields
}

UserService implements UserServiceServer

func NewUserService

func NewUserService(client *ent.Client) *UserService

NewUserService returns a new UserService

func (*UserService) Get

func (svc *UserService) Get(ctx context.Context, req *GetUserRequest) (*User, error)

Get implements UserServiceServer.Get

type UserServiceClient

type UserServiceClient interface {
	Get(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*User, error)
}

UserServiceClient is the client API for UserService 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 UserServiceServer

type UserServiceServer interface {
	Get(context.Context, *GetUserRequest) (*User, error)
	// contains filtered or unexported methods
}

UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer for forward compatibility

type User_CreationType

type User_CreationType int32
const (
	User_CREATION_TYPE_UNSPECIFIED User_CreationType = 0
	User_CREATION_TYPE_INVITATION  User_CreationType = 1
	User_CREATION_TYPE_REGISTER    User_CreationType = 2
	User_CREATION_TYPE_MANUAL      User_CreationType = 3
)

func (User_CreationType) Descriptor

func (User_CreationType) Enum

func (User_CreationType) EnumDescriptor deprecated

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

Deprecated: Use User_CreationType.Descriptor instead.

func (User_CreationType) Number

func (User_CreationType) String

func (x User_CreationType) String() string

func (User_CreationType) Type

type User_UserType

type User_UserType int32
const (
	User_USER_TYPE_UNSPECIFIED User_UserType = 0
	User_USER_TYPE_ACCOUNT     User_UserType = 1
	User_USER_TYPE_MEMBER      User_UserType = 2
)

func (User_UserType) Descriptor

func (User_UserType) Enum

func (x User_UserType) Enum() *User_UserType

func (User_UserType) EnumDescriptor deprecated

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

Deprecated: Use User_UserType.Descriptor instead.

func (User_UserType) Number

func (User_UserType) String

func (x User_UserType) String() string

func (User_UserType) Type

Jump to

Keyboard shortcuts

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