signupv1

package
v0.0.0-...-a6aec48 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package signupv1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_signup_service_proto protoreflect.FileDescriptor
View Source
var File_users_message_proto protoreflect.FileDescriptor
View Source
var SignupService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "SignupService",
	HandlerType: (*SignupServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Signup",
			Handler:    _SignupService_Signup_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "signup_service.proto",
}

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

Functions

func RegisterSignupServiceHandler

func RegisterSignupServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterSignupServiceHandler registers the http handlers for service SignupService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterSignupServiceHandlerClient

func RegisterSignupServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SignupServiceClient) error

RegisterSignupServiceHandlerClient registers the http handlers for service SignupService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SignupServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SignupServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "SignupServiceClient" to call the correct interceptors.

func RegisterSignupServiceHandlerFromEndpoint

func RegisterSignupServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterSignupServiceHandlerFromEndpoint is same as RegisterSignupServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterSignupServiceHandlerServer

func RegisterSignupServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SignupServiceServer) error

RegisterSignupServiceHandlerServer registers the http handlers for service SignupService to "mux". UnaryRPC :call SignupServiceServer 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 RegisterSignupServiceHandlerFromEndpoint instead.

func RegisterSignupServiceServer

func RegisterSignupServiceServer(s grpc.ServiceRegistrar, srv SignupServiceServer)

Types

type SignupRequest

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

func (*SignupRequest) Descriptor deprecated

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

Deprecated: Use SignupRequest.ProtoReflect.Descriptor instead.

func (*SignupRequest) GetUser

func (x *SignupRequest) GetUser() *User

func (*SignupRequest) ProtoMessage

func (*SignupRequest) ProtoMessage()

func (*SignupRequest) ProtoReflect

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

func (*SignupRequest) Reset

func (x *SignupRequest) Reset()

func (*SignupRequest) String

func (x *SignupRequest) String() string

type SignupResponse

type SignupResponse struct {
	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	// contains filtered or unexported fields
}

func (*SignupResponse) Descriptor deprecated

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

Deprecated: Use SignupResponse.ProtoReflect.Descriptor instead.

func (*SignupResponse) GetToken

func (x *SignupResponse) GetToken() string

func (*SignupResponse) ProtoMessage

func (*SignupResponse) ProtoMessage()

func (*SignupResponse) ProtoReflect

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

func (*SignupResponse) Reset

func (x *SignupResponse) Reset()

func (*SignupResponse) String

func (x *SignupResponse) String() string

type SignupServiceClient

type SignupServiceClient interface {
	Signup(ctx context.Context, in *SignupRequest, opts ...grpc.CallOption) (*SignupResponse, error)
}

SignupServiceClient is the client API for SignupService 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 SignupServiceServer

type SignupServiceServer interface {
	Signup(context.Context, *SignupRequest) (*SignupResponse, error)
	// contains filtered or unexported methods
}

SignupServiceServer is the server API for SignupService service. All implementations must embed UnimplementedSignupServiceServer for forward compatibility

type UnimplementedSignupServiceServer

type UnimplementedSignupServiceServer struct {
}

UnimplementedSignupServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedSignupServiceServer) Signup

type UnsafeSignupServiceServer

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

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

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" json:"first_name,omitempty"`
	LastName  string `protobuf:"bytes,3,opt,name=last_name,json=lastName,proto3" json:"last_name,omitempty"`
	Username  string `protobuf:"bytes,4,opt,name=username,proto3" json:"username,omitempty"`
	Email     string `protobuf:"bytes,5,opt,name=email,proto3" json:"email,omitempty"`
	Password  string `protobuf:"bytes,7,opt,name=password,proto3" json:"password,omitempty"`
	Role      string `protobuf:"bytes,8,opt,name=role,proto3" json:"role,omitempty"`
	// contains filtered or unexported fields
}

func (*User) Descriptor deprecated

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetEmail

func (x *User) GetEmail() string

func (*User) GetFirstName

func (x *User) GetFirstName() string

func (*User) GetId

func (x *User) GetId() string

func (*User) GetLastName

func (x *User) GetLastName() string

func (*User) GetPassword

func (x *User) GetPassword() string

func (*User) GetRole

func (x *User) GetRole() string

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

Jump to

Keyboard shortcuts

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