v1

package
v0.0.0-...-52a3571 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Auth_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.auth.v1.Auth",
	HandlerType: (*AuthServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Register",
			Handler:    _Auth_Register_Handler,
		},
		{
			MethodName: "Login",
			Handler:    _Auth_Login_Handler,
		},
		{
			MethodName: "CurrentUser",
			Handler:    _Auth_CurrentUser_Handler,
		},
		{
			MethodName: "ListAuth",
			Handler:    _Auth_ListAuth_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "auth/v1/auth.proto",
}

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

View Source
var File_auth_v1_auth_proto protoreflect.FileDescriptor

Functions

func RegisterAuthHTTPServer

func RegisterAuthHTTPServer(s *http.Server, srv AuthHTTPServer)

func RegisterAuthServer

func RegisterAuthServer(s grpc.ServiceRegistrar, srv AuthServer)

Types

type AuthClient

type AuthClient interface {
	Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterReply, error)
	Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginReply, error)
	CurrentUser(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*CurrentUserReply, error)
	ListAuth(ctx context.Context, in *ListAuthRequest, opts ...grpc.CallOption) (*ListAuthReply, error)
}

AuthClient is the client API for Auth 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 NewAuthClient

func NewAuthClient(cc grpc.ClientConnInterface) AuthClient

type AuthHTTPClient

type AuthHTTPClient interface {
	CurrentUser(ctx context.Context, req *emptypb.Empty, opts ...http.CallOption) (rsp *CurrentUserReply, err error)
	Login(ctx context.Context, req *LoginRequest, opts ...http.CallOption) (rsp *LoginReply, err error)
	Register(ctx context.Context, req *RegisterRequest, opts ...http.CallOption) (rsp *RegisterReply, err error)
}

func NewAuthHTTPClient

func NewAuthHTTPClient(client *http.Client) AuthHTTPClient

type AuthHTTPClientImpl

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

func (*AuthHTTPClientImpl) CurrentUser

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

func (*AuthHTTPClientImpl) Login

func (*AuthHTTPClientImpl) Register

type AuthHTTPServer

type AuthHTTPServer interface {
	CurrentUser(context.Context, *emptypb.Empty) (*CurrentUserReply, error)
	Login(context.Context, *LoginRequest) (*LoginReply, error)
	Register(context.Context, *RegisterRequest) (*RegisterReply, error)
}

type AuthServer

type AuthServer interface {
	Register(context.Context, *RegisterRequest) (*RegisterReply, error)
	Login(context.Context, *LoginRequest) (*LoginReply, error)
	CurrentUser(context.Context, *emptypb.Empty) (*CurrentUserReply, error)
	ListAuth(context.Context, *ListAuthRequest) (*ListAuthReply, error)
	// contains filtered or unexported methods
}

AuthServer is the server API for Auth service. All implementations must embed UnimplementedAuthServer for forward compatibility

type CurrentUserReply

