v1

package
v0.0.0-...-b88f85f Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const OperationRealWorldCurrentUser = "/realworld.v1.RealWorld/CurrentUser"
View Source
const OperationRealWorldLogin = "/realworld.v1.RealWorld/Login"
View Source
const OperationRealWorldRegistration = "/realworld.v1.RealWorld/Registration"
View Source
const OperationRealWorldSayHello = "/realworld.v1.RealWorld/SayHello"
View Source
const OperationRealWorldUpdateUser = "/realworld.v1.RealWorld/UpdateUser"

Variables

View Source
var (
	ErrorReason_name = map[int32]string{
		0: "GEETER_UNSPECIFIED",
		1: "USER_NOT_FOUND",
	}
	ErrorReason_value = map[string]int32{
		"GEETER_UNSPECIFIED": 0,
		"USER_NOT_FOUND":     1,
	}
)

Enum value maps for ErrorReason.

View Source
var File_realworld_v1_error_reason_proto protoreflect.FileDescriptor
View Source
var File_realworld_v1_realworld_proto protoreflect.FileDescriptor
View Source
var RealWorld_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "realworld.v1.RealWorld",
	HandlerType: (*RealWorldServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SayHello",
			Handler:    _RealWorld_SayHello_Handler,
		},
		{
			MethodName: "Login",
			Handler:    _RealWorld_Login_Handler,
		},
		{
			MethodName: "Registration",
			Handler:    _RealWorld_Registration_Handler,
		},
		{
			MethodName: "CurrentUser",
			Handler:    _RealWorld_CurrentUser_Handler,
		},
		{
			MethodName: "UpdateUser",
			Handler:    _RealWorld_UpdateUser_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "realworld/v1/realworld.proto",
}

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

Functions

func RegisterRealWorldHTTPServer

func RegisterRealWorldHTTPServer(s *http.Server, srv RealWorldHTTPServer)

func RegisterRealWorldServer

func RegisterRealWorldServer(s grpc.ServiceRegistrar, srv RealWorldServer)

Types

type ErrorReason

type ErrorReason int32
const (
	ErrorReason_GEETER_UNSPECIFIED ErrorReason = 0
	ErrorReason_USER_NOT_FOUND     ErrorReason = 1
)

func (ErrorReason) Descriptor

func (ErrorReason) Enum

func (x ErrorReason) Enum() *ErrorReason

func (ErrorReason) EnumDescriptor deprecated

func (ErrorReason) EnumDescriptor() ([]byte, []int)

Deprecated: Use ErrorReason.Descriptor instead.

func (ErrorReason) Number

func (x ErrorReason) Number() protoreflect.EnumNumber

func (ErrorReason) String

func (x ErrorReason) String() string

func (ErrorReason) Type

type HelloReply

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

The response message containing the greetings

func (*HelloReply) Descriptor deprecated

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

Deprecated: Use HelloReply.ProtoReflect.Descriptor instead.

func (*HelloReply) GetMessage

func (x *HelloReply) GetMessage() string

func (*HelloReply) ProtoMessage

func (*HelloReply) ProtoMessage()

func (*HelloReply) ProtoReflect

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

func (*HelloReply) Reset

func (x *HelloReply) Reset()

func (*HelloReply) String

func (x *HelloReply) String() string

type HelloRequest

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

The request message containing the user's name.

func (*HelloRequest) Descriptor deprecated

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

Deprecated: Use HelloRequest.ProtoReflect.Descriptor instead.

func (*HelloRequest) GetName

func (x *HelloRequest) GetName() string

func (*HelloRequest) ProtoMessage

func (*HelloRequest) ProtoMessage()

func (*HelloRequest) ProtoReflect

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

func (*HelloRequest) Reset

func (x *HelloRequest) Reset()

func (*HelloRequest) String

func (x *HelloRequest) String() string

type LoginRequest

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

func (*LoginRequest) Descriptor deprecated

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

Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.

func (*LoginRequest) GetUser

func (x *LoginRequest) GetUser() *LoginRequest_User

func (*LoginRequest) ProtoMessage

