entpb

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

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

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

Index

Constants

This section is empty.

Variables

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

Enum value maps for GetAttachmentRequest_View.

View Source
var (
	Todo_Status_name = map[int32]string{
		0: "PENDING",
		1: "IN_PROGRESS",
		2: "DONE",
	}
	Todo_Status_value = map[string]int32{
		"PENDING":     0,
		"IN_PROGRESS": 1,
		"DONE":        2,
	}
)

Enum value maps for Todo_Status.

View Source
var (
	User_Status_name = map[int32]string{
		0: "STATUS_UNSPECIFIED",
		1: "PENDING",
		2: "ACTIVE",
	}
	User_Status_value = map[string]int32{
		"STATUS_UNSPECIFIED": 0,
		"PENDING":            1,
		"ACTIVE":             2,
	}
)

Enum value maps for User_Status.

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 AttachmentService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "entpb.AttachmentService",
	HandlerType: (*AttachmentServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Create",
			Handler:    _AttachmentService_Create_Handler,
		},
		{
			MethodName: "Get",
			Handler:    _AttachmentService_Get_Handler,
		},
		{
			MethodName: "Update",
			Handler:    _AttachmentService_Update_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _AttachmentService_Delete_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "entpb/entpb.proto",
}

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

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,
		},
	},
	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 RegisterAttachmentServiceServer

func RegisterAttachmentServiceServer(s grpc.ServiceRegistrar, srv AttachmentServiceServer)

func RegisterUserServiceServer

func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)

Types

type Attachment

type Attachment struct {
	Id         []byte  `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	User       *User   `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"`
	Recipients []*User `protobuf:"bytes,3,rep,name=recipients,proto3" json:"recipients,omitempty"`
	// contains filtered or unexported fields
}

func (*Attachment) Descriptor deprecated

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

Deprecated: Use Attachment.ProtoReflect.Descriptor instead.

func (*Attachment) GetId

func (x *Attachment) GetId() []byte

func (*Attachment) GetRecipients

func (x *Attachment) GetRecipients() []*User

func (*Attachment) GetUser

func (x *Attachment) GetUser() *User

func (*Attachment) ProtoMessage

func (*Attachment) ProtoMessage()

func (*Attachment) ProtoReflect

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

func (*Attachment) Reset

func (x *Attachment) Reset()

func (*Attachment) String

func (x *Attachment) String() string

type AttachmentService

type AttachmentService struct {
	UnimplementedAttachmentServiceServer
	// contains filtered or unexported fields
}

AttachmentService implements AttachmentServiceServer

func NewAttachmentService

func NewAttachmentService(client *ent.Client) *AttachmentService

NewAttachmentService returns a new AttachmentService

func (*AttachmentService) Create

Create implements AttachmentServiceServer.Create

func (*AttachmentService) Delete

Delete implements AttachmentServiceServer.Delete

func (*AttachmentService) Get

Get implements AttachmentServiceServer.Get

func (*AttachmentService) Update

Update implements AttachmentServiceServer.Update

type AttachmentServiceClient

