entpb

package
v0.0.0-...-7472f5c Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

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 (
	ListUserRequest_View_name = map[int32]string{
		0: "VIEW_UNSPECIFIED",
		1: "BASIC",
		2: "WITH_EDGE_IDS",
	}
	ListUserRequest_View_value = map[string]int32{
		"VIEW_UNSPECIFIED": 0,
		"BASIC":            1,
		"WITH_EDGE_IDS":    2,
	}
)

Enum value maps for ListUserRequest_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: "Create",
			Handler:    _UserService_Create_Handler,
		},
		{
			MethodName: "Get",
			Handler:    _UserService_Get_Handler,
		},
		{
			MethodName: "Update",
			Handler:    _UserService_Update_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _UserService_Delete_Handler,
		},
		{
			MethodName: "List",
			Handler:    _UserService_List_Handler,
		},
		{
			MethodName: "BatchCreate",
			Handler:    _UserService_BatchCreate_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 BatchCreateUsersRequest

type BatchCreateUsersRequest struct {
	Requests []*CreateUserRequest `protobuf:"bytes,1,rep,name=requests,proto3" json:"requests,omitempty"`
	// contains filtered or unexported fields
}

func (*BatchCreateUsersRequest) Descriptor deprecated

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

Deprecated: Use BatchCreateUsersRequest.ProtoReflect.Descriptor instead.

func (*BatchCreateUsersRequest) GetRequests

func (x *BatchCreateUsersRequest) GetRequests() []*CreateUserRequest

func (*BatchCreateUsersRequest) ProtoMessage

func (*BatchCreateUsersRequest) ProtoMessage()

func (*BatchCreateUsersRequest) ProtoReflect

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

func (*BatchCreateUsersRequest) Reset

func (x *BatchCreateUsersRequest) Reset()

func (*BatchCreateUsersRequest) String

func (x *BatchCreateUsersRequest) String() string

type BatchCreateUsersResponse

type BatchCreateUsersResponse struct {
	Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
	// contains filtered or unexported fields
}

func (*BatchCreateUsersResponse) Descriptor deprecated

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

Deprecated: Use BatchCreateUsersResponse.ProtoReflect.Descriptor instead.

func (*BatchCreateUsersResponse) GetUsers

func (x *BatchCreateUsersResponse) GetUsers() []*User

func (*BatchCreateUsersResponse) ProtoMessage

func (*BatchCreateUsersResponse) ProtoMessage()

func (*BatchCreateUsersResponse) ProtoReflect

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

func (*BatchCreateUsersResponse) Reset

func (x *BatchCreateUsersResponse) Reset()

func (*BatchCreateUsersResponse) String

func (x *BatchCreateUsersResponse) String() string

type CreateUserRequest

type CreateUserRequest struct {
	User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateUserRequest) Descriptor deprecated

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

Deprecated: Use CreateUserRequest.ProtoReflect.Descriptor instead.

func (*CreateUserRequest) GetUser

func (x *CreateUserRequest) GetUser() *User

func (*CreateUserRequest) ProtoMessage

func (*CreateUserRequest) ProtoMessage()

func (*CreateUserRequest) ProtoReflect

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

func (*CreateUserRequest) Reset

func (x *CreateUserRequest) Reset()

func (*CreateUserRequest) String

func (x *CreateUserRequest) String() string

type DeleteUserRequest

type DeleteUserRequest struct {
	Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteUserRequest) Descriptor deprecated

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

Deprecated: Use DeleteUserRequest.ProtoReflect.Descriptor instead.

func (*DeleteUserRequest) GetId

func (x *DeleteUserRequest) GetId() int64

func (*DeleteUserRequest) ProtoMessage

func (*DeleteUserRequest) ProtoMessage()

func (*DeleteUserRequest) ProtoReflect

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

func (*DeleteUserRequest) Reset

func (x *DeleteUserRequest) Reset()

func (*DeleteUserRequest) String

func (x *DeleteUserRequest) String() string

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 ListUserRequest

type ListUserRequest struct {
	PageSize  int32                `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	PageToken string               `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
	View      ListUserRequest_View `protobuf:"varint,3,opt,name=view,proto3,enum=entpb.ListUserRequest_View" json:"view,omitempty"`
	// contains filtered or unexported fields
}

func (*ListUserRequest) Descriptor deprecated

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

Deprecated: Use ListUserRequest.ProtoReflect.Descriptor instead.

func (*ListUserRequest) GetPageSize

func (x *ListUserRequest) GetPageSize() int32

func (*ListUserRequest) GetPageToken

func (x *ListUserRequest) GetPageToken() string

func (*ListUserRequest) GetView

func (*ListUserRequest) ProtoMessage

func (*ListUserRequest) ProtoMessage()

func (*ListUserRequest) ProtoReflect

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

func (*ListUserRequest) Reset

func (x *ListUserRequest) Reset()

func (*ListUserRequest) String

func (x *ListUserRequest) String() string

type ListUserRequest_View

type ListUserRequest_View int32
const (
	ListUserRequest_VIEW_UNSPECIFIED ListUserRequest_View = 0
	ListUserRequest_BASIC            ListUserRequest_View = 1
	ListUserRequest_WITH_EDGE_IDS    ListUserRequest_View = 2
)

func (ListUserRequest_View) Descriptor

func (ListUserRequest_View) Enum

func (ListUserRequest_View) EnumDescriptor deprecated

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

Deprecated: Use ListUserRequest_View.Descriptor instead.

func (ListUserRequest_View) Number

func (ListUserRequest_View) String

func (x ListUserRequest_View) String() string

func (ListUserRequest_View) Type

type ListUserResponse

type ListUserResponse struct {
	UserList      []*User `protobuf:"bytes,1,rep,name=user_list,json=userList,proto3" json:"user_list,omitempty"`
	NextPageToken string  `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
	// contains filtered or unexported fields
}

func (*ListUserResponse) Descriptor deprecated

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

Deprecated: Use ListUserResponse.ProtoReflect.Descriptor instead.

func (*ListUserResponse) GetNextPageToken

func (x *ListUserResponse) GetNextPageToken() string

func (*ListUserResponse) GetUserList

func (x *ListUserResponse) GetUserList() []*User

func (*ListUserResponse) ProtoMessage

func (*ListUserResponse) ProtoMessage()

func (*ListUserResponse) ProtoReflect

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

func (*ListUserResponse) Reset

func (x *ListUserResponse) Reset()

func (*ListUserResponse) String

func (x *ListUserResponse) String() string

type UnimplementedUserServiceServer

type UnimplementedUserServiceServer struct {
}

UnimplementedUserServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedUserServiceServer) BatchCreate

func (UnimplementedUserServiceServer) Create

func (UnimplementedUserServiceServer) Delete

func (UnimplementedUserServiceServer) Get

func (UnimplementedUserServiceServer) List

func (UnimplementedUserServiceServer) Update

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 UpdateUserRequest

type UpdateUserRequest struct {
	User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateUserRequest) Descriptor deprecated

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

Deprecated: Use UpdateUserRequest.ProtoReflect.Descriptor instead.

func (*UpdateUserRequest) GetUser

func (x *UpdateUserRequest) GetUser() *User

func (*UpdateUserRequest) ProtoMessage

func (*UpdateUserRequest) ProtoMessage()

func (*UpdateUserRequest) ProtoReflect

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

func (*UpdateUserRequest) Reset

func (x *UpdateUserRequest) Reset()

func (*UpdateUserRequest) String

func (x *UpdateUserRequest) String() string

type User

type User struct {
	Id   int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*User) Descriptor deprecated

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetId

func (x *User) GetId() int64

func (*User) GetName

func (x *User) GetName() string

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) BatchCreate

BatchCreate implements UserServiceServer.BatchCreate

func (*UserService) Create

func (svc *UserService) Create(ctx context.Context, req *CreateUserRequest) (*User, error)

Create implements UserServiceServer.Create

func (*UserService) Delete

func (svc *UserService) Delete(ctx context.Context, req *DeleteUserRequest) (*emptypb.Empty, error)

Delete implements UserServiceServer.Delete

func (*UserService) Get

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

Get implements UserServiceServer.Get

func (*UserService) List

List implements UserServiceServer.List

func (*UserService) Update

func (svc *UserService) Update(ctx context.Context, req *UpdateUserRequest) (*User, error)

Update implements UserServiceServer.Update

type UserServiceClient

type UserServiceClient interface {
	Create(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*User, error)
	Get(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*User, error)
	Update(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*User, error)
	Delete(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	List(ctx context.Context, in *ListUserRequest, opts ...grpc.CallOption) (*ListUserResponse, error)
	BatchCreate(ctx context.Context, in *BatchCreateUsersRequest, opts ...grpc.CallOption) (*BatchCreateUsersResponse, 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 {
	Create(context.Context, *CreateUserRequest) (*User, error)
	Get(context.Context, *GetUserRequest) (*User, error)
	Update(context.Context, *UpdateUserRequest) (*User, error)
	Delete(context.Context, *DeleteUserRequest) (*emptypb.Empty, error)
	List(context.Context, *ListUserRequest) (*ListUserResponse, error)
	BatchCreate(context.Context, *BatchCreateUsersRequest) (*BatchCreateUsersResponse, error)
	// contains filtered or unexported methods
}

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

Jump to

Keyboard shortcuts

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