Documentation ¶
Overview ¶
Package stubs is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterAuthServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AuthServiceClient) error
- func RegisterAuthServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterAuthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AuthServiceServer) error
- func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer)
- type AuthBaseResponse
- func (*AuthBaseResponse) Descriptor() ([]byte, []int)deprecated
- func (x *AuthBaseResponse) GetData() *anypb.Any
- func (x *AuthBaseResponse) GetMessage() string
- func (x *AuthBaseResponse) GetPaging() *Paging
- func (*AuthBaseResponse) ProtoMessage()
- func (x *AuthBaseResponse) ProtoReflect() protoreflect.Message
- func (x *AuthBaseResponse) Reset()
- func (x *AuthBaseResponse) String() string
- type AuthServiceClient
- type AuthServiceServer
- type LoginRequest
- func (*LoginRequest) Descriptor() ([]byte, []int)deprecated
- func (x *LoginRequest) GetEmail() string
- func (x *LoginRequest) GetPassword() string
- func (*LoginRequest) ProtoMessage()
- func (x *LoginRequest) ProtoReflect() protoreflect.Message
- func (x *LoginRequest) Reset()
- func (x *LoginRequest) String() string
- type LoginResponse
- type Paging
- func (*Paging) Descriptor() ([]byte, []int)deprecated
- func (x *Paging) GetCount() int32
- func (x *Paging) GetCurrentPage() int32
- func (x *Paging) GetTotalPage() int32
- func (*Paging) ProtoMessage()
- func (x *Paging) ProtoReflect() protoreflect.Message
- func (x *Paging) Reset()
- func (x *Paging) String() string
- type UnimplementedAuthServiceServer
- func (UnimplementedAuthServiceServer) BatchUpdateTask(context.Context, *task.BatchUpdateTaskRequest) (*task.TaskBaseResponse, error)
- func (UnimplementedAuthServiceServer) CreateActivity(context.Context, *activity.CreateActivityRequest) (*activity.ActivityBaseResponse, error)
- func (UnimplementedAuthServiceServer) CreateTask(context.Context, *task.CreateTaskRequest) (*task.TaskBaseResponse, error)
- func (UnimplementedAuthServiceServer) DeleteActivity(context.Context, *activity.DeleteActivityByIDRequest) (*activity.ActivityBaseResponse, error)
- func (UnimplementedAuthServiceServer) DeleteTask(context.Context, *task.DeleteTaskByIDRequest) (*task.TaskBaseResponse, error)
- func (UnimplementedAuthServiceServer) GetActivity(context.Context, *activity.GetActivityByIDRequest) (*activity.ActivityBaseResponse, error)
- func (UnimplementedAuthServiceServer) GetAllActivity(context.Context, *activity.GetAllActivityRequest) (*activity.GetAllActivityResponse, error)
- func (UnimplementedAuthServiceServer) GetAllTask(context.Context, *task.GetAllTaskByActivityIDRequest) (*task.GetAllTaskByActivityIDResponse, error)
- func (UnimplementedAuthServiceServer) GetTask(context.Context, *task.GetTaskByIDRequest) (*task.GetTaskByIDResponse, error)
- func (UnimplementedAuthServiceServer) Login(context.Context, *LoginRequest) (*AuthBaseResponse, error)
- func (UnimplementedAuthServiceServer) Logout(context.Context, *emptypb.Empty) (*AuthBaseResponse, error)
- func (UnimplementedAuthServiceServer) UpdateActivity(context.Context, *activity.UpdateActivityByIDRequest) (*activity.ActivityBaseResponse, error)
- func (UnimplementedAuthServiceServer) UpdateTask(context.Context, *task.UpdateTaskByIDRequest) (*task.TaskBaseResponse, error)
- type UnsafeAuthServiceServer
Constants ¶
const ( AuthService_Login_FullMethodName = "/proto.AuthService/Login" AuthService_Logout_FullMethodName = "/proto.AuthService/Logout" AuthService_CreateActivity_FullMethodName = "/proto.AuthService/CreateActivity" AuthService_GetActivity_FullMethodName = "/proto.AuthService/GetActivity" AuthService_GetAllActivity_FullMethodName = "/proto.AuthService/GetAllActivity" AuthService_UpdateActivity_FullMethodName = "/proto.AuthService/UpdateActivity" AuthService_DeleteActivity_FullMethodName = "/proto.AuthService/DeleteActivity" AuthService_CreateTask_FullMethodName = "/proto.AuthService/CreateTask" AuthService_GetTask_FullMethodName = "/proto.AuthService/GetTask" AuthService_GetAllTask_FullMethodName = "/proto.AuthService/GetAllTask" AuthService_UpdateTask_FullMethodName = "/proto.AuthService/UpdateTask" AuthService_BatchUpdateTask_FullMethodName = "/proto.AuthService/BatchUpdateTask" AuthService_DeleteTask_FullMethodName = "/proto.AuthService/DeleteTask" )
Variables ¶
var AuthService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.AuthService", HandlerType: (*AuthServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Login", Handler: _AuthService_Login_Handler, }, { MethodName: "Logout", Handler: _AuthService_Logout_Handler, }, { MethodName: "CreateActivity", Handler: _AuthService_CreateActivity_Handler, }, { MethodName: "GetActivity", Handler: _AuthService_GetActivity_Handler, }, { MethodName: "GetAllActivity", Handler: _AuthService_GetAllActivity_Handler, }, { MethodName: "UpdateActivity", Handler: _AuthService_UpdateActivity_Handler, }, { MethodName: "DeleteActivity", Handler: _AuthService_DeleteActivity_Handler, }, { MethodName: "CreateTask", Handler: _AuthService_CreateTask_Handler, }, { MethodName: "GetTask", Handler: _AuthService_GetTask_Handler, }, { MethodName: "GetAllTask", Handler: _AuthService_GetAllTask_Handler, }, { MethodName: "UpdateTask", Handler: _AuthService_UpdateTask_Handler, }, { MethodName: "BatchUpdateTask", Handler: _AuthService_BatchUpdateTask_Handler, }, { MethodName: "DeleteTask", Handler: _AuthService_DeleteTask_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "auth_service.proto", }
AuthService_ServiceDesc is the grpc.ServiceDesc for AuthService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_auth_service_proto protoreflect.FileDescriptor
var File_payload_messages_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAuthServiceHandler ¶
func RegisterAuthServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterAuthServiceHandler registers the http handlers for service AuthService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterAuthServiceHandlerClient ¶
func RegisterAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AuthServiceClient) error
RegisterAuthServiceHandlerClient registers the http handlers for service AuthService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AuthServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AuthServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "AuthServiceClient" to call the correct interceptors.
func RegisterAuthServiceHandlerFromEndpoint ¶
func RegisterAuthServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterAuthServiceHandlerFromEndpoint is same as RegisterAuthServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterAuthServiceHandlerServer ¶
func RegisterAuthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AuthServiceServer) error
RegisterAuthServiceHandlerServer registers the http handlers for service AuthService to "mux". UnaryRPC :call AuthServiceServer 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 RegisterAuthServiceHandlerFromEndpoint instead.
func RegisterAuthServiceServer ¶
func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer)
Types ¶
type AuthBaseResponse ¶
type AuthBaseResponse struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` Data *anypb.Any `protobuf:"bytes,2,opt,name=data,proto3,oneof" json:"data,omitempty"` Paging *Paging `protobuf:"bytes,3,opt,name=paging,proto3,oneof" json:"paging,omitempty"` // contains filtered or unexported fields }
func (*AuthBaseResponse) Descriptor
deprecated
func (*AuthBaseResponse) Descriptor() ([]byte, []int)
Deprecated: Use AuthBaseResponse.ProtoReflect.Descriptor instead.
func (*AuthBaseResponse) GetData ¶
func (x *AuthBaseResponse) GetData() *anypb.Any
func (*AuthBaseResponse) GetMessage ¶
func (x *AuthBaseResponse) GetMessage() string
func (*AuthBaseResponse) GetPaging ¶
func (x *AuthBaseResponse) GetPaging() *Paging
func (*AuthBaseResponse) ProtoMessage ¶
func (*AuthBaseResponse) ProtoMessage()
func (*AuthBaseResponse) ProtoReflect ¶
func (x *AuthBaseResponse) ProtoReflect() protoreflect.Message
func (*AuthBaseResponse) Reset ¶
func (x *AuthBaseResponse) Reset()
func (*AuthBaseResponse) String ¶
func (x *AuthBaseResponse) String() string
type AuthServiceClient ¶
type AuthServiceClient interface { // Auth Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*AuthBaseResponse, error) Logout(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*AuthBaseResponse, error) // Activities CreateActivity(ctx context.Context, in *activity.CreateActivityRequest, opts ...grpc.CallOption) (*activity.ActivityBaseResponse, error) GetActivity(ctx context.Context, in *activity.GetActivityByIDRequest, opts ...grpc.CallOption) (*activity.ActivityBaseResponse, error) GetAllActivity(ctx context.Context, in *activity.GetAllActivityRequest, opts ...grpc.CallOption) (*activity.GetAllActivityResponse, error) UpdateActivity(ctx context.Context, in *activity.UpdateActivityByIDRequest, opts ...grpc.CallOption) (*activity.ActivityBaseResponse, error) DeleteActivity(ctx context.Context, in *activity.DeleteActivityByIDRequest, opts ...grpc.CallOption) (*activity.ActivityBaseResponse, error) // Taks CreateTask(ctx context.Context, in *task.CreateTaskRequest, opts ...grpc.CallOption) (*task.TaskBaseResponse, error) GetTask(ctx context.Context, in *task.GetTaskByIDRequest, opts ...grpc.CallOption) (*task.GetTaskByIDResponse, error) GetAllTask(ctx context.Context, in *task.GetAllTaskByActivityIDRequest, opts ...grpc.CallOption) (*task.GetAllTaskByActivityIDResponse, error) UpdateTask(ctx context.Context, in *task.UpdateTaskByIDRequest, opts ...grpc.CallOption) (*task.TaskBaseResponse, error) BatchUpdateTask(ctx context.Context, in *task.BatchUpdateTaskRequest, opts ...grpc.CallOption) (*task.TaskBaseResponse, error) DeleteTask(ctx context.Context, in *task.DeleteTaskByIDRequest, opts ...grpc.CallOption) (*task.TaskBaseResponse, error) }
AuthServiceClient is the client API for AuthService 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 NewAuthServiceClient ¶
func NewAuthServiceClient(cc grpc.ClientConnInterface) AuthServiceClient
type AuthServiceServer ¶
type AuthServiceServer interface { // Auth Login(context.Context, *LoginRequest) (*AuthBaseResponse, error) Logout(context.Context, *emptypb.Empty) (*AuthBaseResponse, error) // Activities CreateActivity(context.Context, *activity.CreateActivityRequest) (*activity.ActivityBaseResponse, error) GetActivity(context.Context, *activity.GetActivityByIDRequest) (*activity.ActivityBaseResponse, error) GetAllActivity(context.Context, *activity.GetAllActivityRequest) (*activity.GetAllActivityResponse, error) UpdateActivity(context.Context, *activity.UpdateActivityByIDRequest) (*activity.ActivityBaseResponse, error) DeleteActivity(context.Context, *activity.DeleteActivityByIDRequest) (*activity.ActivityBaseResponse, error) // Taks CreateTask(context.Context, *task.CreateTaskRequest) (*task.TaskBaseResponse, error) GetTask(context.Context, *task.GetTaskByIDRequest) (*task.GetTaskByIDResponse, error) GetAllTask(context.Context, *task.GetAllTaskByActivityIDRequest) (*task.GetAllTaskByActivityIDResponse, error) UpdateTask(context.Context, *task.UpdateTaskByIDRequest) (*task.TaskBaseResponse, error) BatchUpdateTask(context.Context, *task.BatchUpdateTaskRequest) (*task.TaskBaseResponse, error) DeleteTask(context.Context, *task.DeleteTaskByIDRequest) (*task.TaskBaseResponse, error) // contains filtered or unexported methods }
AuthServiceServer is the server API for AuthService service. All implementations must embed UnimplementedAuthServiceServer for forward compatibility
type LoginRequest ¶
type LoginRequest 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 }
Auth
func (*LoginRequest) Descriptor
deprecated
func (*LoginRequest) Descriptor() ([]byte, []int)
Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.
func (*LoginRequest) GetEmail ¶
func (x *LoginRequest) GetEmail() string
func (*LoginRequest) GetPassword ¶
func (x *LoginRequest) GetPassword() string
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 LoginResponse ¶
type LoginResponse struct { AccessToken string `protobuf:"bytes,1,opt,name=access_token,proto3" json:"access_token,omitempty"` // contains filtered or unexported fields }
func (*LoginResponse) Descriptor
deprecated
func (*LoginResponse) Descriptor() ([]byte, []int)
Deprecated: Use LoginResponse.ProtoReflect.Descriptor instead.
func (*LoginResponse) GetAccessToken ¶
func (x *LoginResponse) GetAccessToken() string
func (*LoginResponse) ProtoMessage ¶
func (*LoginResponse) ProtoMessage()
func (*LoginResponse) ProtoReflect ¶
func (x *LoginResponse) ProtoReflect() protoreflect.Message
func (*LoginResponse) Reset ¶
func (x *LoginResponse) Reset()
func (*LoginResponse) String ¶
func (x *LoginResponse) String() string
type Paging ¶
type Paging struct { CurrentPage int32 `protobuf:"varint,1,opt,name=current_page,proto3" json:"current_page,omitempty"` TotalPage int32 `protobuf:"varint,2,opt,name=total_page,proto3" json:"total_page,omitempty"` Count int32 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"` // contains filtered or unexported fields }
func (*Paging) Descriptor
deprecated
func (*Paging) GetCurrentPage ¶
func (*Paging) GetTotalPage ¶
func (*Paging) ProtoMessage ¶
func (*Paging) ProtoMessage()
func (*Paging) ProtoReflect ¶
func (x *Paging) ProtoReflect() protoreflect.Message
type UnimplementedAuthServiceServer ¶
type UnimplementedAuthServiceServer struct { }
UnimplementedAuthServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedAuthServiceServer) BatchUpdateTask ¶
func (UnimplementedAuthServiceServer) BatchUpdateTask(context.Context, *task.BatchUpdateTaskRequest) (*task.TaskBaseResponse, error)
func (UnimplementedAuthServiceServer) CreateActivity ¶
func (UnimplementedAuthServiceServer) CreateActivity(context.Context, *activity.CreateActivityRequest) (*activity.ActivityBaseResponse, error)
func (UnimplementedAuthServiceServer) CreateTask ¶
func (UnimplementedAuthServiceServer) CreateTask(context.Context, *task.CreateTaskRequest) (*task.TaskBaseResponse, error)
func (UnimplementedAuthServiceServer) DeleteActivity ¶
func (UnimplementedAuthServiceServer) DeleteActivity(context.Context, *activity.DeleteActivityByIDRequest) (*activity.ActivityBaseResponse, error)
func (UnimplementedAuthServiceServer) DeleteTask ¶
func (UnimplementedAuthServiceServer) DeleteTask(context.Context, *task.DeleteTaskByIDRequest) (*task.TaskBaseResponse, error)
func (UnimplementedAuthServiceServer) GetActivity ¶
func (UnimplementedAuthServiceServer) GetActivity(context.Context, *activity.GetActivityByIDRequest) (*activity.ActivityBaseResponse, error)
func (UnimplementedAuthServiceServer) GetAllActivity ¶
func (UnimplementedAuthServiceServer) GetAllActivity(context.Context, *activity.GetAllActivityRequest) (*activity.GetAllActivityResponse, error)
func (UnimplementedAuthServiceServer) GetAllTask ¶
func (UnimplementedAuthServiceServer) GetAllTask(context.Context, *task.GetAllTaskByActivityIDRequest) (*task.GetAllTaskByActivityIDResponse, error)
func (UnimplementedAuthServiceServer) GetTask ¶
func (UnimplementedAuthServiceServer) GetTask(context.Context, *task.GetTaskByIDRequest) (*task.GetTaskByIDResponse, error)
func (UnimplementedAuthServiceServer) Login ¶
func (UnimplementedAuthServiceServer) Login(context.Context, *LoginRequest) (*AuthBaseResponse, error)
func (UnimplementedAuthServiceServer) Logout ¶
func (UnimplementedAuthServiceServer) Logout(context.Context, *emptypb.Empty) (*AuthBaseResponse, error)
func (UnimplementedAuthServiceServer) UpdateActivity ¶
func (UnimplementedAuthServiceServer) UpdateActivity(context.Context, *activity.UpdateActivityByIDRequest) (*activity.ActivityBaseResponse, error)
func (UnimplementedAuthServiceServer) UpdateTask ¶
func (UnimplementedAuthServiceServer) UpdateTask(context.Context, *task.UpdateTaskByIDRequest) (*task.TaskBaseResponse, error)
type UnsafeAuthServiceServer ¶
type UnsafeAuthServiceServer interface {
// contains filtered or unexported methods
}
UnsafeAuthServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AuthServiceServer will result in compilation errors.