func (*LoginRequest) ProtoMessage()

func (*LoginRequest) ProtoReflect

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

func (*LoginRequest) Reset

func (x *LoginRequest) Reset()

func (*LoginRequest) String

func (x *LoginRequest) String() string

type LoginRequest_User

type LoginRequest_User 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 (*LoginRequest_User) Descriptor deprecated

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

Deprecated: Use LoginRequest_User.ProtoReflect.Descriptor instead.

func (*LoginRequest_User) GetEmail

func (x *LoginRequest_User) GetEmail() string

func (*LoginRequest_User) GetPassword

func (x *LoginRequest_User) GetPassword() string

func (*LoginRequest_User) ProtoMessage

func (*LoginRequest_User) ProtoMessage()

func (*LoginRequest_User) ProtoReflect

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

func (*LoginRequest_User) Reset

func (x *LoginRequest_User) Reset()

func (*LoginRequest_User) String

func (x *LoginRequest_User) String() string

type RealWorldClient

type RealWorldClient interface {
	// Sends a greeting
	SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error)
	Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*UserResponse, error)
	Registration(ctx context.Context, in *RegistrationRequest, opts ...grpc.CallOption) (*UserResponse, error)
	CurrentUser(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*UserResponse, error)
	UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*UserResponse, error)
}

RealWorldClient is the client API for RealWorld 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 NewRealWorldClient

func NewRealWorldClient(cc grpc.ClientConnInterface) RealWorldClient

type RealWorldHTTPClient

type RealWorldHTTPClient interface {
	CurrentUser(ctx context.Context, req *emptypb.Empty, opts ...http.CallOption) (rsp *UserResponse, err error)
	Login(ctx context.Context, req *LoginRequest, opts ...http.CallOption) (rsp *UserResponse, err error)
	Registration(ctx context.Context, req *RegistrationRequest, opts ...http.CallOption) (rsp *UserResponse, err error)
	SayHello(ctx context.Context, req *HelloRequest, opts ...http.CallOption) (rsp *HelloReply, err error)
	UpdateUser(ctx context.Context, req *UpdateUserRequest, opts ...http.CallOption) (rsp *UserResponse, err error)
}

func NewRealWorldHTTPClient

func NewRealWorldHTTPClient(client *http.Client) RealWorldHTTPClient

type RealWorldHTTPClientImpl

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

func (*RealWorldHTTPClientImpl) CurrentUser

func (c *RealWorldHTTPClientImpl) CurrentUser(ctx context.Context, in *emptypb.Empty, opts ...http.CallOption) (*UserResponse, error)

func (*RealWorldHTTPClientImpl) Login

func (*RealWorldHTTPClientImpl) Registration

func (*RealWorldHTTPClientImpl) SayHello

func (*RealWorldHTTPClientImpl) UpdateUser

type RealWorldServer

type RealWorldServer interface {
	// Sends a greeting
	SayHello(context.Context, *HelloRequest) (*HelloReply, error)
	Login(context.Context, *LoginRequest) (*UserResponse, error)
	Registration(context.Context, *RegistrationRequest) (*UserResponse, error)
	CurrentUser(context.Context, *emptypb.Empty) (*UserResponse, error)
	UpdateUser(context.Context, *UpdateUserRequest) (*UserResponse, error)
	// contains filtered or unexported methods
}

RealWorldServer is the server API for RealWorld service. All implementations must embed UnimplementedRealWorldServer for forward compatibility

type RegistrationRequest

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

func (*RegistrationRequest) Descriptor deprecated

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

Deprecated: Use RegistrationRequest.ProtoReflect.Descriptor instead.

func (*RegistrationRequest) GetUser

func (*RegistrationRequest) ProtoMessage

func (*RegistrationRequest) ProtoMessage()

func (*RegistrationRequest) ProtoReflect

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

func (*RegistrationRequest) Reset

func (x *RegistrationRequest) Reset()

func (*RegistrationRequest) String

func (x *RegistrationRequest) String() string

type RegistrationRequest_User

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

func (*RegistrationRequest_User) Descriptor deprecated

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

