idp_service_grpc.pb.go 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  1. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
  2. // versions:
  3. // - protoc-gen-go-grpc v1.5.1
  4. // - protoc (unknown)
  5. // source: api/v1/idp_service.proto
  6. package apiv1
  7. import (
  8. context "context"
  9. grpc "google.golang.org/grpc"
  10. codes "google.golang.org/grpc/codes"
  11. status "google.golang.org/grpc/status"
  12. emptypb "google.golang.org/protobuf/types/known/emptypb"
  13. )
  14. // This is a compile-time assertion to ensure that this generated file
  15. // is compatible with the grpc package it is being compiled against.
  16. // Requires gRPC-Go v1.64.0 or later.
  17. const _ = grpc.SupportPackageIsVersion9
  18. const (
  19. IdentityProviderService_ListIdentityProviders_FullMethodName = "/memos.api.v1.IdentityProviderService/ListIdentityProviders"
  20. IdentityProviderService_GetIdentityProvider_FullMethodName = "/memos.api.v1.IdentityProviderService/GetIdentityProvider"
  21. IdentityProviderService_CreateIdentityProvider_FullMethodName = "/memos.api.v1.IdentityProviderService/CreateIdentityProvider"
  22. IdentityProviderService_UpdateIdentityProvider_FullMethodName = "/memos.api.v1.IdentityProviderService/UpdateIdentityProvider"
  23. IdentityProviderService_DeleteIdentityProvider_FullMethodName = "/memos.api.v1.IdentityProviderService/DeleteIdentityProvider"
  24. )
  25. // IdentityProviderServiceClient is the client API for IdentityProviderService service.
  26. //
  27. // 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.
  28. type IdentityProviderServiceClient interface {
  29. // ListIdentityProviders lists identity providers.
  30. ListIdentityProviders(ctx context.Context, in *ListIdentityProvidersRequest, opts ...grpc.CallOption) (*ListIdentityProvidersResponse, error)
  31. // GetIdentityProvider gets an identity provider.
  32. GetIdentityProvider(ctx context.Context, in *GetIdentityProviderRequest, opts ...grpc.CallOption) (*IdentityProvider, error)
  33. // CreateIdentityProvider creates an identity provider.
  34. CreateIdentityProvider(ctx context.Context, in *CreateIdentityProviderRequest, opts ...grpc.CallOption) (*IdentityProvider, error)
  35. // UpdateIdentityProvider updates an identity provider.
  36. UpdateIdentityProvider(ctx context.Context, in *UpdateIdentityProviderRequest, opts ...grpc.CallOption) (*IdentityProvider, error)
  37. // DeleteIdentityProvider deletes an identity provider.
  38. DeleteIdentityProvider(ctx context.Context, in *DeleteIdentityProviderRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
  39. }
  40. type identityProviderServiceClient struct {
  41. cc grpc.ClientConnInterface
  42. }
  43. func NewIdentityProviderServiceClient(cc grpc.ClientConnInterface) IdentityProviderServiceClient {
  44. return &identityProviderServiceClient{cc}
  45. }
  46. func (c *identityProviderServiceClient) ListIdentityProviders(ctx context.Context, in *ListIdentityProvidersRequest, opts ...grpc.CallOption) (*ListIdentityProvidersResponse, error) {
  47. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  48. out := new(ListIdentityProvidersResponse)
  49. err := c.cc.Invoke(ctx, IdentityProviderService_ListIdentityProviders_FullMethodName, in, out, cOpts...)
  50. if err != nil {
  51. return nil, err
  52. }
  53. return out, nil
  54. }
  55. func (c *identityProviderServiceClient) GetIdentityProvider(ctx context.Context, in *GetIdentityProviderRequest, opts ...grpc.CallOption) (*IdentityProvider, error) {
  56. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  57. out := new(IdentityProvider)
  58. err := c.cc.Invoke(ctx, IdentityProviderService_GetIdentityProvider_FullMethodName, in, out, cOpts...)
  59. if err != nil {
  60. return nil, err
  61. }
  62. return out, nil
  63. }
  64. func (c *identityProviderServiceClient) CreateIdentityProvider(ctx context.Context, in *CreateIdentityProviderRequest, opts ...grpc.CallOption) (*IdentityProvider, error) {
  65. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  66. out := new(IdentityProvider)
  67. err := c.cc.Invoke(ctx, IdentityProviderService_CreateIdentityProvider_FullMethodName, in, out, cOpts...)
  68. if err != nil {
  69. return nil, err
  70. }
  71. return out, nil
  72. }
  73. func (c *identityProviderServiceClient) UpdateIdentityProvider(ctx context.Context, in *UpdateIdentityProviderRequest, opts ...grpc.CallOption) (*IdentityProvider, error) {
  74. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  75. out := new(IdentityProvider)
  76. err := c.cc.Invoke(ctx, IdentityProviderService_UpdateIdentityProvider_FullMethodName, in, out, cOpts...)
  77. if err != nil {
  78. return nil, err
  79. }
  80. return out, nil
  81. }
  82. func (c *identityProviderServiceClient) DeleteIdentityProvider(ctx context.Context, in *DeleteIdentityProviderRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
  83. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  84. out := new(emptypb.Empty)
  85. err := c.cc.Invoke(ctx, IdentityProviderService_DeleteIdentityProvider_FullMethodName, in, out, cOpts...)
  86. if err != nil {
  87. return nil, err
  88. }
  89. return out, nil
  90. }
  91. // IdentityProviderServiceServer is the server API for IdentityProviderService service.
  92. // All implementations must embed UnimplementedIdentityProviderServiceServer
  93. // for forward compatibility.
  94. type IdentityProviderServiceServer interface {
  95. // ListIdentityProviders lists identity providers.
  96. ListIdentityProviders(context.Context, *ListIdentityProvidersRequest) (*ListIdentityProvidersResponse, error)
  97. // GetIdentityProvider gets an identity provider.
  98. GetIdentityProvider(context.Context, *GetIdentityProviderRequest) (*IdentityProvider, error)
  99. // CreateIdentityProvider creates an identity provider.
  100. CreateIdentityProvider(context.Context, *CreateIdentityProviderRequest) (*IdentityProvider, error)
  101. // UpdateIdentityProvider updates an identity provider.
  102. UpdateIdentityProvider(context.Context, *UpdateIdentityProviderRequest) (*IdentityProvider, error)
  103. // DeleteIdentityProvider deletes an identity provider.
  104. DeleteIdentityProvider(context.Context, *DeleteIdentityProviderRequest) (*emptypb.Empty, error)
  105. mustEmbedUnimplementedIdentityProviderServiceServer()
  106. }
  107. // UnimplementedIdentityProviderServiceServer must be embedded to have
  108. // forward compatible implementations.
  109. //
  110. // NOTE: this should be embedded by value instead of pointer to avoid a nil
  111. // pointer dereference when methods are called.
  112. type UnimplementedIdentityProviderServiceServer struct{}
  113. func (UnimplementedIdentityProviderServiceServer) ListIdentityProviders(context.Context, *ListIdentityProvidersRequest) (*ListIdentityProvidersResponse, error) {
  114. return nil, status.Errorf(codes.Unimplemented, "method ListIdentityProviders not implemented")
  115. }
  116. func (UnimplementedIdentityProviderServiceServer) GetIdentityProvider(context.Context, *GetIdentityProviderRequest) (*IdentityProvider, error) {
  117. return nil, status.Errorf(codes.Unimplemented, "method GetIdentityProvider not implemented")
  118. }
  119. func (UnimplementedIdentityProviderServiceServer) CreateIdentityProvider(context.Context, *CreateIdentityProviderRequest) (*IdentityProvider, error) {
  120. return nil, status.Errorf(codes.Unimplemented, "method CreateIdentityProvider not implemented")
  121. }
  122. func (UnimplementedIdentityProviderServiceServer) UpdateIdentityProvider(context.Context, *UpdateIdentityProviderRequest) (*IdentityProvider, error) {
  123. return nil, status.Errorf(codes.Unimplemented, "method UpdateIdentityProvider not implemented")
  124. }
  125. func (UnimplementedIdentityProviderServiceServer) DeleteIdentityProvider(context.Context, *DeleteIdentityProviderRequest) (*emptypb.Empty, error) {
  126. return nil, status.Errorf(codes.Unimplemented, "method DeleteIdentityProvider not implemented")
  127. }
  128. func (UnimplementedIdentityProviderServiceServer) mustEmbedUnimplementedIdentityProviderServiceServer() {
  129. }
  130. func (UnimplementedIdentityProviderServiceServer) testEmbeddedByValue() {}
  131. // UnsafeIdentityProviderServiceServer may be embedded to opt out of forward compatibility for this service.
  132. // Use of this interface is not recommended, as added methods to IdentityProviderServiceServer will
  133. // result in compilation errors.
  134. type UnsafeIdentityProviderServiceServer interface {
  135. mustEmbedUnimplementedIdentityProviderServiceServer()
  136. }
  137. func RegisterIdentityProviderServiceServer(s grpc.ServiceRegistrar, srv IdentityProviderServiceServer) {
  138. // If the following call pancis, it indicates UnimplementedIdentityProviderServiceServer was
  139. // embedded by pointer and is nil. This will cause panics if an
  140. // unimplemented method is ever invoked, so we test this at initialization
  141. // time to prevent it from happening at runtime later due to I/O.
  142. if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
  143. t.testEmbeddedByValue()
  144. }
  145. s.RegisterService(&IdentityProviderService_ServiceDesc, srv)
  146. }
  147. func _IdentityProviderService_ListIdentityProviders_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  148. in := new(ListIdentityProvidersRequest)
  149. if err := dec(in); err != nil {
  150. return nil, err
  151. }
  152. if interceptor == nil {
  153. return srv.(IdentityProviderServiceServer).ListIdentityProviders(ctx, in)
  154. }
  155. info := &grpc.UnaryServerInfo{
  156. Server: srv,
  157. FullMethod: IdentityProviderService_ListIdentityProviders_FullMethodName,
  158. }
  159. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  160. return srv.(IdentityProviderServiceServer).ListIdentityProviders(ctx, req.(*ListIdentityProvidersRequest))
  161. }
  162. return interceptor(ctx, in, info, handler)
  163. }
  164. func _IdentityProviderService_GetIdentityProvider_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  165. in := new(GetIdentityProviderRequest)
  166. if err := dec(in); err != nil {
  167. return nil, err
  168. }
  169. if interceptor == nil {
  170. return srv.(IdentityProviderServiceServer).GetIdentityProvider(ctx, in)
  171. }
  172. info := &grpc.UnaryServerInfo{
  173. Server: srv,
  174. FullMethod: IdentityProviderService_GetIdentityProvider_FullMethodName,
  175. }
  176. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  177. return srv.(IdentityProviderServiceServer).GetIdentityProvider(ctx, req.(*GetIdentityProviderRequest))
  178. }
  179. return interceptor(ctx, in, info, handler)
  180. }
  181. func _IdentityProviderService_CreateIdentityProvider_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  182. in := new(CreateIdentityProviderRequest)
  183. if err := dec(in); err != nil {
  184. return nil, err
  185. }
  186. if interceptor == nil {
  187. return srv.(IdentityProviderServiceServer).CreateIdentityProvider(ctx, in)
  188. }
  189. info := &grpc.UnaryServerInfo{
  190. Server: srv,
  191. FullMethod: IdentityProviderService_CreateIdentityProvider_FullMethodName,
  192. }
  193. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  194. return srv.(IdentityProviderServiceServer).CreateIdentityProvider(ctx, req.(*CreateIdentityProviderRequest))
  195. }
  196. return interceptor(ctx, in, info, handler)
  197. }
  198. func _IdentityProviderService_UpdateIdentityProvider_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  199. in := new(UpdateIdentityProviderRequest)
  200. if err := dec(in); err != nil {
  201. return nil, err
  202. }
  203. if interceptor == nil {
  204. return srv.(IdentityProviderServiceServer).UpdateIdentityProvider(ctx, in)
  205. }
  206. info := &grpc.UnaryServerInfo{
  207. Server: srv,
  208. FullMethod: IdentityProviderService_UpdateIdentityProvider_FullMethodName,
  209. }
  210. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  211. return srv.(IdentityProviderServiceServer).UpdateIdentityProvider(ctx, req.(*UpdateIdentityProviderRequest))
  212. }
  213. return interceptor(ctx, in, info, handler)
  214. }
  215. func _IdentityProviderService_DeleteIdentityProvider_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  216. in := new(DeleteIdentityProviderRequest)
  217. if err := dec(in); err != nil {
  218. return nil, err
  219. }
  220. if interceptor == nil {
  221. return srv.(IdentityProviderServiceServer).DeleteIdentityProvider(ctx, in)
  222. }
  223. info := &grpc.UnaryServerInfo{
  224. Server: srv,
  225. FullMethod: IdentityProviderService_DeleteIdentityProvider_FullMethodName,
  226. }
  227. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  228. return srv.(IdentityProviderServiceServer).DeleteIdentityProvider(ctx, req.(*DeleteIdentityProviderRequest))
  229. }
  230. return interceptor(ctx, in, info, handler)
  231. }
  232. // IdentityProviderService_ServiceDesc is the grpc.ServiceDesc for IdentityProviderService service.
  233. // It's only intended for direct use with grpc.RegisterService,
  234. // and not to be introspected or modified (even as a copy)
  235. var IdentityProviderService_ServiceDesc = grpc.ServiceDesc{
  236. ServiceName: "memos.api.v1.IdentityProviderService",
  237. HandlerType: (*IdentityProviderServiceServer)(nil),
  238. Methods: []grpc.MethodDesc{
  239. {
  240. MethodName: "ListIdentityProviders",
  241. Handler: _IdentityProviderService_ListIdentityProviders_Handler,
  242. },
  243. {
  244. MethodName: "GetIdentityProvider",
  245. Handler: _IdentityProviderService_GetIdentityProvider_Handler,
  246. },
  247. {
  248. MethodName: "CreateIdentityProvider",
  249. Handler: _IdentityProviderService_CreateIdentityProvider_Handler,
  250. },
  251. {
  252. MethodName: "UpdateIdentityProvider",
  253. Handler: _IdentityProviderService_UpdateIdentityProvider_Handler,
  254. },
  255. {
  256. MethodName: "DeleteIdentityProvider",
  257. Handler: _IdentityProviderService_DeleteIdentityProvider_Handler,
  258. },
  259. },
  260. Streams: []grpc.StreamDesc{},
  261. Metadata: "api/v1/idp_service.proto",
  262. }