Documentation ¶
Index ¶
- Variables
- func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)
- type CreateRequest
- func (*CreateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateRequest) GetAccountId() int64
- func (x *CreateRequest) GetName() string
- func (*CreateRequest) ProtoMessage()
- func (x *CreateRequest) ProtoReflect() protoreflect.Message
- func (x *CreateRequest) Reset()
- func (x *CreateRequest) String() string
- type CreateResponse
- type FindManyRequest
- func (*FindManyRequest) Descriptor() ([]byte, []int)deprecated
- func (x *FindManyRequest) GetAccountId() int64
- func (x *FindManyRequest) GetLimit() int32
- func (x *FindManyRequest) GetOffset() int32
- func (*FindManyRequest) ProtoMessage()
- func (x *FindManyRequest) ProtoReflect() protoreflect.Message
- func (x *FindManyRequest) Reset()
- func (x *FindManyRequest) String() string
- type FindManyResponse
- func (*FindManyResponse) Descriptor() ([]byte, []int)deprecated
- func (x *FindManyResponse) GetOffices() []*Office
- func (x *FindManyResponse) GetTotal() int32
- func (*FindManyResponse) ProtoMessage()
- func (x *FindManyResponse) ProtoReflect() protoreflect.Message
- func (x *FindManyResponse) Reset()
- func (x *FindManyResponse) String() string
- type FindOneRequest
- type FindOneResponse
- type Office
- type ServiceClient
- type ServiceServer
- type UnimplementedServiceServer
- func (UnimplementedServiceServer) Create(context.Context, *CreateRequest) (*CreateResponse, error)
- func (UnimplementedServiceServer) FindMany(context.Context, *FindManyRequest) (*FindManyResponse, error)
- func (UnimplementedServiceServer) FindOne(context.Context, *FindOneRequest) (*FindOneResponse, error)
- func (UnimplementedServiceServer) Update(context.Context, *UpdateRequest) (*UpdateResponse, error)
- type UnsafeServiceServer
- type UpdateRequest
- func (*UpdateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateRequest) GetId() int64
- func (x *UpdateRequest) GetName() string
- func (*UpdateRequest) ProtoMessage()
- func (x *UpdateRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateRequest) Reset()
- func (x *UpdateRequest) String() string
- type UpdateResponse
Constants ¶
This section is empty.
Variables ¶
var File_office_proto protoreflect.FileDescriptor
var Service_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.Service", HandlerType: (*ServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "FindMany", Handler: _Service_FindMany_Handler, }, { MethodName: "FindOne", Handler: _Service_FindOne_Handler, }, { MethodName: "Create", Handler: _Service_Create_Handler, }, { MethodName: "Update", Handler: _Service_Update_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "office.proto", }
Service_ServiceDesc is the grpc.ServiceDesc for Service service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterServiceServer ¶
func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)
Types ¶
type CreateRequest ¶
type CreateRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` AccountId int64 `protobuf:"varint,2,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` // contains filtered or unexported fields }
func (*CreateRequest) Descriptor
deprecated
func (*CreateRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.
func (*CreateRequest) GetAccountId ¶
func (x *CreateRequest) GetAccountId() int64
func (*CreateRequest) GetName ¶
func (x *CreateRequest) GetName() string
func (*CreateRequest) ProtoMessage ¶
func (*CreateRequest) ProtoMessage()
func (*CreateRequest) ProtoReflect ¶
func (x *CreateRequest) ProtoReflect() protoreflect.Message
func (*CreateRequest) Reset ¶
func (x *CreateRequest) Reset()
func (*CreateRequest) String ¶
func (x *CreateRequest) String() string
type CreateResponse ¶
type CreateResponse struct {
// contains filtered or unexported fields
}
func (*CreateResponse) Descriptor
deprecated
func (*CreateResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateResponse.ProtoReflect.Descriptor instead.
func (*CreateResponse) ProtoMessage ¶
func (*CreateResponse) ProtoMessage()
func (*CreateResponse) ProtoReflect ¶
func (x *CreateResponse) ProtoReflect() protoreflect.Message
func (*CreateResponse) Reset ¶
func (x *CreateResponse) Reset()
func (*CreateResponse) String ¶
func (x *CreateResponse) String() string
type FindManyRequest ¶
type FindManyRequest struct { AccountId int64 `protobuf:"varint,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` Offset int32 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"` Limit int32 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"` // contains filtered or unexported fields }
func (*FindManyRequest) Descriptor
deprecated
func (*FindManyRequest) Descriptor() ([]byte, []int)
Deprecated: Use FindManyRequest.ProtoReflect.Descriptor instead.
func (*FindManyRequest) GetAccountId ¶
func (x *FindManyRequest) GetAccountId() int64
func (*FindManyRequest) GetLimit ¶
func (x *FindManyRequest) GetLimit() int32
func (*FindManyRequest) GetOffset ¶
func (x *FindManyRequest) GetOffset() int32
func (*FindManyRequest) ProtoMessage ¶
func (*FindManyRequest) ProtoMessage()
func (*FindManyRequest) ProtoReflect ¶
func (x *FindManyRequest) ProtoReflect() protoreflect.Message
func (*FindManyRequest) Reset ¶
func (x *FindManyRequest) Reset()
func (*FindManyRequest) String ¶
func (x *FindManyRequest) String() string
type FindManyResponse ¶
type FindManyResponse struct { Offices []*Office `protobuf:"bytes,1,rep,name=offices,proto3" json:"offices,omitempty"` Total int32 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"` // contains filtered or unexported fields }
func (*FindManyResponse) Descriptor
deprecated
func (*FindManyResponse) Descriptor() ([]byte, []int)
Deprecated: Use FindManyResponse.ProtoReflect.Descriptor instead.
func (*FindManyResponse) GetOffices ¶
func (x *FindManyResponse) GetOffices() []*Office
func (*FindManyResponse) GetTotal ¶
func (x *FindManyResponse) GetTotal() int32
func (*FindManyResponse) ProtoMessage ¶
func (*FindManyResponse) ProtoMessage()
func (*FindManyResponse) ProtoReflect ¶
func (x *FindManyResponse) ProtoReflect() protoreflect.Message
func (*FindManyResponse) Reset ¶
func (x *FindManyResponse) Reset()
func (*FindManyResponse) String ¶
func (x *FindManyResponse) String() string
type FindOneRequest ¶
type FindOneRequest struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*FindOneRequest) Descriptor
deprecated
func (*FindOneRequest) Descriptor() ([]byte, []int)
Deprecated: Use FindOneRequest.ProtoReflect.Descriptor instead.
func (*FindOneRequest) GetId ¶
func (x *FindOneRequest) GetId() int64
func (*FindOneRequest) ProtoMessage ¶
func (*FindOneRequest) ProtoMessage()
func (*FindOneRequest) ProtoReflect ¶
func (x *FindOneRequest) ProtoReflect() protoreflect.Message
func (*FindOneRequest) Reset ¶
func (x *FindOneRequest) Reset()
func (*FindOneRequest) String ¶
func (x *FindOneRequest) String() string
type FindOneResponse ¶
type FindOneResponse struct { Office *Office `protobuf:"bytes,1,opt,name=office,proto3" json:"office,omitempty"` // contains filtered or unexported fields }
func (*FindOneResponse) Descriptor
deprecated
func (*FindOneResponse) Descriptor() ([]byte, []int)
Deprecated: Use FindOneResponse.ProtoReflect.Descriptor instead.
func (*FindOneResponse) GetOffice ¶
func (x *FindOneResponse) GetOffice() *Office
func (*FindOneResponse) ProtoMessage ¶
func (*FindOneResponse) ProtoMessage()
func (*FindOneResponse) ProtoReflect ¶
func (x *FindOneResponse) ProtoReflect() protoreflect.Message
func (*FindOneResponse) Reset ¶
func (x *FindOneResponse) Reset()
func (*FindOneResponse) String ¶
func (x *FindOneResponse) String() string
type Office ¶
type Office 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 (*Office) Descriptor
deprecated
func (*Office) ProtoMessage ¶
func (*Office) ProtoMessage()
func (*Office) ProtoReflect ¶
func (x *Office) ProtoReflect() protoreflect.Message
type ServiceClient ¶
type ServiceClient interface { FindMany(ctx context.Context, in *FindManyRequest, opts ...grpc.CallOption) (*FindManyResponse, error) FindOne(ctx context.Context, in *FindOneRequest, opts ...grpc.CallOption) (*FindOneResponse, error) Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error) }
ServiceClient is the client API for Service 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.
func NewServiceClient ¶
func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient
type ServiceServer ¶
type ServiceServer interface { FindMany(context.Context, *FindManyRequest) (*FindManyResponse, error) FindOne(context.Context, *FindOneRequest) (*FindOneResponse, error) Create(context.Context, *CreateRequest) (*CreateResponse, error) Update(context.Context, *UpdateRequest) (*UpdateResponse, error) // contains filtered or unexported methods }
ServiceServer is the server API for Service service. All implementations must embed UnimplementedServiceServer for forward compatibility
type UnimplementedServiceServer ¶
type UnimplementedServiceServer struct { }
UnimplementedServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedServiceServer) Create ¶
func (UnimplementedServiceServer) Create(context.Context, *CreateRequest) (*CreateResponse, error)
func (UnimplementedServiceServer) FindMany ¶
func (UnimplementedServiceServer) FindMany(context.Context, *FindManyRequest) (*FindManyResponse, error)
func (UnimplementedServiceServer) FindOne ¶
func (UnimplementedServiceServer) FindOne(context.Context, *FindOneRequest) (*FindOneResponse, error)
func (UnimplementedServiceServer) Update ¶
func (UnimplementedServiceServer) Update(context.Context, *UpdateRequest) (*UpdateResponse, error)
type UnsafeServiceServer ¶
type UnsafeServiceServer interface {
// contains filtered or unexported methods
}
UnsafeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ServiceServer will result in compilation errors.
type UpdateRequest ¶
type UpdateRequest 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 (*UpdateRequest) Descriptor
deprecated
func (*UpdateRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead.
func (*UpdateRequest) GetId ¶
func (x *UpdateRequest) GetId() int64
func (*UpdateRequest) GetName ¶
func (x *UpdateRequest) GetName() string
func (*UpdateRequest) ProtoMessage ¶
func (*UpdateRequest) ProtoMessage()
func (*UpdateRequest) ProtoReflect ¶
func (x *UpdateRequest) ProtoReflect() protoreflect.Message
func (*UpdateRequest) Reset ¶
func (x *UpdateRequest) Reset()
func (*UpdateRequest) String ¶
func (x *UpdateRequest) String() string
type UpdateResponse ¶
type UpdateResponse struct {
// contains filtered or unexported fields
}
func (*UpdateResponse) Descriptor
deprecated
func (*UpdateResponse) Descriptor() ([]byte, []int)
Deprecated: Use UpdateResponse.ProtoReflect.Descriptor instead.
func (*UpdateResponse) ProtoMessage ¶
func (*UpdateResponse) ProtoMessage()
func (*UpdateResponse) ProtoReflect ¶
func (x *UpdateResponse) ProtoReflect() protoreflect.Message
func (*UpdateResponse) Reset ¶
func (x *UpdateResponse) Reset()
func (*UpdateResponse) String ¶
func (x *UpdateResponse) String() string