type CurrentUserReply struct {
	User    *proto.UserProto `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	Expired int64            `protobuf:"varint,2,opt,name=expired,proto3" json:"expired,omitempty"`
	// contains filtered or unexported fields
}

func (*CurrentUserReply) Descriptor deprecated

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

Deprecated: Use CurrentUserReply.ProtoReflect.Descriptor instead.

func (*CurrentUserReply) GetExpired

func (x *CurrentUserReply) GetExpired() int64

func (*CurrentUserReply) GetUser

func (x *CurrentUserReply) GetUser() *proto.UserProto

func (*CurrentUserReply) ProtoMessage

func (*CurrentUserReply) ProtoMessage()

func (*CurrentUserReply) ProtoReflect

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

func (*CurrentUserReply) Reset

func (x *CurrentUserReply) Reset()

func (*CurrentUserReply) String

func (x *CurrentUserReply) String() string

type CurrentUserRequest

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

func (*CurrentUserRequest) Descriptor deprecated

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

Deprecated: Use CurrentUserRequest.ProtoReflect.Descriptor instead.

func (*CurrentUserRequest) ProtoMessage

func (*CurrentUserRequest) ProtoMessage()

func (*CurrentUserRequest) ProtoReflect

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

func (*CurrentUserRequest) Reset

func (x *CurrentUserRequest) Reset()

func (*CurrentUserRequest) String

func (x *CurrentUserRequest) String() string

type DeleteAuthReply

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

func (*DeleteAuthReply) Descriptor deprecated

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

Deprecated: Use DeleteAuthReply.ProtoReflect.Descriptor instead.

func (*DeleteAuthReply) ProtoMessage

func (*DeleteAuthReply) ProtoMessage()

func (*DeleteAuthReply) ProtoReflect

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

func (*DeleteAuthReply) Reset

func (x *DeleteAuthReply) Reset()

func (*DeleteAuthReply) String

func (x *DeleteAuthReply) String() string

type DeleteAuthRequest

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

func (*DeleteAuthRequest) Descriptor deprecated

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

Deprecated: Use DeleteAuthRequest.ProtoReflect.Descriptor instead.

func (*DeleteAuthRequest) ProtoMessage

func (*DeleteAuthRequest) ProtoMessage()

func (*DeleteAuthRequest) ProtoReflect

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

func (*DeleteAuthRequest) Reset

func (x *DeleteAuthRequest) Reset()

func (*DeleteAuthRequest) String

func (x *DeleteAuthRequest) String() string

type ListAuthReply

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

func (*ListAuthReply) Descriptor deprecated

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

Deprecated: Use ListAuthReply.ProtoReflect.Descriptor instead.

func (*ListAuthReply) ProtoMessage

func (*ListAuthReply) ProtoMessage()

func (*ListAuthReply) ProtoReflect

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

func (*ListAuthReply) Reset

func (x *ListAuthReply) Reset()

func (*ListAuthReply) String

func (x *ListAuthReply) String() string

type ListAuthRequest

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

func (*ListAuthRequest) Descriptor deprecated

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

Deprecated: Use ListAuthRequest.ProtoReflect.Descriptor instead.

func (*ListAuthRequest) ProtoMessage

func (*ListAuthRequest) ProtoMessage()

func (*ListAuthRequest) ProtoReflect

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

func (*ListAuthRequest) Reset

func (x *ListAuthRequest) Reset()

func (*ListAuthRequest) String

func (x *ListAuthRequest) String() string

type LoginReply

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

func (*LoginReply) Descriptor deprecated

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

Deprecated: Use LoginReply.ProtoReflect.Descriptor instead.

func (*LoginReply) ProtoMessage

func (*LoginReply) ProtoMessage()

func (*LoginReply) ProtoReflect

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

func (*LoginReply) Reset

func (x *LoginReply) Reset()

func (*LoginReply) String

func (x *LoginReply) String() string

type LoginRequest

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

func (*LoginRequest) Descriptor deprecated

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

Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.

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 RegisterReply

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

func (*RegisterReply) Descriptor deprecated

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

Deprecated: Use RegisterReply.ProtoReflect.Descriptor instead.

func (*RegisterReply) ProtoMessage

func (*RegisterReply) ProtoMessage()

func (*RegisterReply) ProtoReflect

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

func (*RegisterReply) Reset

func (x *RegisterReply) Reset()

func (*RegisterReply) String

func (x *RegisterReply) String() string

type RegisterRequest

type RegisterRequest struct {
	Payload *proto.UserProto `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
	// contains filtered or unexported fields
}

func (*RegisterRequest) Descriptor deprecated

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

Deprecated: Use RegisterRequest.ProtoReflect.Descriptor instead.

func (*RegisterRequest) GetPayload

func (x *RegisterRequest) GetPayload() *proto.UserProto

func (*RegisterRequest) ProtoMessage

func (*RegisterRequest) ProtoMessage()

func (*RegisterRequest) ProtoReflect

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

func (*RegisterRequest) Reset

func (x *RegisterRequest) Reset()

func (*RegisterRequest) String

func (x *RegisterRequest) String() string

type UnimplementedAuthServer

type UnimplementedAuthServer struct {
}

UnimplementedAuthServer must be embedded to have forward compatible implementations.

func (UnimplementedAuthServer) CurrentUser

func (UnimplementedAuthServer) ListAuth

func (UnimplementedAuthServer) Login

func (UnimplementedAuthServer) Register

type UnsafeAuthServer

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

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

Jump to

Keyboard shortcuts

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