Documentation ¶
Overview ¶
Package protos is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterProfilesServiceV1Handler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterProfilesServiceV1HandlerClient(ctx context.Context, mux *runtime.ServeMux, client ProfilesServiceV1Client) error
- func RegisterProfilesServiceV1HandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterProfilesServiceV1HandlerServer(ctx context.Context, mux *runtime.ServeMux, server ProfilesServiceV1Server) error
- func RegisterProfilesServiceV1Server(s grpc.ServiceRegistrar, srv ProfilesServiceV1Server)
- type GetEmailResponse
- type GetProfileResponse
- func (*GetProfileResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetProfileResponse) GetEmail() string
- func (x *GetProfileResponse) GetProfilePictureURL() string
- func (x *GetProfileResponse) GetRegistrationDate() *timestamppb.Timestamp
- func (x *GetProfileResponse) GetUsername() string
- func (*GetProfileResponse) ProtoMessage()
- func (x *GetProfileResponse) ProtoReflect() protoreflect.Message
- func (x *GetProfileResponse) Reset()
- func (x *GetProfileResponse) String() string
- type ProfilesServiceV1Client
- type ProfilesServiceV1Server
- type UnimplementedProfilesServiceV1Server
- func (UnimplementedProfilesServiceV1Server) DeleteProfilePicture(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
- func (UnimplementedProfilesServiceV1Server) GetEmail(context.Context, *emptypb.Empty) (*GetEmailResponse, error)
- func (UnimplementedProfilesServiceV1Server) GetProfile(context.Context, *emptypb.Empty) (*GetProfileResponse, error)
- func (UnimplementedProfilesServiceV1Server) UpdateProfilePicture(context.Context, *UpdateProfilePictureRequest) (*emptypb.Empty, error)
- type UnsafeProfilesServiceV1Server
- type UpdateProfilePictureRequest
- func (*UpdateProfilePictureRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateProfilePictureRequest) GetImage() []byte
- func (*UpdateProfilePictureRequest) ProtoMessage()
- func (x *UpdateProfilePictureRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateProfilePictureRequest) Reset()
- func (x *UpdateProfilePictureRequest) String() string
- type UserErrorMessage
Constants ¶
This section is empty.
Variables ¶
var File_profiles_service_v1_messages_proto protoreflect.FileDescriptor
var File_profiles_service_v1_proto protoreflect.FileDescriptor
var ProfilesServiceV1_ServiceDesc = grpc.ServiceDesc{ ServiceName: "profiles_service.profilesServiceV1", HandlerType: (*ProfilesServiceV1Server)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetProfile", Handler: _ProfilesServiceV1_GetProfile_Handler, }, { MethodName: "UpdateProfilePicture", Handler: _ProfilesServiceV1_UpdateProfilePicture_Handler, }, { MethodName: "DeleteProfilePicture", Handler: _ProfilesServiceV1_DeleteProfilePicture_Handler, }, { MethodName: "GetEmail", Handler: _ProfilesServiceV1_GetEmail_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "profiles_service_v1.proto", }
ProfilesServiceV1_ServiceDesc is the grpc.ServiceDesc for ProfilesServiceV1 service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterProfilesServiceV1Handler ¶
func RegisterProfilesServiceV1Handler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterProfilesServiceV1Handler registers the http handlers for service ProfilesServiceV1 to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterProfilesServiceV1HandlerClient ¶
func RegisterProfilesServiceV1HandlerClient(ctx context.Context, mux *runtime.ServeMux, client ProfilesServiceV1Client) error
RegisterProfilesServiceV1HandlerClient registers the http handlers for service ProfilesServiceV1 to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ProfilesServiceV1Client". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ProfilesServiceV1Client" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ProfilesServiceV1Client" to call the correct interceptors.
func RegisterProfilesServiceV1HandlerFromEndpoint ¶
func RegisterProfilesServiceV1HandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterProfilesServiceV1HandlerFromEndpoint is same as RegisterProfilesServiceV1Handler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterProfilesServiceV1HandlerServer ¶
func RegisterProfilesServiceV1HandlerServer(ctx context.Context, mux *runtime.ServeMux, server ProfilesServiceV1Server) error
RegisterProfilesServiceV1HandlerServer registers the http handlers for service ProfilesServiceV1 to "mux". UnaryRPC :call ProfilesServiceV1Server directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterProfilesServiceV1HandlerFromEndpoint instead.
func RegisterProfilesServiceV1Server ¶
func RegisterProfilesServiceV1Server(s grpc.ServiceRegistrar, srv ProfilesServiceV1Server)
Types ¶
type GetEmailResponse ¶
type GetEmailResponse struct { Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` // contains filtered or unexported fields }
func (*GetEmailResponse) Descriptor
deprecated
func (*GetEmailResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetEmailResponse.ProtoReflect.Descriptor instead.
func (*GetEmailResponse) GetEmail ¶
func (x *GetEmailResponse) GetEmail() string
func (*GetEmailResponse) ProtoMessage ¶
func (*GetEmailResponse) ProtoMessage()
func (*GetEmailResponse) ProtoReflect ¶
func (x *GetEmailResponse) ProtoReflect() protoreflect.Message
func (*GetEmailResponse) Reset ¶
func (x *GetEmailResponse) Reset()
func (*GetEmailResponse) String ¶
func (x *GetEmailResponse) String() string
type GetProfileResponse ¶
type GetProfileResponse struct { Username string `protobuf:"bytes,1,opt,name=Username,json=username,proto3" json:"Username,omitempty"` Email string `protobuf:"bytes,2,opt,name=Email,json=email,proto3" json:"Email,omitempty"` ProfilePictureURL string `protobuf:"bytes,3,opt,name=ProfilePictureURL,json=profile_picture_url,proto3" json:"ProfilePictureURL,omitempty"` RegistrationDate *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=RegistrationDate,json=registration_date,proto3" json:"RegistrationDate,omitempty"` // contains filtered or unexported fields }
func (*GetProfileResponse) Descriptor
deprecated
func (*GetProfileResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetProfileResponse.ProtoReflect.Descriptor instead.
func (*GetProfileResponse) GetEmail ¶
func (x *GetProfileResponse) GetEmail() string
func (*GetProfileResponse) GetProfilePictureURL ¶
func (x *GetProfileResponse) GetProfilePictureURL() string
func (*GetProfileResponse) GetRegistrationDate ¶
func (x *GetProfileResponse) GetRegistrationDate() *timestamppb.Timestamp
func (*GetProfileResponse) GetUsername ¶
func (x *GetProfileResponse) GetUsername() string
func (*GetProfileResponse) ProtoMessage ¶
func (*GetProfileResponse) ProtoMessage()
func (*GetProfileResponse) ProtoReflect ¶
func (x *GetProfileResponse) ProtoReflect() protoreflect.Message
func (*GetProfileResponse) Reset ¶
func (x *GetProfileResponse) Reset()
func (*GetProfileResponse) String ¶
func (x *GetProfileResponse) String() string
type ProfilesServiceV1Client ¶
type ProfilesServiceV1Client interface { GetProfile(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetProfileResponse, error) UpdateProfilePicture(ctx context.Context, in *UpdateProfilePictureRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) DeleteProfilePicture(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) GetEmail(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetEmailResponse, error) }
ProfilesServiceV1Client is the client API for ProfilesServiceV1 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 NewProfilesServiceV1Client ¶
func NewProfilesServiceV1Client(cc grpc.ClientConnInterface) ProfilesServiceV1Client
type ProfilesServiceV1Server ¶
type ProfilesServiceV1Server interface { GetProfile(context.Context, *emptypb.Empty) (*GetProfileResponse, error) UpdateProfilePicture(context.Context, *UpdateProfilePictureRequest) (*emptypb.Empty, error) DeleteProfilePicture(context.Context, *emptypb.Empty) (*emptypb.Empty, error) GetEmail(context.Context, *emptypb.Empty) (*GetEmailResponse, error) // contains filtered or unexported methods }
ProfilesServiceV1Server is the server API for ProfilesServiceV1 service. All implementations must embed UnimplementedProfilesServiceV1Server for forward compatibility
type UnimplementedProfilesServiceV1Server ¶
type UnimplementedProfilesServiceV1Server struct { }
UnimplementedProfilesServiceV1Server must be embedded to have forward compatible implementations.
func (UnimplementedProfilesServiceV1Server) DeleteProfilePicture ¶
func (UnimplementedProfilesServiceV1Server) GetEmail ¶
func (UnimplementedProfilesServiceV1Server) GetEmail(context.Context, *emptypb.Empty) (*GetEmailResponse, error)
func (UnimplementedProfilesServiceV1Server) GetProfile ¶
func (UnimplementedProfilesServiceV1Server) GetProfile(context.Context, *emptypb.Empty) (*GetProfileResponse, error)
func (UnimplementedProfilesServiceV1Server) UpdateProfilePicture ¶
func (UnimplementedProfilesServiceV1Server) UpdateProfilePicture(context.Context, *UpdateProfilePictureRequest) (*emptypb.Empty, error)
type UnsafeProfilesServiceV1Server ¶
type UnsafeProfilesServiceV1Server interface {
// contains filtered or unexported methods
}
UnsafeProfilesServiceV1Server may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ProfilesServiceV1Server will result in compilation errors.
type UpdateProfilePictureRequest ¶
type UpdateProfilePictureRequest struct { // Image file as bytes (supports base64 encoding) Image []byte `protobuf:"bytes,1,opt,name=image,proto3" json:"image,omitempty"` // contains filtered or unexported fields }
func (*UpdateProfilePictureRequest) Descriptor
deprecated
func (*UpdateProfilePictureRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateProfilePictureRequest.ProtoReflect.Descriptor instead.
func (*UpdateProfilePictureRequest) GetImage ¶
func (x *UpdateProfilePictureRequest) GetImage() []byte
func (*UpdateProfilePictureRequest) ProtoMessage ¶
func (*UpdateProfilePictureRequest) ProtoMessage()
func (*UpdateProfilePictureRequest) ProtoReflect ¶
func (x *UpdateProfilePictureRequest) ProtoReflect() protoreflect.Message
func (*UpdateProfilePictureRequest) Reset ¶
func (x *UpdateProfilePictureRequest) Reset()
func (*UpdateProfilePictureRequest) String ¶
func (x *UpdateProfilePictureRequest) String() string
type UserErrorMessage ¶
type UserErrorMessage struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*UserErrorMessage) Descriptor
deprecated
func (*UserErrorMessage) Descriptor() ([]byte, []int)
Deprecated: Use UserErrorMessage.ProtoReflect.Descriptor instead.
func (*UserErrorMessage) GetMessage ¶
func (x *UserErrorMessage) GetMessage() string
func (*UserErrorMessage) ProtoMessage ¶
func (*UserErrorMessage) ProtoMessage()
func (*UserErrorMessage) ProtoReflect ¶
func (x *UserErrorMessage) ProtoReflect() protoreflect.Message
func (*UserErrorMessage) Reset ¶
func (x *UserErrorMessage) Reset()
func (*UserErrorMessage) String ¶
func (x *UserErrorMessage) String() string