chore: add idp workspace setting

This commit is contained in:
Steven
2024-08-05 23:43:59 +08:00
parent f9e5978a08
commit e53ced8996
19 changed files with 1022 additions and 151 deletions

View File

@ -143,6 +143,7 @@ func local_request_AuthService_SignOut_0(ctx context.Context, marshaler runtime.
// 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.
// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
func RegisterAuthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AuthServiceServer) error {
mux.Handle("POST", pattern_AuthService_GetAuthStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
@ -283,7 +284,7 @@ func RegisterAuthServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn
// 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.
// "AuthServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares.
func RegisterAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AuthServiceClient) error {
mux.Handle("POST", pattern_AuthService_GetAuthStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.4.0
// - protoc-gen-go-grpc v1.5.1
// - protoc (unknown)
// source: api/v1/auth_service.proto
@ -15,8 +15,8 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.62.0 or later.
const _ = grpc.SupportPackageIsVersion8
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
AuthService_GetAuthStatus_FullMethodName = "/slash.api.v1.AuthService/GetAuthStatus"
@ -85,7 +85,7 @@ func (c *authServiceClient) SignOut(ctx context.Context, in *SignOutRequest, opt
// AuthServiceServer is the server API for AuthService service.
// All implementations must embed UnimplementedAuthServiceServer
// for forward compatibility
// for forward compatibility.
type AuthServiceServer interface {
GetAuthStatus(context.Context, *GetAuthStatusRequest) (*GetAuthStatusResponse, error)
SignIn(context.Context, *SignInRequest) (*SignInResponse, error)
@ -94,9 +94,12 @@ type AuthServiceServer interface {
mustEmbedUnimplementedAuthServiceServer()
}
// UnimplementedAuthServiceServer must be embedded to have forward compatible implementations.
type UnimplementedAuthServiceServer struct {
}
// UnimplementedAuthServiceServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedAuthServiceServer struct{}
func (UnimplementedAuthServiceServer) GetAuthStatus(context.Context, *GetAuthStatusRequest) (*GetAuthStatusResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetAuthStatus not implemented")
@ -111,6 +114,7 @@ func (UnimplementedAuthServiceServer) SignOut(context.Context, *SignOutRequest)
return nil, status.Errorf(codes.Unimplemented, "method SignOut not implemented")
}
func (UnimplementedAuthServiceServer) mustEmbedUnimplementedAuthServiceServer() {}
func (UnimplementedAuthServiceServer) testEmbeddedByValue() {}
// 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
@ -120,6 +124,13 @@ type UnsafeAuthServiceServer interface {
}
func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer) {
// If the following call pancis, it indicates UnimplementedAuthServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&AuthService_ServiceDesc, srv)
}

View File

@ -261,6 +261,7 @@ func local_request_CollectionService_DeleteCollection_0(ctx context.Context, mar
// UnaryRPC :call CollectionServiceServer 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 RegisterCollectionServiceHandlerFromEndpoint instead.
// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
func RegisterCollectionServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CollectionServiceServer) error {
mux.Handle("GET", pattern_CollectionService_ListCollections_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
@ -426,7 +427,7 @@ func RegisterCollectionServiceHandler(ctx context.Context, mux *runtime.ServeMux
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "CollectionServiceClient".
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "CollectionServiceClient"
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
// "CollectionServiceClient" to call the correct interceptors.
// "CollectionServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares.
func RegisterCollectionServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CollectionServiceClient) error {
mux.Handle("GET", pattern_CollectionService_ListCollections_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.4.0
// - protoc-gen-go-grpc v1.5.1
// - protoc (unknown)
// source: api/v1/collection_service.proto
@ -15,8 +15,8 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.62.0 or later.
const _ = grpc.SupportPackageIsVersion8
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
CollectionService_ListCollections_FullMethodName = "/slash.api.v1.CollectionService/ListCollections"
@ -115,7 +115,7 @@ func (c *collectionServiceClient) DeleteCollection(ctx context.Context, in *Dele
// CollectionServiceServer is the server API for CollectionService service.
// All implementations must embed UnimplementedCollectionServiceServer
// for forward compatibility
// for forward compatibility.
type CollectionServiceServer interface {
// ListCollections returns a list of collections.
ListCollections(context.Context, *ListCollectionsRequest) (*ListCollectionsResponse, error)
@ -132,9 +132,12 @@ type CollectionServiceServer interface {
mustEmbedUnimplementedCollectionServiceServer()
}
// UnimplementedCollectionServiceServer must be embedded to have forward compatible implementations.
type UnimplementedCollectionServiceServer struct {
}
// UnimplementedCollectionServiceServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedCollectionServiceServer struct{}
func (UnimplementedCollectionServiceServer) ListCollections(context.Context, *ListCollectionsRequest) (*ListCollectionsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListCollections not implemented")
@ -155,6 +158,7 @@ func (UnimplementedCollectionServiceServer) DeleteCollection(context.Context, *D
return nil, status.Errorf(codes.Unimplemented, "method DeleteCollection not implemented")
}
func (UnimplementedCollectionServiceServer) mustEmbedUnimplementedCollectionServiceServer() {}
func (UnimplementedCollectionServiceServer) testEmbeddedByValue() {}
// UnsafeCollectionServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to CollectionServiceServer will
@ -164,6 +168,13 @@ type UnsafeCollectionServiceServer interface {
}
func RegisterCollectionServiceServer(s grpc.ServiceRegistrar, srv CollectionServiceServer) {
// If the following call pancis, it indicates UnimplementedCollectionServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&CollectionService_ServiceDesc, srv)
}

View File

@ -313,6 +313,7 @@ func local_request_ShortcutService_GetShortcutAnalytics_0(ctx context.Context, m
// UnaryRPC :call ShortcutServiceServer 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 RegisterShortcutServiceHandlerFromEndpoint instead.
// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
func RegisterShortcutServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ShortcutServiceServer) error {
mux.Handle("GET", pattern_ShortcutService_ListShortcuts_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
@ -503,7 +504,7 @@ func RegisterShortcutServiceHandler(ctx context.Context, mux *runtime.ServeMux,
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ShortcutServiceClient".
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ShortcutServiceClient"
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
// "ShortcutServiceClient" to call the correct interceptors.
// "ShortcutServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares.
func RegisterShortcutServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ShortcutServiceClient) error {
mux.Handle("GET", pattern_ShortcutService_ListShortcuts_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.4.0
// - protoc-gen-go-grpc v1.5.1
// - protoc (unknown)
// source: api/v1/shortcut_service.proto
@ -15,8 +15,8 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.62.0 or later.
const _ = grpc.SupportPackageIsVersion8
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
ShortcutService_ListShortcuts_FullMethodName = "/slash.api.v1.ShortcutService/ListShortcuts"
@ -128,7 +128,7 @@ func (c *shortcutServiceClient) GetShortcutAnalytics(ctx context.Context, in *Ge
// ShortcutServiceServer is the server API for ShortcutService service.
// All implementations must embed UnimplementedShortcutServiceServer
// for forward compatibility
// for forward compatibility.
type ShortcutServiceServer interface {
// ListShortcuts returns a list of shortcuts.
ListShortcuts(context.Context, *ListShortcutsRequest) (*ListShortcutsResponse, error)
@ -147,9 +147,12 @@ type ShortcutServiceServer interface {
mustEmbedUnimplementedShortcutServiceServer()
}
// UnimplementedShortcutServiceServer must be embedded to have forward compatible implementations.
type UnimplementedShortcutServiceServer struct {
}
// UnimplementedShortcutServiceServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedShortcutServiceServer struct{}
func (UnimplementedShortcutServiceServer) ListShortcuts(context.Context, *ListShortcutsRequest) (*ListShortcutsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListShortcuts not implemented")
@ -173,6 +176,7 @@ func (UnimplementedShortcutServiceServer) GetShortcutAnalytics(context.Context,
return nil, status.Errorf(codes.Unimplemented, "method GetShortcutAnalytics not implemented")
}
func (UnimplementedShortcutServiceServer) mustEmbedUnimplementedShortcutServiceServer() {}
func (UnimplementedShortcutServiceServer) testEmbeddedByValue() {}
// UnsafeShortcutServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ShortcutServiceServer will
@ -182,6 +186,13 @@ type UnsafeShortcutServiceServer interface {
}
func RegisterShortcutServiceServer(s grpc.ServiceRegistrar, srv ShortcutServiceServer) {
// If the following call pancis, it indicates UnimplementedShortcutServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&ShortcutService_ServiceDesc, srv)
}

View File

@ -79,6 +79,7 @@ func local_request_SubscriptionService_UpdateSubscription_0(ctx context.Context,
// UnaryRPC :call SubscriptionServiceServer 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 RegisterSubscriptionServiceHandlerFromEndpoint instead.
// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
func RegisterSubscriptionServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SubscriptionServiceServer) error {
mux.Handle("GET", pattern_SubscriptionService_GetSubscription_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
@ -169,7 +170,7 @@ func RegisterSubscriptionServiceHandler(ctx context.Context, mux *runtime.ServeM
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SubscriptionServiceClient".
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SubscriptionServiceClient"
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
// "SubscriptionServiceClient" to call the correct interceptors.
// "SubscriptionServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares.
func RegisterSubscriptionServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SubscriptionServiceClient) error {
mux.Handle("GET", pattern_SubscriptionService_GetSubscription_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.4.0
// - protoc-gen-go-grpc v1.5.1
// - protoc (unknown)
// source: api/v1/subscription_service.proto
@ -15,8 +15,8 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.62.0 or later.
const _ = grpc.SupportPackageIsVersion8
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
SubscriptionService_GetSubscription_FullMethodName = "/slash.api.v1.SubscriptionService/GetSubscription"
@ -61,16 +61,19 @@ func (c *subscriptionServiceClient) UpdateSubscription(ctx context.Context, in *
// SubscriptionServiceServer is the server API for SubscriptionService service.
// All implementations must embed UnimplementedSubscriptionServiceServer
// for forward compatibility
// for forward compatibility.
type SubscriptionServiceServer interface {
GetSubscription(context.Context, *GetSubscriptionRequest) (*GetSubscriptionResponse, error)
UpdateSubscription(context.Context, *UpdateSubscriptionRequest) (*UpdateSubscriptionResponse, error)
mustEmbedUnimplementedSubscriptionServiceServer()
}
// UnimplementedSubscriptionServiceServer must be embedded to have forward compatible implementations.
type UnimplementedSubscriptionServiceServer struct {
}
// UnimplementedSubscriptionServiceServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedSubscriptionServiceServer struct{}
func (UnimplementedSubscriptionServiceServer) GetSubscription(context.Context, *GetSubscriptionRequest) (*GetSubscriptionResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetSubscription not implemented")
@ -79,6 +82,7 @@ func (UnimplementedSubscriptionServiceServer) UpdateSubscription(context.Context
return nil, status.Errorf(codes.Unimplemented, "method UpdateSubscription not implemented")
}
func (UnimplementedSubscriptionServiceServer) mustEmbedUnimplementedSubscriptionServiceServer() {}
func (UnimplementedSubscriptionServiceServer) testEmbeddedByValue() {}
// UnsafeSubscriptionServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to SubscriptionServiceServer will
@ -88,6 +92,13 @@ type UnsafeSubscriptionServiceServer interface {
}
func RegisterSubscriptionServiceServer(s grpc.ServiceRegistrar, srv SubscriptionServiceServer) {
// If the following call pancis, it indicates UnimplementedSubscriptionServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&SubscriptionService_ServiceDesc, srv)
}

View File

@ -467,6 +467,7 @@ func local_request_UserService_DeleteUserAccessToken_0(ctx context.Context, mars
// 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.
// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UserServiceServer) error {
mux.Handle("GET", pattern_UserService_ListUsers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
@ -707,7 +708,7 @@ func RegisterUserServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn
// 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.
// "UserServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares.
func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UserServiceClient) error {
mux.Handle("GET", pattern_UserService_ListUsers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.4.0
// - protoc-gen-go-grpc v1.5.1
// - protoc (unknown)
// source: api/v1/user_service.proto
@ -15,8 +15,8 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.62.0 or later.
const _ = grpc.SupportPackageIsVersion8
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
UserService_ListUsers_FullMethodName = "/slash.api.v1.UserService/ListUsers"
@ -140,7 +140,7 @@ func (c *userServiceClient) DeleteUserAccessToken(ctx context.Context, in *Delet
// UserServiceServer is the server API for UserService service.
// All implementations must embed UnimplementedUserServiceServer
// for forward compatibility
// for forward compatibility.
type UserServiceServer interface {
// ListUsers returns a list of users.
ListUsers(context.Context, *ListUsersRequest) (*ListUsersResponse, error)
@ -160,9 +160,12 @@ type UserServiceServer interface {
mustEmbedUnimplementedUserServiceServer()
}
// UnimplementedUserServiceServer must be embedded to have forward compatible implementations.
type UnimplementedUserServiceServer struct {
}
// UnimplementedUserServiceServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedUserServiceServer struct{}
func (UnimplementedUserServiceServer) ListUsers(context.Context, *ListUsersRequest) (*ListUsersResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListUsers not implemented")
@ -189,6 +192,7 @@ func (UnimplementedUserServiceServer) DeleteUserAccessToken(context.Context, *De
return nil, status.Errorf(codes.Unimplemented, "method DeleteUserAccessToken not implemented")
}
func (UnimplementedUserServiceServer) mustEmbedUnimplementedUserServiceServer() {}
func (UnimplementedUserServiceServer) testEmbeddedByValue() {}
// 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
@ -198,6 +202,13 @@ type UnsafeUserServiceServer interface {
}
func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer) {
// If the following call pancis, it indicates UnimplementedUserServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&UserService_ServiceDesc, srv)
}

View File

@ -187,6 +187,7 @@ func local_request_UserSettingService_UpdateUserSetting_0(ctx context.Context, m
// UnaryRPC :call UserSettingServiceServer 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 RegisterUserSettingServiceHandlerFromEndpoint instead.
// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
func RegisterUserSettingServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UserSettingServiceServer) error {
mux.Handle("GET", pattern_UserSettingService_GetUserSetting_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
@ -277,7 +278,7 @@ func RegisterUserSettingServiceHandler(ctx context.Context, mux *runtime.ServeMu
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "UserSettingServiceClient".
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "UserSettingServiceClient"
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
// "UserSettingServiceClient" to call the correct interceptors.
// "UserSettingServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares.
func RegisterUserSettingServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UserSettingServiceClient) error {
mux.Handle("GET", pattern_UserSettingService_GetUserSetting_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.4.0
// - protoc-gen-go-grpc v1.5.1
// - protoc (unknown)
// source: api/v1/user_setting_service.proto
@ -15,8 +15,8 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.62.0 or later.
const _ = grpc.SupportPackageIsVersion8
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
UserSettingService_GetUserSetting_FullMethodName = "/slash.api.v1.UserSettingService/GetUserSetting"
@ -63,7 +63,7 @@ func (c *userSettingServiceClient) UpdateUserSetting(ctx context.Context, in *Up
// UserSettingServiceServer is the server API for UserSettingService service.
// All implementations must embed UnimplementedUserSettingServiceServer
// for forward compatibility
// for forward compatibility.
type UserSettingServiceServer interface {
// GetUserSetting returns the user setting.
GetUserSetting(context.Context, *GetUserSettingRequest) (*GetUserSettingResponse, error)
@ -72,9 +72,12 @@ type UserSettingServiceServer interface {
mustEmbedUnimplementedUserSettingServiceServer()
}
// UnimplementedUserSettingServiceServer must be embedded to have forward compatible implementations.
type UnimplementedUserSettingServiceServer struct {
}
// UnimplementedUserSettingServiceServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedUserSettingServiceServer struct{}
func (UnimplementedUserSettingServiceServer) GetUserSetting(context.Context, *GetUserSettingRequest) (*GetUserSettingResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetUserSetting not implemented")
@ -83,6 +86,7 @@ func (UnimplementedUserSettingServiceServer) UpdateUserSetting(context.Context,
return nil, status.Errorf(codes.Unimplemented, "method UpdateUserSetting not implemented")
}
func (UnimplementedUserSettingServiceServer) mustEmbedUnimplementedUserSettingServiceServer() {}
func (UnimplementedUserSettingServiceServer) testEmbeddedByValue() {}
// UnsafeUserSettingServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to UserSettingServiceServer will
@ -92,6 +96,13 @@ type UnsafeUserSettingServiceServer interface {
}
func RegisterUserSettingServiceServer(s grpc.ServiceRegistrar, srv UserSettingServiceServer) {
// If the following call pancis, it indicates UnimplementedUserSettingServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&UserSettingService_ServiceDesc, srv)
}

View File

@ -137,6 +137,7 @@ func local_request_WorkspaceService_UpdateWorkspaceSetting_0(ctx context.Context
// UnaryRPC :call WorkspaceServiceServer 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 RegisterWorkspaceServiceHandlerFromEndpoint instead.
// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
func RegisterWorkspaceServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server WorkspaceServiceServer) error {
mux.Handle("GET", pattern_WorkspaceService_GetWorkspaceProfile_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
@ -252,7 +253,7 @@ func RegisterWorkspaceServiceHandler(ctx context.Context, mux *runtime.ServeMux,
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "WorkspaceServiceClient".
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "WorkspaceServiceClient"
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
// "WorkspaceServiceClient" to call the correct interceptors.
// "WorkspaceServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares.
func RegisterWorkspaceServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client WorkspaceServiceClient) error {
mux.Handle("GET", pattern_WorkspaceService_GetWorkspaceProfile_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.4.0
// - protoc-gen-go-grpc v1.5.1
// - protoc (unknown)
// source: api/v1/workspace_service.proto
@ -15,8 +15,8 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.62.0 or later.
const _ = grpc.SupportPackageIsVersion8
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
WorkspaceService_GetWorkspaceProfile_FullMethodName = "/slash.api.v1.WorkspaceService/GetWorkspaceProfile"
@ -73,7 +73,7 @@ func (c *workspaceServiceClient) UpdateWorkspaceSetting(ctx context.Context, in
// WorkspaceServiceServer is the server API for WorkspaceService service.
// All implementations must embed UnimplementedWorkspaceServiceServer
// for forward compatibility
// for forward compatibility.
type WorkspaceServiceServer interface {
GetWorkspaceProfile(context.Context, *GetWorkspaceProfileRequest) (*GetWorkspaceProfileResponse, error)
GetWorkspaceSetting(context.Context, *GetWorkspaceSettingRequest) (*GetWorkspaceSettingResponse, error)
@ -81,9 +81,12 @@ type WorkspaceServiceServer interface {
mustEmbedUnimplementedWorkspaceServiceServer()
}
// UnimplementedWorkspaceServiceServer must be embedded to have forward compatible implementations.
type UnimplementedWorkspaceServiceServer struct {
}
// UnimplementedWorkspaceServiceServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedWorkspaceServiceServer struct{}
func (UnimplementedWorkspaceServiceServer) GetWorkspaceProfile(context.Context, *GetWorkspaceProfileRequest) (*GetWorkspaceProfileResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetWorkspaceProfile not implemented")
@ -95,6 +98,7 @@ func (UnimplementedWorkspaceServiceServer) UpdateWorkspaceSetting(context.Contex
return nil, status.Errorf(codes.Unimplemented, "method UpdateWorkspaceSetting not implemented")
}
func (UnimplementedWorkspaceServiceServer) mustEmbedUnimplementedWorkspaceServiceServer() {}
func (UnimplementedWorkspaceServiceServer) testEmbeddedByValue() {}
// UnsafeWorkspaceServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to WorkspaceServiceServer will
@ -104,6 +108,13 @@ type UnsafeWorkspaceServiceServer interface {
}
func RegisterWorkspaceServiceServer(s grpc.ServiceRegistrar, srv WorkspaceServiceServer) {
// If the following call pancis, it indicates UnimplementedWorkspaceServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&WorkspaceService_ServiceDesc, srv)
}