Documentation ¶
Overview ¶
This package holds the gRPC definitions and generated code
Index ¶
- Variables
- func RegisterUserzServer(s grpc.ServiceRegistrar, srv UserzServer)
- type AddRequest
- func (*AddRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AddRequest) GetData() *UserData
- func (x *AddRequest) GetServiceOrigin() string
- func (*AddRequest) ProtoMessage()
- func (x *AddRequest) ProtoReflect() protoreflect.Message
- func (x *AddRequest) Reset()
- func (x *AddRequest) String() string
- type AddResponse
- type ListRequest
- func (*ListRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListRequest) GetFilter() map[string]string
- func (x *ListRequest) GetPageSize() int64
- func (x *ListRequest) GetServiceOrigin() string
- func (*ListRequest) ProtoMessage()
- func (x *ListRequest) ProtoReflect() protoreflect.Message
- func (x *ListRequest) Reset()
- func (x *ListRequest) String() string
- type ListResponse
- type RemoveRequest
- func (*RemoveRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RemoveRequest) GetId() string
- func (x *RemoveRequest) GetServiceOrigin() string
- func (*RemoveRequest) ProtoMessage()
- func (x *RemoveRequest) ProtoReflect() protoreflect.Message
- func (x *RemoveRequest) Reset()
- func (x *RemoveRequest) String() string
- type RemoveResponse
- type Service
- func (s *Service) Add(ctx context.Context, req *AddRequest) (*AddResponse, error)
- func (s *Service) List(req *ListRequest, server Userz_ListServer) error
- func (s *Service) Remove(ctx context.Context, req *RemoveRequest) (*RemoveResponse, error)
- func (s *Service) Update(ctx context.Context, req *UpdateRequest) (*UpdateResponse, error)
- type UnimplementedUserzServer
- func (UnimplementedUserzServer) Add(context.Context, *AddRequest) (*AddResponse, error)
- func (UnimplementedUserzServer) List(*ListRequest, Userz_ListServer) error
- func (UnimplementedUserzServer) Remove(context.Context, *RemoveRequest) (*RemoveResponse, error)
- func (UnimplementedUserzServer) Update(context.Context, *UpdateRequest) (*UpdateResponse, error)
- type UnsafeUserzServer
- type UpdateRequest
- func (*UpdateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateRequest) GetData() *UserData
- func (x *UpdateRequest) GetId() string
- func (x *UpdateRequest) GetServiceOrigin() string
- func (*UpdateRequest) ProtoMessage()
- func (x *UpdateRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateRequest) Reset()
- func (x *UpdateRequest) String() string
- type UpdateResponse
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetCountry() string
- func (x *User) GetCreatedAt() string
- func (x *User) GetEmail() string
- func (x *User) GetFirstName() string
- func (x *User) GetId() string
- func (x *User) GetLastName() string
- func (x *User) GetNickName() string
- func (x *User) GetPassword() string
- func (x *User) GetUpdatedAt() string
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- type UserData
- func (*UserData) Descriptor() ([]byte, []int)deprecated
- func (x *UserData) GetCountry() string
- func (x *UserData) GetEmail() string
- func (x *UserData) GetFirstName() string
- func (x *UserData) GetLastName() string
- func (x *UserData) GetNickName() string
- func (x *UserData) GetPassword() string
- func (d *UserData) Into() *userz.UserData
- func (*UserData) ProtoMessage()
- func (x *UserData) ProtoReflect() protoreflect.Message
- func (x *UserData) Reset()
- func (x *UserData) String() string
- type UserzClient
- type UserzServer
- type Userz_ListClient
- type Userz_ListServer
Constants ¶
This section is empty.
Variables ¶
var ( ErrNoUserFound = status.Error(codes.NotFound, "userz: no user found with given criteria") ErrInternal = status.Error(codes.Internal, "userz: there has been an internal error") )
var File_userz_proto protoreflect.FileDescriptor
var Userz_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.Userz", HandlerType: (*UserzServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Add", Handler: _Userz_Add_Handler, }, { MethodName: "Update", Handler: _Userz_Update_Handler, }, { MethodName: "Remove", Handler: _Userz_Remove_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "List", Handler: _Userz_List_Handler, ServerStreams: true, }, }, Metadata: "userz.proto", }
Userz_ServiceDesc is the grpc.ServiceDesc for Userz service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterUserzServer ¶
func RegisterUserzServer(s grpc.ServiceRegistrar, srv UserzServer)
Types ¶
type AddRequest ¶
type AddRequest struct { ServiceOrigin string `protobuf:"bytes,1,opt,name=service_origin,json=serviceOrigin,proto3" json:"service_origin,omitempty"` Data *UserData `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*AddRequest) Descriptor
deprecated
func (*AddRequest) Descriptor() ([]byte, []int)
Deprecated: Use AddRequest.ProtoReflect.Descriptor instead.
func (*AddRequest) GetData ¶
func (x *AddRequest) GetData() *UserData
func (*AddRequest) GetServiceOrigin ¶
func (x *AddRequest) GetServiceOrigin() string
func (*AddRequest) ProtoMessage ¶
func (*AddRequest) ProtoMessage()
func (*AddRequest) ProtoReflect ¶
func (x *AddRequest) ProtoReflect() protoreflect.Message
func (*AddRequest) Reset ¶
func (x *AddRequest) Reset()
func (*AddRequest) String ¶
func (x *AddRequest) String() string
type AddResponse ¶
type AddResponse struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*AddResponse) Descriptor
deprecated
func (*AddResponse) Descriptor() ([]byte, []int)
Deprecated: Use AddResponse.ProtoReflect.Descriptor instead.
func (*AddResponse) GetId ¶
func (x *AddResponse) GetId() string
func (*AddResponse) ProtoMessage ¶
func (*AddResponse) ProtoMessage()
func (*AddResponse) ProtoReflect ¶
func (x *AddResponse) ProtoReflect() protoreflect.Message
func (*AddResponse) Reset ¶
func (x *AddResponse) Reset()
func (*AddResponse) String ¶
func (x *AddResponse) String() string
type ListRequest ¶
type ListRequest struct { ServiceOrigin string `protobuf:"bytes,1,opt,name=service_origin,json=serviceOrigin,proto3" json:"service_origin,omitempty"` Filter map[string]string `` /* 153-byte string literal not displayed */ PageSize int64 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // contains filtered or unexported fields }
func (*ListRequest) Descriptor
deprecated
func (*ListRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.
func (*ListRequest) GetFilter ¶
func (x *ListRequest) GetFilter() map[string]string
func (*ListRequest) GetPageSize ¶
func (x *ListRequest) GetPageSize() int64
func (*ListRequest) GetServiceOrigin ¶
func (x *ListRequest) GetServiceOrigin() string
func (*ListRequest) ProtoMessage ¶
func (*ListRequest) ProtoMessage()
func (*ListRequest) ProtoReflect ¶
func (x *ListRequest) ProtoReflect() protoreflect.Message
func (*ListRequest) Reset ¶
func (x *ListRequest) Reset()
func (*ListRequest) String ¶
func (x *ListRequest) String() string
type ListResponse ¶
type ListResponse struct { Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"` // contains filtered or unexported fields }
func (*ListResponse) Descriptor
deprecated
func (*ListResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.
func (*ListResponse) GetUsers ¶
func (x *ListResponse) GetUsers() []*User
func (*ListResponse) ProtoMessage ¶
func (*ListResponse) ProtoMessage()
func (*ListResponse) ProtoReflect ¶
func (x *ListResponse) ProtoReflect() protoreflect.Message
func (*ListResponse) Reset ¶
func (x *ListResponse) Reset()
func (*ListResponse) String ¶
func (x *ListResponse) String() string
type RemoveRequest ¶
type RemoveRequest struct { ServiceOrigin string `protobuf:"bytes,1,opt,name=service_origin,json=serviceOrigin,proto3" json:"service_origin,omitempty"` Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*RemoveRequest) Descriptor
deprecated
func (*RemoveRequest) Descriptor() ([]byte, []int)
Deprecated: Use RemoveRequest.ProtoReflect.Descriptor instead.
func (*RemoveRequest) GetId ¶
func (x *RemoveRequest) GetId() string
func (*RemoveRequest) GetServiceOrigin ¶
func (x *RemoveRequest) GetServiceOrigin() string
func (*RemoveRequest) ProtoMessage ¶
func (*RemoveRequest) ProtoMessage()
func (*RemoveRequest) ProtoReflect ¶
func (x *RemoveRequest) ProtoReflect() protoreflect.Message
func (*RemoveRequest) Reset ¶
func (x *RemoveRequest) Reset()
func (*RemoveRequest) String ¶
func (x *RemoveRequest) String() string
type RemoveResponse ¶
type RemoveResponse struct { User *User `protobuf:"bytes,1,opt,name=user,proto3,oneof" json:"user,omitempty"` // contains filtered or unexported fields }
func (*RemoveResponse) Descriptor
deprecated
func (*RemoveResponse) Descriptor() ([]byte, []int)
Deprecated: Use RemoveResponse.ProtoReflect.Descriptor instead.
func (*RemoveResponse) GetUser ¶
func (x *RemoveResponse) GetUser() *User
func (*RemoveResponse) ProtoMessage ¶
func (*RemoveResponse) ProtoMessage()
func (*RemoveResponse) ProtoReflect ¶
func (x *RemoveResponse) ProtoReflect() protoreflect.Message
func (*RemoveResponse) Reset ¶
func (x *RemoveResponse) Reset()
func (*RemoveResponse) String ¶
func (x *RemoveResponse) String() string
type Service ¶
type Service struct { UnimplementedUserzServer // contains filtered or unexported fields }
func (*Service) Add ¶
func (s *Service) Add(ctx context.Context, req *AddRequest) (*AddResponse, error)
func (*Service) List ¶
func (s *Service) List(req *ListRequest, server Userz_ListServer) error
func (*Service) Remove ¶
func (s *Service) Remove(ctx context.Context, req *RemoveRequest) (*RemoveResponse, error)
func (*Service) Update ¶
func (s *Service) Update(ctx context.Context, req *UpdateRequest) (*UpdateResponse, error)
type UnimplementedUserzServer ¶
type UnimplementedUserzServer struct { }
UnimplementedUserzServer must be embedded to have forward compatible implementations.
func (UnimplementedUserzServer) Add ¶
func (UnimplementedUserzServer) Add(context.Context, *AddRequest) (*AddResponse, error)
func (UnimplementedUserzServer) List ¶
func (UnimplementedUserzServer) List(*ListRequest, Userz_ListServer) error
func (UnimplementedUserzServer) Remove ¶
func (UnimplementedUserzServer) Remove(context.Context, *RemoveRequest) (*RemoveResponse, error)
func (UnimplementedUserzServer) Update ¶
func (UnimplementedUserzServer) Update(context.Context, *UpdateRequest) (*UpdateResponse, error)
type UnsafeUserzServer ¶
type UnsafeUserzServer interface {
// contains filtered or unexported methods
}
UnsafeUserzServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserzServer will result in compilation errors.
type UpdateRequest ¶
type UpdateRequest struct { ServiceOrigin string `protobuf:"bytes,1,opt,name=service_origin,json=serviceOrigin,proto3" json:"service_origin,omitempty"` Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` Data *UserData `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*UpdateRequest) Descriptor
deprecated
func (*UpdateRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead.
func (*UpdateRequest) GetData ¶
func (x *UpdateRequest) GetData() *UserData
func (*UpdateRequest) GetId ¶
func (x *UpdateRequest) GetId() string
func (*UpdateRequest) GetServiceOrigin ¶
func (x *UpdateRequest) GetServiceOrigin() 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 { User *User `protobuf:"bytes,1,opt,name=user,proto3,oneof" json:"user,omitempty"` // contains filtered or unexported fields }
func (*UpdateResponse) Descriptor
deprecated
func (*UpdateResponse) Descriptor() ([]byte, []int)
Deprecated: Use UpdateResponse.ProtoReflect.Descriptor instead.
func (*UpdateResponse) GetUser ¶
func (x *UpdateResponse) GetUser() *User
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
type User ¶
type User struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` FirstName *string `protobuf:"bytes,2,opt,name=first_name,json=firstName,proto3,oneof" json:"first_name,omitempty"` LastName *string `protobuf:"bytes,3,opt,name=last_name,json=lastName,proto3,oneof" json:"last_name,omitempty"` NickName string `protobuf:"bytes,4,opt,name=nick_name,json=nickName,proto3" json:"nick_name,omitempty"` Password string `protobuf:"bytes,5,opt,name=password,proto3" json:"password,omitempty"` Email string `protobuf:"bytes,6,opt,name=email,proto3" json:"email,omitempty"` Country *string `protobuf:"bytes,7,opt,name=country,proto3,oneof" json:"country,omitempty"` CreatedAt *string `protobuf:"bytes,8,opt,name=created_at,json=createdAt,proto3,oneof" json:"created_at,omitempty"` UpdatedAt *string `protobuf:"bytes,9,opt,name=updated_at,json=updatedAt,proto3,oneof" json:"updated_at,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetCountry ¶
func (*User) GetCreatedAt ¶
func (*User) GetFirstName ¶
func (*User) GetLastName ¶
func (*User) GetNickName ¶
func (*User) GetPassword ¶
func (*User) GetUpdatedAt ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type UserData ¶
type UserData struct { FirstName *string `protobuf:"bytes,1,opt,name=first_name,json=firstName,proto3,oneof" json:"first_name,omitempty"` LastName *string `protobuf:"bytes,2,opt,name=last_name,json=lastName,proto3,oneof" json:"last_name,omitempty"` NickName string `protobuf:"bytes,3,opt,name=nick_name,json=nickName,proto3" json:"nick_name,omitempty"` Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` Email string `protobuf:"bytes,5,opt,name=email,proto3" json:"email,omitempty"` Country *string `protobuf:"bytes,6,opt,name=country,proto3,oneof" json:"country,omitempty"` // contains filtered or unexported fields }
func FromUserData ¶
func (*UserData) Descriptor
deprecated
func (*UserData) GetCountry ¶
func (*UserData) GetFirstName ¶
func (*UserData) GetLastName ¶
func (*UserData) GetNickName ¶
func (*UserData) GetPassword ¶
func (*UserData) ProtoMessage ¶
func (*UserData) ProtoMessage()
func (*UserData) ProtoReflect ¶
func (x *UserData) ProtoReflect() protoreflect.Message
type UserzClient ¶
type UserzClient interface { Add(ctx context.Context, in *AddRequest, opts ...grpc.CallOption) (*AddResponse, error) Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error) Remove(ctx context.Context, in *RemoveRequest, opts ...grpc.CallOption) (*RemoveResponse, error) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (Userz_ListClient, error) }
UserzClient is the client API for Userz 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 NewUserzClient ¶
func NewUserzClient(cc grpc.ClientConnInterface) UserzClient
type UserzServer ¶
type UserzServer interface { Add(context.Context, *AddRequest) (*AddResponse, error) Update(context.Context, *UpdateRequest) (*UpdateResponse, error) Remove(context.Context, *RemoveRequest) (*RemoveResponse, error) List(*ListRequest, Userz_ListServer) error // contains filtered or unexported methods }
UserzServer is the server API for Userz service. All implementations must embed UnimplementedUserzServer for forward compatibility
func NewUserzServiceServer ¶
func NewUserzServiceServer(store userz.Store) UserzServer
type Userz_ListClient ¶
type Userz_ListClient interface { Recv() (*ListResponse, error) grpc.ClientStream }
type Userz_ListServer ¶
type Userz_ListServer interface { Send(*ListResponse) error grpc.ServerStream }