entpb

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2021 License: MIT Imports: 16 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 (
	GetEquipmentRequest_View_name = map[int32]string{
		0: "VIEW_UNSPECIFIED",
		1: "BASIC",
		2: "WITH_EDGE_IDS",
	}
	GetEquipmentRequest_View_value = map[string]int32{
		"VIEW_UNSPECIFIED": 0,
		"BASIC":            1,
		"WITH_EDGE_IDS":    2,
	}
)

Enum value maps for GetEquipmentRequest_View.

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

Enum value maps for GetVehicleRequest_View.

View Source
var EquipmentService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "entpb.EquipmentService",
	HandlerType: (*EquipmentServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Create",
			Handler:    _EquipmentService_Create_Handler,
		},
		{
			MethodName: "Get",
			Handler:    _EquipmentService_Get_Handler,
		},
		{
			MethodName: "Update",
			Handler:    _EquipmentService_Update_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _EquipmentService_Delete_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "entpb/entpb.proto",
}

EquipmentService_ServiceDesc is the grpc.ServiceDesc for EquipmentService 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 VehicleService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "entpb.VehicleService",
	HandlerType: (*VehicleServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Create",
			Handler:    _VehicleService_Create_Handler,
		},
		{
			MethodName: "Get",
			Handler:    _VehicleService_Get_Handler,
		},
		{
			MethodName: "Update",
			Handler:    _VehicleService_Update_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _VehicleService_Delete_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "entpb/entpb.proto",
}

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

Functions

func RegisterEquipmentServiceServer

func RegisterEquipmentServiceServer(s grpc.ServiceRegistrar, srv EquipmentServiceServer)

func RegisterVehicleServiceServer

func RegisterVehicleServiceServer(s grpc.ServiceRegistrar, srv VehicleServiceServer)

Types

type CreateEquipmentRequest

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

func (*CreateEquipmentRequest) Descriptor deprecated

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

Deprecated: Use CreateEquipmentRequest.ProtoReflect.Descriptor instead.

func (*CreateEquipmentRequest) GetEquipment

func (x *CreateEquipmentRequest) GetEquipment() *Equipment

func (*CreateEquipmentRequest) ProtoMessage

func (*CreateEquipmentRequest) ProtoMessage()

func (*CreateEquipmentRequest) ProtoReflect

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

func (*CreateEquipmentRequest) Reset

func (x *CreateEquipmentRequest) Reset()

func (*CreateEquipmentRequest) String

func (x *CreateEquipmentRequest) String() string

type CreateVehicleRequest

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

func (*CreateVehicleRequest) Descriptor deprecated

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

Deprecated: Use CreateVehicleRequest.ProtoReflect.Descriptor instead.

func (*CreateVehicleRequest) GetVehicle

func (x *CreateVehicleRequest) GetVehicle() *Vehicle

func (*CreateVehicleRequest) ProtoMessage

func (*CreateVehicleRequest) ProtoMessage()

func (*CreateVehicleRequest) ProtoReflect

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

func (*CreateVehicleRequest) Reset

func (x *CreateVehicleRequest) Reset()

func (*CreateVehicleRequest) String

func (x *CreateVehicleRequest) String() string

type DeleteEquipmentRequest

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

func (*DeleteEquipmentRequest) Descriptor deprecated

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

Deprecated: Use DeleteEquipmentRequest.ProtoReflect.Descriptor instead.

func (*DeleteEquipmentRequest) GetId

func (x *DeleteEquipmentRequest) GetId() int32

func (*DeleteEquipmentRequest) ProtoMessage

func (*DeleteEquipmentRequest) ProtoMessage()

func (*DeleteEquipmentRequest) ProtoReflect

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

func (*DeleteEquipmentRequest) Reset

func (x *DeleteEquipmentRequest) Reset()

func (*DeleteEquipmentRequest) String

func (x *DeleteEquipmentRequest) String() string

type DeleteVehicleRequest

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

func (*DeleteVehicleRequest) Descriptor deprecated

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

Deprecated: Use DeleteVehicleRequest.ProtoReflect.Descriptor instead.

func (*DeleteVehicleRequest) GetId

func (x *DeleteVehicleRequest) GetId() int32

func (*DeleteVehicleRequest) ProtoMessage

func (*DeleteVehicleRequest) ProtoMessage()

func (*DeleteVehicleRequest) ProtoReflect

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

