v1alpha1

package
v0.0.0-...-cccdc27 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserInterface_SignIn_FullMethodName      = "/user.v1alpha1.UserInterface/SignIn"
	UserInterface_SignOut_FullMethodName     = "/user.v1alpha1.UserInterface/SignOut"
	UserInterface_GetUserInfo_FullMethodName = "/user.v1alpha1.UserInterface/GetUserInfo"
)
View Source
const OperationUserInterfaceGetUserInfo = "/user.v1alpha1.UserInterface/GetUserInfo"
View Source
const OperationUserInterfaceSignIn = "/user.v1alpha1.UserInterface/SignIn"
View Source
const OperationUserInterfaceSignOut = "/user.v1alpha1.UserInterface/SignOut"

Variables

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

Enum value maps for ErrorReason.

View Source
var File_api_user_v1alpha1_error_reason_proto protoreflect.FileDescriptor
View Source
var File_api_user_v1alpha1_message_proto protoreflect.FileDescriptor
View Source
var File_api_user_v1alpha1_user_proto protoreflect.FileDescriptor
View Source
var UserInterface_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "user.v1alpha1.UserInterface",
	HandlerType: (*UserInterfaceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SignIn",
			Handler:    _UserInterface_SignIn_Handler,
		},
		{
			MethodName: "SignOut",
			Handler:    _UserInterface_SignOut_Handler,
		},
		{
			MethodName: "GetUserInfo",
			Handler:    _UserInterface_GetUserInfo_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/user/v1alpha1/user.proto",
}

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

Functions

func RegisterUserInterfaceHTTPServer

func RegisterUserInterfaceHTTPServer(s *http.Server, srv UserInterfaceHTTPServer)

func RegisterUserInterfaceServer

func RegisterUserInterfaceServer(s grpc.ServiceRegistrar, srv UserInterfaceServer)

Types

type ErrorReason

type ErrorReason int32
const (
	ErrorReason_SUCCEED ErrorReason = 0
	ErrorReason_FAILED  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 Msg

type Msg struct {
	Reason  ErrorReason `protobuf:"varint,1,opt,name=Reason,proto3,enum=user.v1alpha1.ErrorReason" json:"Reason,omitempty"`
	Message string      `protobuf:"bytes,2,opt,name=Message,proto3" json:"Message,omitempty"`
	// contains filtered or unexported fields
}

func (*Msg) Descriptor deprecated

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

Deprecated: Use Msg.ProtoReflect.Descriptor instead.

func (*Msg) GetMessage

func (x *Msg) GetMessage() string

func (*Msg) GetReason

func (x *Msg) GetReason() ErrorReason

func (*Msg) ProtoMessage

func (*Msg) ProtoMessage()

func (*Msg) ProtoReflect

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

func (*Msg) Reset

func (x *Msg) Reset()

func (*Msg) String

func (x *Msg) String() string

type SignIn

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

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

Deprecated: Use SignIn.ProtoReflect.Descriptor instead.

func (*SignIn) GetEmail

func (x *SignIn) GetEmail() string

func (*SignIn) GetPassword

func (x *SignIn) GetPassword() string

func (*SignIn) ProtoMessage

func (*SignIn) ProtoMessage()

func (*SignIn) ProtoReflect

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

func (*SignIn) Reset

func (x *SignIn) Reset()

func (*SignIn) String

func (x *SignIn) String() string

type UnimplementedUserInterfaceServer

type UnimplementedUserInterfaceServer struct {
}

UnimplementedUserInterfaceServer must be embedded to have forward compatible implementations.

func (UnimplementedUserInterfaceServer) GetUserInfo

func (UnimplementedUserInterfaceServer) SignIn

func (UnimplementedUserInterfaceServer) SignOut

type UnsafeUserInterfaceServer

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

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

type User

type User struct {
	Id       int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	Email    string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
	Token    string `protobuf:"bytes,4,opt,name=token,proto3" json:"token,omitempty"`
	ExpHour  int32  `protobuf:"varint,5,opt,name=exp_hour,json=expHour,proto3" json:"exp_hour,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) GetExpHour

func (x *User) GetExpHour() int32

func (*User) GetId

func (x *User) GetId() int64

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 UserInterfaceClient

type UserInterfaceClient interface {
	SignIn(ctx context.Context, in *SignIn, opts ...grpc.CallOption) (*User, error)
	SignOut(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Msg, error)
	GetUserInfo(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*User, error)
}

UserInterfaceClient is the client API for UserInterface 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 UserInterfaceHTTPClient

type UserInterfaceHTTPClient interface {
	GetUserInfo(ctx context.Context, req *emptypb.Empty, opts ...http.CallOption) (rsp *User, err error)
	SignIn(ctx context.Context, req *SignIn, opts ...http.CallOption) (rsp *User, err error)
	SignOut(ctx context.Context, req *emptypb.Empty, opts ...http.CallOption) (rsp *Msg, err error)
}

func NewUserInterfaceHTTPClient

func NewUserInterfaceHTTPClient(client *http.Client) UserInterfaceHTTPClient

type UserInterfaceHTTPClientImpl

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

func (*UserInterfaceHTTPClientImpl) GetUserInfo

func (c *UserInterfaceHTTPClientImpl) GetUserInfo(ctx context.Context, in *emptypb.Empty, opts ...http.CallOption) (*User, error)

func (*UserInterfaceHTTPClientImpl) SignIn

func (c *UserInterfaceHTTPClientImpl) SignIn(ctx context.Context, in *SignIn, opts ...http.CallOption) (*User, error)

func (*UserInterfaceHTTPClientImpl) SignOut

func (c *UserInterfaceHTTPClientImpl) SignOut(ctx context.Context, in *emptypb.Empty, opts ...http.CallOption) (*Msg, error)

type UserInterfaceHTTPServer

type UserInterfaceHTTPServer interface {
	GetUserInfo(context.Context, *emptypb.Empty) (*User, error)
	SignIn(context.Context, *SignIn) (*User, error)
	SignOut(context.Context, *emptypb.Empty) (*Msg, error)
}

type UserInterfaceServer

type UserInterfaceServer interface {
	SignIn(context.Context, *SignIn) (*User, error)
	SignOut(context.Context, *emptypb.Empty) (*Msg, error)
	GetUserInfo(context.Context, *emptypb.Empty) (*User, error)
	// contains filtered or unexported methods
}

UserInterfaceServer is the server API for UserInterface service. All implementations must embed UnimplementedUserInterfaceServer for forward compatibility

Jump to

Keyboard shortcuts

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