type AttachmentServiceClient interface {
	Create(ctx context.Context, in *CreateAttachmentRequest, opts ...grpc.CallOption) (*Attachment, error)
	Get(ctx context.Context, in *GetAttachmentRequest, opts ...grpc.CallOption) (*Attachment, error)
	Update(ctx context.Context, in *UpdateAttachmentRequest, opts ...grpc.CallOption) (*Attachment, error)
	Delete(ctx context.Context, in *DeleteAttachmentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

AttachmentServiceClient is the client API for AttachmentService 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 AttachmentServiceServer

type AttachmentServiceServer interface {
	Create(context.Context, *CreateAttachmentRequest) (*Attachment, error)
	Get(context.Context, *GetAttachmentRequest) (*Attachment, error)
	Update(context.Context, *UpdateAttachmentRequest) (*Attachment, error)
	Delete(context.Context, *DeleteAttachmentRequest) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

AttachmentServiceServer is the server API for AttachmentService service. All implementations must embed UnimplementedAttachmentServiceServer for forward compatibility

type CreateAttachmentRequest

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

func (*CreateAttachmentRequest) Descriptor deprecated

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

Deprecated: Use CreateAttachmentRequest.ProtoReflect.Descriptor instead.

func (*CreateAttachmentRequest) GetAttachment

func (x *CreateAttachmentRequest) GetAttachment() *Attachment

func (*CreateAttachmentRequest) ProtoMessage

func (*CreateAttachmentRequest) ProtoMessage()

func (*CreateAttachmentRequest) ProtoReflect

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

func (*CreateAttachmentRequest) Reset

func (x *CreateAttachmentRequest) Reset()

func (*CreateAttachmentRequest) String

func (x *CreateAttachmentRequest) 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 DeleteAttachmentRequest

type DeleteAttachmentRequest struct {
	Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteAttachmentRequest) Descriptor deprecated

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

Deprecated: Use DeleteAttachmentRequest.ProtoReflect.Descriptor instead.

func (*DeleteAttachmentRequest) GetId

func (x *DeleteAttachmentRequest) GetId() []byte

func (*DeleteAttachmentRequest) ProtoMessage

func (*DeleteAttachmentRequest) ProtoMessage()

func (*DeleteAttachmentRequest) ProtoReflect

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

func (*DeleteAttachmentRequest) Reset

func (x *DeleteAttachmentRequest) Reset()

func (*DeleteAttachmentRequest) String

func (x *DeleteAttachmentRequest) String() string

type DeleteUserRequest

type DeleteUserRequest struct {
	Id int32 `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() int32

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 GetAttachmentRequest

type GetAttachmentRequest struct {
	Id   []byte                    `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	View GetAttachmentRequest_View `protobuf:"varint,2,opt,name=view,proto3,enum=entpb.GetAttachmentRequest_View" json:"view,omitempty"`
	// contains filtered or unexported fields
}

func (*GetAttachmentRequest) Descriptor deprecated

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

Deprecated: Use GetAttachmentRequest.ProtoReflect.Descriptor instead.

func (*GetAttachmentRequest) GetId

func (x *GetAttachmentRequest) GetId() []byte

func (*GetAttachmentRequest) GetView

func (*GetAttachmentRequest) ProtoMessage

func (*GetAttachmentRequest) ProtoMessage()

func (*GetAttachmentRequest) ProtoReflect

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

func (*GetAttachmentRequest) Reset

func (x *GetAttachmentRequest) Reset()

func (*GetAttachmentRequest) String

func (x *GetAttachmentRequest) String() string

type GetAttachmentRequest_View

type GetAttachmentRequest_View int32
const (
	GetAttachmentRequest_VIEW_UNSPECIFIED GetAttachmentRequest_View = 0
	GetAttachmentRequest_BASIC            GetAttachmentRequest_View = 1
	GetAttachmentRequest_WITH_EDGE_IDS    GetAttachmentRequest_View = 2
)

func (GetAttachmentRequest_View) Descriptor

func (GetAttachmentRequest_View) Enum

func (GetAttachmentRequest_View) EnumDescriptor deprecated

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

Deprecated: Use GetAttachmentRequest_View.Descriptor instead.

func (GetAttachmentRequest_View) Number

func (GetAttachmentRequest_View) String

func (x GetAttachmentRequest_View) String() string

func (GetAttachmentRequest_View) Type

type GetUserRequest

type GetUserRequest struct {
	Id   int32               `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() int32

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 Group

type Group struct {
	Id    int32   `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Name  string  `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Users []*User `protobuf:"bytes,3,rep,name=users,proto3" json:"users,omitempty"`
	// contains filtered or unexported fields
}

func (*Group) Descriptor deprecated

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

Deprecated: Use Group.ProtoReflect.Descriptor instead.

func (*Group) GetId

func (x *Group) GetId() int32

func (*Group) GetName

func (x *Group) GetName() string

func (*Group) GetUsers

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

func (*Group) ProtoMessage

func (*Group) ProtoMessage()

func (*Group) ProtoReflect

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

func (*Group) Reset

func (x *Group) Reset()

func (*Group) String

func (x *Group) String() string

type Todo

type Todo struct {
	Id     int32       `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Task   string      `protobuf:"bytes,2,opt,name=task,proto3" json:"task,omitempty"`
	Status Todo_Status `protobuf:"varint,3,opt,name=status,proto3,enum=entpb.Todo_Status" json:"status,omitempty"`
	User   *User       `protobuf:"bytes,4,opt,name=user,proto3" json:"user,omitempty"`
	// contains filtered or unexported fields
}

func (*Todo) Descriptor deprecated

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

Deprecated: Use Todo.ProtoReflect.Descriptor instead.

func (*Todo) GetId

func (x *Todo) GetId() int32

func (*Todo) GetStatus

func (x *Todo) GetStatus() Todo_Status

func (*Todo) GetTask

func (x *Todo) GetTask() string

func (*Todo) GetUser

func (x *Todo) GetUser() *User

func (*Todo) ProtoMessage

func (*Todo) ProtoMessage()

func (*Todo) ProtoReflect

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

func (*Todo) Reset

func (x *Todo) Reset()

func (*Todo) String

func (x *Todo) String() string

type Todo_Status

type Todo_Status int32
const (
	Todo_PENDING     Todo_Status = 0
	Todo_IN_PROGRESS Todo_Status = 1
	Todo_DONE        Todo_Status = 2
)

func (Todo_Status) Descriptor

func (Todo_Status) Enum

func (x Todo_Status) Enum() *Todo_Status

func (Todo_Status) EnumDescriptor deprecated

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

Deprecated: Use Todo_Status.Descriptor instead.

func (Todo_Status) Number

func (x Todo_Status) Number() protoreflect.EnumNumber

func (Todo_Status) String

func (x Todo_Status) String() string

func (Todo_Status) Type

type UnimplementedAttachmentServiceServer

type UnimplementedAttachmentServiceServer struct {
}

UnimplementedAttachmentServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedAttachmentServiceServer) Create

func (UnimplementedAttachmentServiceServer) Delete

func (UnimplementedAttachmentServiceServer) Get

func (UnimplementedAttachmentServiceServer) Update

type UnimplementedUserServiceServer

type UnimplementedUserServiceServer struct {
}

UnimplementedUserServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedUserServiceServer) Create

func (UnimplementedUserServiceServer) Delete

func (UnimplementedUserServiceServer) Get

func (UnimplementedUserServiceServer) Update

type UnsafeAttachmentServiceServer

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

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

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 UpdateAttachmentRequest

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

func (*UpdateAttachmentRequest) Descriptor deprecated

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

Deprecated: Use UpdateAttachmentRequest.ProtoReflect.Descriptor instead.

func (*UpdateAttachmentRequest) GetAttachment

func (x *UpdateAttachmentRequest) GetAttachment() *Attachment

func (*UpdateAttachmentRequest) ProtoMessage

func (*UpdateAttachmentRequest) ProtoMessage()

func (*UpdateAttachmentRequest) ProtoReflect

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

func (*UpdateAttachmentRequest) Reset

func (x *UpdateAttachmentRequest) Reset()

func (*UpdateAttachmentRequest) String

func (x *UpdateAttachmentRequest) String() string

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         int32                   `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	UserName   string                  `protobuf:"bytes,2,opt,name=user_name,json=userName,proto3" json:"user_name,omitempty"`
	Joined     *timestamppb.Timestamp  `protobuf:"bytes,3,opt,name=joined,proto3" json:"joined,omitempty"`
	Points     uint32                  `protobuf:"varint,4,opt,name=points,proto3" json:"points,omitempty"`
	Exp        uint64                  `protobuf:"varint,5,opt,name=exp,proto3" json:"exp,omitempty"`
	Status     User_Status             `protobuf:"varint,6,opt,name=status,proto3,enum=entpb.User_Status" json:"status,omitempty"`
	ExternalId int32                   `protobuf:"varint,8,opt,name=external_id,json=externalId,proto3" json:"external_id,omitempty"`
	CrmId      []byte                  `protobuf:"bytes,9,opt,name=crm_id,json=crmId,proto3" json:"crm_id,omitempty"`
	Banned     bool                    `protobuf:"varint,10,opt,name=banned,proto3" json:"banned,omitempty"`
	CustomPb   uint64                  `protobuf:"varint,12,opt,name=custom_pb,json=customPb,proto3" json:"custom_pb,omitempty"`
	OptNum     *wrapperspb.Int32Value  `protobuf:"bytes,13,opt,name=opt_num,json=optNum,proto3" json:"opt_num,omitempty"`
	OptStr     *wrapperspb.StringValue `protobuf:"bytes,14,opt,name=opt_str,json=optStr,proto3" json:"opt_str,omitempty"`
	OptBool    *wrapperspb.BoolValue   `protobuf:"bytes,15,opt,name=opt_bool,json=optBool,proto3" json:"opt_bool,omitempty"`
	Group      *Group                  `protobuf:"bytes,7,opt,name=group,proto3" json:"group,omitempty"`
	Attachment *Attachment             `protobuf:"bytes,11,opt,name=attachment,proto3" json:"attachment,omitempty"`
	Received   []*Attachment           `protobuf:"bytes,16,rep,name=received,proto3" json:"received,omitempty"`
	// contains filtered or unexported fields
}

func (*User) Descriptor deprecated

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetAttachment

func (x *User) GetAttachment() *Attachment

func (*User) GetBanned

func (x *User) GetBanned() bool

func (*User) GetCrmId

func (x *User) GetCrmId() []byte

func (*User) GetCustomPb

func (x *User) GetCustomPb() uint64

func (*User) GetExp

func (x *User) GetExp() uint64

func (*User) GetExternalId

func (x *User) GetExternalId() int32

func (*User) GetGroup

func (x *User) GetGroup() *Group

func (*User) GetId

func (x *User) GetId() int32

func (*User) GetJoined

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

func (*User) GetOptBool

func (x *User) GetOptBool() *wrapperspb.BoolValue

func (*User) GetOptNum

func (x *User) GetOptNum() *wrapperspb.Int32Value

func (*User) GetOptStr

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

func (*User) GetPoints

func (x *User) GetPoints() uint32

func (*User) GetReceived

func (x *User) GetReceived() []*Attachment

func (*User) GetStatus

func (x *User) GetStatus() User_Status

func (*User) GetUserName

func (x *User) GetUserName() 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) 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) 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)
}

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)
	// contains filtered or unexported methods
}

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

type User_Status

type User_Status int32
const (
	User_STATUS_UNSPECIFIED User_Status = 0
	User_PENDING            User_Status = 1
	User_ACTIVE             User_Status = 2
)

func (User_Status) Descriptor

func (User_Status) Enum

func (x User_Status) Enum() *User_Status

func (User_Status) EnumDescriptor deprecated

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

Deprecated: Use User_Status.Descriptor instead.

func (User_Status) Number

func (x User_Status) Number() protoreflect.EnumNumber

func (User_Status) String

func (x User_Status) String() string

func (User_Status) Type

Jump to

Keyboard shortcuts

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