func (*DeleteVehicleRequest) Reset

func (x *DeleteVehicleRequest) Reset()

func (*DeleteVehicleRequest) String

func (x *DeleteVehicleRequest) String() string

type Equipment

type Equipment struct {
	Id         int32                  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	CreateTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
	UpdateTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
	Name       string                 `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
	Condition  string                 `protobuf:"bytes,5,opt,name=condition,proto3" json:"condition,omitempty"`
	// contains filtered or unexported fields
}

func (*Equipment) Descriptor deprecated

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

Deprecated: Use Equipment.ProtoReflect.Descriptor instead.

func (*Equipment) GetCondition

func (x *Equipment) GetCondition() string

func (*Equipment) GetCreateTime

func (x *Equipment) GetCreateTime() *timestamppb.Timestamp

func (*Equipment) GetId

func (x *Equipment) GetId() int32

func (*Equipment) GetName

func (x *Equipment) GetName() string

func (*Equipment) GetUpdateTime

func (x *Equipment) GetUpdateTime() *timestamppb.Timestamp

func (*Equipment) ProtoMessage

func (*Equipment) ProtoMessage()

func (*Equipment) ProtoReflect

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

func (*Equipment) Reset

func (x *Equipment) Reset()

func (*Equipment) String

func (x *Equipment) String() string

type EquipmentService

type EquipmentService struct {
	UnimplementedEquipmentServiceServer
	// contains filtered or unexported fields
}

EquipmentService implements EquipmentServiceServer

func NewEquipmentService

func NewEquipmentService(client *ent.Client) *EquipmentService

NewEquipmentService returns a new EquipmentService

func (*EquipmentService) Create

Create implements EquipmentServiceServer.Create

func (*EquipmentService) Delete

Delete implements EquipmentServiceServer.Delete

func (*EquipmentService) Get

Get implements EquipmentServiceServer.Get

func (*EquipmentService) Update

Update implements EquipmentServiceServer.Update

type EquipmentServiceClient

type EquipmentServiceClient interface {
	Create(ctx context.Context, in *CreateEquipmentRequest, opts ...grpc.CallOption) (*Equipment, error)
	Get(ctx context.Context, in *GetEquipmentRequest, opts ...grpc.CallOption) (*Equipment, error)
	Update(ctx context.Context, in *UpdateEquipmentRequest, opts ...grpc.CallOption) (*Equipment, error)
	Delete(ctx context.Context, in *DeleteEquipmentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

EquipmentServiceClient is the client API for EquipmentService 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 EquipmentServiceServer

type EquipmentServiceServer interface {
	Create(context.Context, *CreateEquipmentRequest) (*Equipment, error)
	Get(context.Context, *GetEquipmentRequest) (*Equipment, error)
	Update(context.Context, *UpdateEquipmentRequest) (*Equipment, error)
	Delete(context.Context, *DeleteEquipmentRequest) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

EquipmentServiceServer is the server API for EquipmentService service. All implementations must embed UnimplementedEquipmentServiceServer for forward compatibility

type GetEquipmentRequest

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

func (*GetEquipmentRequest) Descriptor deprecated

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

Deprecated: Use GetEquipmentRequest.ProtoReflect.Descriptor instead.

func (*GetEquipmentRequest) GetId

func (x *GetEquipmentRequest) GetId() int32

func (*GetEquipmentRequest) GetView

func (*GetEquipmentRequest) ProtoMessage

func (*GetEquipmentRequest) ProtoMessage()

func (*GetEquipmentRequest) ProtoReflect

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

func (*GetEquipmentRequest) Reset

func (x *GetEquipmentRequest) Reset()

func (*GetEquipmentRequest) String

func (x *GetEquipmentRequest) String() string

type GetEquipmentRequest_View

type GetEquipmentRequest_View int32
const (
	GetEquipmentRequest_VIEW_UNSPECIFIED GetEquipmentRequest_View = 0
	GetEquipmentRequest_BASIC            GetEquipmentRequest_View = 1
	GetEquipmentRequest_WITH_EDGE_IDS    GetEquipmentRequest_View = 2
)

func (GetEquipmentRequest_View) Descriptor

func (GetEquipmentRequest_View) Enum

func (GetEquipmentRequest_View) EnumDescriptor deprecated

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

Deprecated: Use GetEquipmentRequest_View.Descriptor instead.

func (GetEquipmentRequest_View) Number

func (GetEquipmentRequest_View) String

func (x GetEquipmentRequest_View) String() string

func (GetEquipmentRequest_View) Type

type GetVehicleRequest

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

func (*GetVehicleRequest) Descriptor deprecated

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

Deprecated: Use GetVehicleRequest.ProtoReflect.Descriptor instead.

func (*GetVehicleRequest) GetId

func (x *GetVehicleRequest) GetId() int32

func (*GetVehicleRequest) GetView

func (*GetVehicleRequest) ProtoMessage

func (*GetVehicleRequest) ProtoMessage()

func (*GetVehicleRequest) ProtoReflect

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

func (*GetVehicleRequest) Reset

func (x *GetVehicleRequest) Reset()

func (*GetVehicleRequest) String

func (x *GetVehicleRequest) String() string

type GetVehicleRequest_View

type GetVehicleRequest_View int32
const (
	GetVehicleRequest_VIEW_UNSPECIFIED GetVehicleRequest_View = 0
	GetVehicleRequest_BASIC            GetVehicleRequest_View = 1
	GetVehicleRequest_WITH_EDGE_IDS    GetVehicleRequest_View = 2
)

func (GetVehicleRequest_View) Descriptor

func (GetVehicleRequest_View) Enum

func (GetVehicleRequest_View) EnumDescriptor deprecated

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

Deprecated: Use GetVehicleRequest_View.Descriptor instead.

func (GetVehicleRequest_View) Number

func (GetVehicleRequest_View) String

func (x GetVehicleRequest_View) String() string

func (GetVehicleRequest_View) Type

type UnimplementedEquipmentServiceServer

type UnimplementedEquipmentServiceServer struct {
}

UnimplementedEquipmentServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedEquipmentServiceServer) Create

func (UnimplementedEquipmentServiceServer) Delete

func (UnimplementedEquipmentServiceServer) Get

func (UnimplementedEquipmentServiceServer) Update

type UnimplementedVehicleServiceServer

type UnimplementedVehicleServiceServer struct {
}

UnimplementedVehicleServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedVehicleServiceServer) Create

func (UnimplementedVehicleServiceServer) Delete

func (UnimplementedVehicleServiceServer) Get

func (UnimplementedVehicleServiceServer) Update

type UnsafeEquipmentServiceServer

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

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

type UnsafeVehicleServiceServer

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

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

type UpdateEquipmentRequest

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

func (*UpdateEquipmentRequest) Descriptor deprecated

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

Deprecated: Use UpdateEquipmentRequest.ProtoReflect.Descriptor instead.

func (*UpdateEquipmentRequest) GetEquipment

func (x *UpdateEquipmentRequest) GetEquipment() *Equipment

func (*UpdateEquipmentRequest) ProtoMessage

func (*UpdateEquipmentRequest) ProtoMessage()

func (*UpdateEquipmentRequest) ProtoReflect

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

func (*UpdateEquipmentRequest) Reset

func (x *UpdateEquipmentRequest) Reset()

func (*UpdateEquipmentRequest) String

func (x *UpdateEquipmentRequest) String() string

type UpdateVehicleRequest

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

func (*UpdateVehicleRequest) Descriptor deprecated

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

Deprecated: Use UpdateVehicleRequest.ProtoReflect.Descriptor instead.

func (*UpdateVehicleRequest) GetVehicle

func (x *UpdateVehicleRequest) GetVehicle() *Vehicle

func (*UpdateVehicleRequest) ProtoMessage

func (*UpdateVehicleRequest) ProtoMessage()

func (*UpdateVehicleRequest) ProtoReflect

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

func (*UpdateVehicleRequest) Reset

func (x *UpdateVehicleRequest) Reset()

func (*UpdateVehicleRequest) String

func (x *UpdateVehicleRequest) String() string

type Vehicle

type Vehicle struct {
	Id         int32                   `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	CreateTime *timestamppb.Timestamp  `protobuf:"bytes,2,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
	UpdateTime *timestamppb.Timestamp  `protobuf:"bytes,3,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
	Make       string                  `protobuf:"bytes,4,opt,name=make,proto3" json:"make,omitempty"`
	Model      string                  `protobuf:"bytes,5,opt,name=model,proto3" json:"model,omitempty"`
	Miles      *wrapperspb.Int64Value  `protobuf:"bytes,6,opt,name=miles,proto3" json:"miles,omitempty"`
	Mpg        *wrapperspb.Int64Value  `protobuf:"bytes,7,opt,name=mpg,proto3" json:"mpg,omitempty"`
	Owner      *wrapperspb.StringValue `protobuf:"bytes,8,opt,name=owner,proto3" json:"owner,omitempty"`
	Year       *wrapperspb.StringValue `protobuf:"bytes,9,opt,name=year,proto3" json:"year,omitempty"`
	Active     *wrapperspb.BoolValue   `protobuf:"bytes,10,opt,name=active,proto3" json:"active,omitempty"`
	Condition  *wrapperspb.StringValue `protobuf:"bytes,11,opt,name=condition,proto3" json:"condition,omitempty"`
	// contains filtered or unexported fields
}