Deprecated: Use RegistrationRequest_User.ProtoReflect.Descriptor instead.

func (*RegistrationRequest_User) GetEmail

func (x *RegistrationRequest_User) GetEmail() string

func (*RegistrationRequest_User) GetPassword

func (x *RegistrationRequest_User) GetPassword() string

func (*RegistrationRequest_User) GetUsername

func (x *RegistrationRequest_User) GetUsername() string

func (*RegistrationRequest_User) ProtoMessage

func (*RegistrationRequest_User) ProtoMessage()

func (*RegistrationRequest_User) ProtoReflect

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

func (*RegistrationRequest_User) Reset

func (x *RegistrationRequest_User) Reset()

func (*RegistrationRequest_User) String

func (x *RegistrationRequest_User) String() string

type UnimplementedRealWorldServer

type UnimplementedRealWorldServer struct {
}

UnimplementedRealWorldServer must be embedded to have forward compatible implementations.

func (UnimplementedRealWorldServer) CurrentUser

func (UnimplementedRealWorldServer) Login

func (UnimplementedRealWorldServer) Registration

func (UnimplementedRealWorldServer) SayHello

func (UnimplementedRealWorldServer) UpdateUser

type UnsafeRealWorldServer

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

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

type UpdateUserRequest

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

func (*UpdateUserRequest) Descriptor deprecated

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

Deprecated: Use UpdateUserRequest.ProtoReflect.Descriptor instead.

func (*UpdateUserRequest) GetUser

func (*UpdateUserRequest) ProtoMessage

func (*UpdateUserRequest) ProtoMessage()

func (*UpdateUserRequest) ProtoReflect

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

func (*UpdateUserRequest) Reset

func (x *UpdateUserRequest) Reset()

func (*UpdateUserRequest) String

func (x *UpdateUserRequest) String() string

type UpdateUserRequest_User

type UpdateUserRequest_User struct {
	Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	Bio   string `protobuf:"bytes,2,opt,name=bio,proto3" json:"bio,omitempty"`
	Image string `protobuf:"bytes,3,opt,name=image,proto3" json:"image,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateUserRequest_User) Descriptor deprecated

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

Deprecated: Use UpdateUserRequest_User.ProtoReflect.Descriptor instead.

func (*UpdateUserRequest_User) GetBio

func (x *UpdateUserRequest_User) GetBio() string

func (*UpdateUserRequest_User) GetEmail

func (x *UpdateUserRequest_User) GetEmail() string

func (*UpdateUserRequest_User) GetImage

func (x *UpdateUserRequest_User) GetImage() string

func (*UpdateUserRequest_User) ProtoMessage

func (*UpdateUserRequest_User) ProtoMessage()

func (*UpdateUserRequest_User) ProtoReflect

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

func (*UpdateUserRequest_User) Reset

func (x *UpdateUserRequest_User) Reset()

func (*UpdateUserRequest_User) String

func (x *UpdateUserRequest_User) String() string

type User

type User struct {
	Email    string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	Token    string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
	Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"`
	Bio      string `protobuf:"bytes,4,opt,name=bio,proto3" json:"bio,omitempty"`
	Image    string `protobuf:"bytes,5,opt,name=image,proto3" json:"image,omitempty"`
	// contains filtered or unexported fields
}

func (*User) Descriptor deprecated

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetBio

func (x *User) GetBio() string

func (*User) GetEmail

func (x *User) GetEmail() string

func (*User) GetImage

func (x *User) GetImage() string

func (*User) GetToken

func (x *User) GetToken() 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

type UserResponse

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

func (*UserResponse) Descriptor deprecated

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

Deprecated: Use UserResponse.ProtoReflect.Descriptor instead.

func (*UserResponse) GetUser

func (x *UserResponse) GetUser() *User

func (*UserResponse) ProtoMessage

func (*UserResponse) ProtoMessage()

func (*UserResponse) ProtoReflect

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

func (*UserResponse) Reset

func (x *UserResponse) Reset()

func (*UserResponse) String

func (x *UserResponse) String() string

Jump to

Keyboard shortcuts

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