usersv1

package
v0.0.0-...-59c490d Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package usersv1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	UserService_Signup_FullMethodName  = "/users.v1.UserService/Signup"
	UserService_Current_FullMethodName = "/users.v1.UserService/Current"
)

Variables

View Source
var File_users_v1_service_proto protoreflect.FileDescriptor
View Source
var UserService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "users.v1.UserService",
	HandlerType: (*UserServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Signup",
			Handler:    _UserService_Signup_Handler,
		},
		{
			MethodName: "Current",
			Handler:    _UserService_Current_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "users/v1/service.proto",
}

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

Functions

func RegisterUserServiceHandler

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

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

func RegisterUserServiceHandlerClient

func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UserServiceClient) error

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

func RegisterUserServiceHandlerFromEndpoint

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

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

func RegisterUserServiceHandlerServer

func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UserServiceServer) error

RegisterUserServiceHandlerServer registers the http handlers for service UserService to "mux". UnaryRPC :call UserServiceServer 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 RegisterUserServiceHandlerFromEndpoint instead.

func RegisterUserServiceServer

func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)

Types

type CurrentRequest

type CurrentRequest struct {
	// contains filtered or unexported fields
}

func (*CurrentRequest) Descriptor deprecated

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

Deprecated: Use CurrentRequest.ProtoReflect.Descriptor instead.

func (*CurrentRequest) ProtoMessage

func (*CurrentRequest) ProtoMessage()

func (*CurrentRequest) ProtoReflect

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

func (*CurrentRequest) Reset

func (x *CurrentRequest) Reset()

func (*CurrentRequest) String

func (x *CurrentRequest) String() string

type CurrentResponse

type CurrentResponse struct {
	Subject             string `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"`
	Name                string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	GivenName           string `protobuf:"bytes,3,opt,name=given_name,json=givenName,proto3" json:"given_name,omitempty"`
	FamilyName          string `protobuf:"bytes,4,opt,name=family_name,json=familyName,proto3" json:"family_name,omitempty"`
	MiddleName          string `protobuf:"bytes,5,opt,name=middle_name,json=middleName,proto3" json:"middle_name,omitempty"`
	Nickname            string `protobuf:"bytes,6,opt,name=nickname,proto3" json:"nickname,omitempty"`
	PreferredUsername   string `protobuf:"bytes,7,opt,name=preferred_username,json=preferredUsername,proto3" json:"preferred_username,omitempty"`
	Profile             string `protobuf:"bytes,8,opt,name=profile,proto3" json:"profile,omitempty"`
	Picture             string `protobuf:"bytes,9,opt,name=picture,proto3" json:"picture,omitempty"`
	Website             string `protobuf:"bytes,10,opt,name=website,proto3" json:"website,omitempty"`
	Email               string `protobuf:"bytes,11,opt,name=email,proto3" json:"email,omitempty"`
	EmailVerified       bool   `protobuf:"varint,12,opt,name=email_verified,json=emailVerified,proto3" json:"email_verified,omitempty"`
	Gender              string `protobuf:"bytes,13,opt,name=gender,proto3" json:"gender,omitempty"`
	Birthdate           string `protobuf:"bytes,14,opt,name=birthdate,proto3" json:"birthdate,omitempty"`
	Zoneinfo            string `protobuf:"bytes,15,opt,name=zoneinfo,proto3" json:"zoneinfo,omitempty"`
	Locale              string `protobuf:"bytes,16,opt,name=locale,proto3" json:"locale,omitempty"`
	PhoneNumber         string `protobuf:"bytes,17,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"`
	PhoneNumberVerified bool   `protobuf:"varint,18,opt,name=phone_number_verified,json=phoneNumberVerified,proto3" json:"phone_number_verified,omitempty"`
	UpdatedAt           int32  `protobuf:"varint,19,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

func (*CurrentResponse) Descriptor deprecated

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

Deprecated: Use CurrentResponse.ProtoReflect.Descriptor instead.

func (*CurrentResponse) GetBirthdate

func (x *CurrentResponse) GetBirthdate() string

func (*CurrentResponse) GetEmail

func (x *CurrentResponse) GetEmail() string

func (*CurrentResponse) GetEmailVerified

func (x *CurrentResponse) GetEmailVerified() bool

func (*CurrentResponse) GetFamilyName

func (x *CurrentResponse) GetFamilyName() string

func (*CurrentResponse) GetGender

func (x *CurrentResponse) GetGender() string

func (*CurrentResponse) GetGivenName

func (x *CurrentResponse) GetGivenName() string

func (*CurrentResponse) GetLocale

func (x *CurrentResponse) GetLocale() string

func (*CurrentResponse) GetMiddleName

func (x *CurrentResponse) GetMiddleName() string

func (*CurrentResponse) GetName

func (x *CurrentResponse) GetName() string

func (*CurrentResponse) GetNickname

func (x *CurrentResponse) GetNickname() string

func (*CurrentResponse) GetPhoneNumber

func (x *CurrentResponse) GetPhoneNumber() string

func (*CurrentResponse) GetPhoneNumberVerified

func (x *CurrentResponse) GetPhoneNumberVerified() bool

func (*CurrentResponse) GetPicture

func (x *CurrentResponse) GetPicture() string

func (*CurrentResponse) GetPreferredUsername

func (x *CurrentResponse) GetPreferredUsername() string

func (*CurrentResponse) GetProfile

func (x *CurrentResponse) GetProfile() string

func (*CurrentResponse) GetSubject

func (x *CurrentResponse) GetSubject() string

func (*CurrentResponse) GetUpdatedAt

func (x *CurrentResponse) GetUpdatedAt() int32

func (*CurrentResponse) GetWebsite

func (x *CurrentResponse) GetWebsite() string

func (*CurrentResponse) GetZoneinfo

func (x *CurrentResponse) GetZoneinfo() string

func (*CurrentResponse) ProtoMessage

func (*CurrentResponse) ProtoMessage()

func (*CurrentResponse) ProtoReflect

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

func (*CurrentResponse) Reset

func (x *CurrentResponse) Reset()

func (*CurrentResponse) String

func (x *CurrentResponse) String() string

type SignupRequest

type SignupRequest struct {
	Email    string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

func (*SignupRequest) Descriptor deprecated

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

Deprecated: Use SignupRequest.ProtoReflect.Descriptor instead.

func (*SignupRequest) GetEmail

func (x *SignupRequest) GetEmail() string

func (*SignupRequest) GetPassword

func (x *SignupRequest) GetPassword() string

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 {
	// contains filtered or unexported fields
}

func (*SignupResponse) Descriptor deprecated

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

Deprecated: Use SignupResponse.ProtoReflect.Descriptor instead.

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 UnimplementedUserServiceServer

type UnimplementedUserServiceServer struct {
}

UnimplementedUserServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedUserServiceServer) Current

func (UnimplementedUserServiceServer) Signup

type UnsafeUserServiceServer

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

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

type UserServiceClient

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

UserServiceClient is the client API for UserService 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 UserServiceServer

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

UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer for forward compatibility

Jump to

Keyboard shortcuts

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