func (*Vehicle) Descriptor deprecated

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

Deprecated: Use Vehicle.ProtoReflect.Descriptor instead.

func (*Vehicle) GetActive

func (x *Vehicle) GetActive() *wrapperspb.BoolValue

func (*Vehicle) GetCondition

func (x *Vehicle) GetCondition() *wrapperspb.StringValue

func (*Vehicle) GetCreateTime

func (x *Vehicle) GetCreateTime() *timestamppb.Timestamp

func (*Vehicle) GetId

func (x *Vehicle) GetId() int32

func (*Vehicle) GetMake

func (x *Vehicle) GetMake() string

func (*Vehicle) GetMiles

func (x *Vehicle) GetMiles() *wrapperspb.Int64Value

func (*Vehicle) GetModel

func (x *Vehicle) GetModel() string

func (*Vehicle) GetMpg

func (x *Vehicle) GetMpg() *wrapperspb.Int64Value

func (*Vehicle) GetOwner

func (x *Vehicle) GetOwner() *wrapperspb.StringValue

func (*Vehicle) GetUpdateTime

func (x *Vehicle) GetUpdateTime() *timestamppb.Timestamp

func (*Vehicle) GetYear

func (x *Vehicle) GetYear() *wrapperspb.StringValue

func (*Vehicle) ProtoMessage

func (*Vehicle) ProtoMessage()

func (*Vehicle) ProtoReflect

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

func (*Vehicle) Reset

func (x *Vehicle) Reset()

func (*Vehicle) String

func (x *Vehicle) String() string

type VehicleService

type VehicleService struct {
	UnimplementedVehicleServiceServer
	// contains filtered or unexported fields
}

VehicleService implements VehicleServiceServer

func NewVehicleService

func NewVehicleService(client *ent.Client) *VehicleService

NewVehicleService returns a new VehicleService

func (*VehicleService) Create

func (svc *VehicleService) Create(ctx context.Context, req *CreateVehicleRequest) (*Vehicle, error)

Create implements VehicleServiceServer.Create

func (*VehicleService) Delete

Delete implements VehicleServiceServer.Delete

func (*VehicleService) Get

func (svc *VehicleService) Get(ctx context.Context, req *GetVehicleRequest) (*Vehicle, error)

Get implements VehicleServiceServer.Get

func (*VehicleService) Update

func (svc *VehicleService) Update(ctx context.Context, req *UpdateVehicleRequest) (*Vehicle, error)

Update implements VehicleServiceServer.Update

type VehicleServiceClient

type VehicleServiceClient interface {
	Create(ctx context.Context, in *CreateVehicleRequest, opts ...grpc.CallOption) (*Vehicle, error)
	Get(ctx context.Context, in *GetVehicleRequest, opts ...grpc.CallOption) (*Vehicle, error)
	Update(ctx context.Context, in *UpdateVehicleRequest, opts ...grpc.CallOption) (*Vehicle, error)
	Delete(ctx context.Context, in *DeleteVehicleRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

VehicleServiceClient is the client API for VehicleService 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 VehicleServiceServer

type VehicleServiceServer interface {
	Create(context.Context, *CreateVehicleRequest) (*Vehicle, error)
	Get(context.Context, *GetVehicleRequest) (*Vehicle, error)
	Update(context.Context, *UpdateVehicleRequest) (*Vehicle, error)
	Delete(context.Context, *DeleteVehicleRequest) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

VehicleServiceServer is the server API for VehicleService service. All implementations must embed UnimplementedVehicleServiceServer for forward compatibility

Jump to

Keyboard shortcuts

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