| @@ -0,0 +1,364 @@ |
| 1 | + | // SPDX-License-Identifier: MIT |
| 2 | + | |
| 3 | + | // Code generated by protoc-gen-connect-go. DO NOT EDIT. |
| 4 | + | // |
| 5 | + | // Source: ermite/issue.proto |
| 6 | + | |
| 7 | + | package ermiteconnect |
| 8 | + | |
| 9 | + | import ( |
| 10 | + | ermite "bnema.dev/ermite-api/gen/ermite" |
| 11 | + | connect "connectrpc.com/connect" |
| 12 | + | context "context" |
| 13 | + | errors "errors" |
| 14 | + | http "net/http" |
| 15 | + | strings "strings" |
| 16 | + | ) |
| 17 | + | |
| 18 | + | // This is a compile-time assertion to ensure that this generated file and the connect package are |
| 19 | + | // compatible. If you get a compiler error that this constant is not defined, this code was |
| 20 | + | // generated with a version of connect newer than the one compiled into your binary. You can fix the |
| 21 | + | // problem by either regenerating this code with an older version of connect or updating the connect |
| 22 | + | // version compiled into your binary. |
| 23 | + | const _ = connect.IsAtLeastVersion1_13_0 |
| 24 | + | |
| 25 | + | const ( |
| 26 | + | // IssueServiceName is the fully-qualified name of the IssueService service. |
| 27 | + | IssueServiceName = "ermite.IssueService" |
| 28 | + | ) |
| 29 | + | |
| 30 | + | // These constants are the fully-qualified names of the RPCs defined in this package. They're |
| 31 | + | // exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route. |
| 32 | + | // |
| 33 | + | // Note that these are different from the fully-qualified method names used by |
| 34 | + | // google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to |
| 35 | + | // reflection-formatted method names, remove the leading slash and convert the remaining slash to a |
| 36 | + | // period. |
| 37 | + | const ( |
| 38 | + | // IssueServiceCreateIssueProcedure is the fully-qualified name of the IssueService's CreateIssue |
| 39 | + | // RPC. |
| 40 | + | IssueServiceCreateIssueProcedure = "/ermite.IssueService/CreateIssue" |
| 41 | + | // IssueServiceListIssuesProcedure is the fully-qualified name of the IssueService's ListIssues RPC. |
| 42 | + | IssueServiceListIssuesProcedure = "/ermite.IssueService/ListIssues" |
| 43 | + | // IssueServiceGetIssueProcedure is the fully-qualified name of the IssueService's GetIssue RPC. |
| 44 | + | IssueServiceGetIssueProcedure = "/ermite.IssueService/GetIssue" |
| 45 | + | // IssueServiceAddIssueCommentProcedure is the fully-qualified name of the IssueService's |
| 46 | + | // AddIssueComment RPC. |
| 47 | + | IssueServiceAddIssueCommentProcedure = "/ermite.IssueService/AddIssueComment" |
| 48 | + | // IssueServiceCloseIssueProcedure is the fully-qualified name of the IssueService's CloseIssue RPC. |
| 49 | + | IssueServiceCloseIssueProcedure = "/ermite.IssueService/CloseIssue" |
| 50 | + | // IssueServiceReopenIssueProcedure is the fully-qualified name of the IssueService's ReopenIssue |
| 51 | + | // RPC. |
| 52 | + | IssueServiceReopenIssueProcedure = "/ermite.IssueService/ReopenIssue" |
| 53 | + | // IssueServiceListPendingIssuesProcedure is the fully-qualified name of the IssueService's |
| 54 | + | // ListPendingIssues RPC. |
| 55 | + | IssueServiceListPendingIssuesProcedure = "/ermite.IssueService/ListPendingIssues" |
| 56 | + | // IssueServiceApproveIssueProcedure is the fully-qualified name of the IssueService's ApproveIssue |
| 57 | + | // RPC. |
| 58 | + | IssueServiceApproveIssueProcedure = "/ermite.IssueService/ApproveIssue" |
| 59 | + | // IssueServiceRejectIssueProcedure is the fully-qualified name of the IssueService's RejectIssue |
| 60 | + | // RPC. |
| 61 | + | IssueServiceRejectIssueProcedure = "/ermite.IssueService/RejectIssue" |
| 62 | + | ) |
| 63 | + | |
| 64 | + | // IssueServiceClient is a client for the ermite.IssueService service. |
| 65 | + | type IssueServiceClient interface { |
| 66 | + | // CreateIssue opens an issue. Needs the issue:write scope. |
| 67 | + | CreateIssue(context.Context, *connect.Request[ermite.CreateIssueRequest]) (*connect.Response[ermite.CreateIssueResponse], error) |
| 68 | + | // ListIssues lists issues, highest number first, optionally in one state. |
| 69 | + | ListIssues(context.Context, *connect.Request[ermite.ListIssuesRequest]) (*connect.Response[ermite.ListIssuesResponse], error) |
| 70 | + | // GetIssue returns an issue with its comments. |
| 71 | + | GetIssue(context.Context, *connect.Request[ermite.GetIssueRequest]) (*connect.Response[ermite.GetIssueResponse], error) |
| 72 | + | // AddIssueComment adds a comment. Needs the issue:write scope. |
| 73 | + | AddIssueComment(context.Context, *connect.Request[ermite.AddIssueCommentRequest]) (*connect.Response[ermite.AddIssueCommentResponse], error) |
| 74 | + | // CloseIssue closes an issue. Needs the issue:write scope. |
| 75 | + | CloseIssue(context.Context, *connect.Request[ermite.CloseIssueRequest]) (*connect.Response[ermite.CloseIssueResponse], error) |
| 76 | + | // ReopenIssue reopens an issue. Needs the issue:write scope. |
| 77 | + | ReopenIssue(context.Context, *connect.Request[ermite.ReopenIssueRequest]) (*connect.Response[ermite.ReopenIssueResponse], error) |
| 78 | + | // ListPendingIssues lists issues awaiting moderation, oldest first. Owner |
| 79 | + | // rights only; anyone else gets NOT_FOUND. |
| 80 | + | ListPendingIssues(context.Context, *connect.Request[ermite.ListPendingIssuesRequest]) (*connect.Response[ermite.ListPendingIssuesResponse], error) |
| 81 | + | // ApproveIssue turns a pending issue into an open issue with a new number. |
| 82 | + | // Owner rights only; anyone else gets NOT_FOUND. |
| 83 | + | ApproveIssue(context.Context, *connect.Request[ermite.ApproveIssueRequest]) (*connect.Response[ermite.ApproveIssueResponse], error) |
| 84 | + | // RejectIssue discards a pending issue, optionally banning its submitter. |
| 85 | + | // Owner rights only; anyone else gets NOT_FOUND. |
| 86 | + | RejectIssue(context.Context, *connect.Request[ermite.RejectIssueRequest]) (*connect.Response[ermite.RejectIssueResponse], error) |
| 87 | + | } |
| 88 | + | |
| 89 | + | // NewIssueServiceClient constructs a client for the ermite.IssueService service. By default, it |
| 90 | + | // uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends |
| 91 | + | // uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or |
| 92 | + | // connect.WithGRPCWeb() options. |
| 93 | + | // |
| 94 | + | // The URL supplied here should be the base URL for the Connect or gRPC server (for example, |
| 95 | + | // http://api.acme.com or https://acme.com/grpc). |
| 96 | + | func NewIssueServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) IssueServiceClient { |
| 97 | + | baseURL = strings.TrimRight(baseURL, "/") |
| 98 | + | issueServiceMethods := ermite.File_ermite_issue_proto.Services().ByName("IssueService").Methods() |
| 99 | + | return &issueServiceClient{ |
| 100 | + | createIssue: connect.NewClient[ermite.CreateIssueRequest, ermite.CreateIssueResponse]( |
| 101 | + | httpClient, |
| 102 | + | baseURL+IssueServiceCreateIssueProcedure, |
| 103 | + | connect.WithSchema(issueServiceMethods.ByName("CreateIssue")), |
| 104 | + | connect.WithClientOptions(opts...), |
| 105 | + | ), |
| 106 | + | listIssues: connect.NewClient[ermite.ListIssuesRequest, ermite.ListIssuesResponse]( |
| 107 | + | httpClient, |
| 108 | + | baseURL+IssueServiceListIssuesProcedure, |
| 109 | + | connect.WithSchema(issueServiceMethods.ByName("ListIssues")), |
| 110 | + | connect.WithClientOptions(opts...), |
| 111 | + | ), |
| 112 | + | getIssue: connect.NewClient[ermite.GetIssueRequest, ermite.GetIssueResponse]( |
| 113 | + | httpClient, |
| 114 | + | baseURL+IssueServiceGetIssueProcedure, |
| 115 | + | connect.WithSchema(issueServiceMethods.ByName("GetIssue")), |
| 116 | + | connect.WithClientOptions(opts...), |
| 117 | + | ), |
| 118 | + | addIssueComment: connect.NewClient[ermite.AddIssueCommentRequest, ermite.AddIssueCommentResponse]( |
| 119 | + | httpClient, |
| 120 | + | baseURL+IssueServiceAddIssueCommentProcedure, |
| 121 | + | connect.WithSchema(issueServiceMethods.ByName("AddIssueComment")), |
| 122 | + | connect.WithClientOptions(opts...), |
| 123 | + | ), |
| 124 | + | closeIssue: connect.NewClient[ermite.CloseIssueRequest, ermite.CloseIssueResponse]( |
| 125 | + | httpClient, |
| 126 | + | baseURL+IssueServiceCloseIssueProcedure, |
| 127 | + | connect.WithSchema(issueServiceMethods.ByName("CloseIssue")), |
| 128 | + | connect.WithClientOptions(opts...), |
| 129 | + | ), |
| 130 | + | reopenIssue: connect.NewClient[ermite.ReopenIssueRequest, ermite.ReopenIssueResponse]( |
| 131 | + | httpClient, |
| 132 | + | baseURL+IssueServiceReopenIssueProcedure, |
| 133 | + | connect.WithSchema(issueServiceMethods.ByName("ReopenIssue")), |
| 134 | + | connect.WithClientOptions(opts...), |
| 135 | + | ), |
| 136 | + | listPendingIssues: connect.NewClient[ermite.ListPendingIssuesRequest, ermite.ListPendingIssuesResponse]( |
| 137 | + | httpClient, |
| 138 | + | baseURL+IssueServiceListPendingIssuesProcedure, |
| 139 | + | connect.WithSchema(issueServiceMethods.ByName("ListPendingIssues")), |
| 140 | + | connect.WithClientOptions(opts...), |
| 141 | + | ), |
| 142 | + | approveIssue: connect.NewClient[ermite.ApproveIssueRequest, ermite.ApproveIssueResponse]( |
| 143 | + | httpClient, |
| 144 | + | baseURL+IssueServiceApproveIssueProcedure, |
| 145 | + | connect.WithSchema(issueServiceMethods.ByName("ApproveIssue")), |
| 146 | + | connect.WithClientOptions(opts...), |
| 147 | + | ), |
| 148 | + | rejectIssue: connect.NewClient[ermite.RejectIssueRequest, ermite.RejectIssueResponse]( |
| 149 | + | httpClient, |
| 150 | + | baseURL+IssueServiceRejectIssueProcedure, |
| 151 | + | connect.WithSchema(issueServiceMethods.ByName("RejectIssue")), |
| 152 | + | connect.WithClientOptions(opts...), |
| 153 | + | ), |
| 154 | + | } |
| 155 | + | } |
| 156 | + | |
| 157 | + | // issueServiceClient implements IssueServiceClient. |
| 158 | + | type issueServiceClient struct { |
| 159 | + | createIssue *connect.Client[ermite.CreateIssueRequest, ermite.CreateIssueResponse] |
| 160 | + | listIssues *connect.Client[ermite.ListIssuesRequest, ermite.ListIssuesResponse] |
| 161 | + | getIssue *connect.Client[ermite.GetIssueRequest, ermite.GetIssueResponse] |
| 162 | + | addIssueComment *connect.Client[ermite.AddIssueCommentRequest, ermite.AddIssueCommentResponse] |
| 163 | + | closeIssue *connect.Client[ermite.CloseIssueRequest, ermite.CloseIssueResponse] |
| 164 | + | reopenIssue *connect.Client[ermite.ReopenIssueRequest, ermite.ReopenIssueResponse] |
| 165 | + | listPendingIssues *connect.Client[ermite.ListPendingIssuesRequest, ermite.ListPendingIssuesResponse] |
| 166 | + | approveIssue *connect.Client[ermite.ApproveIssueRequest, ermite.ApproveIssueResponse] |
| 167 | + | rejectIssue *connect.Client[ermite.RejectIssueRequest, ermite.RejectIssueResponse] |
| 168 | + | } |
| 169 | + | |
| 170 | + | // CreateIssue calls ermite.IssueService.CreateIssue. |
| 171 | + | func (c *issueServiceClient) CreateIssue(ctx context.Context, req *connect.Request[ermite.CreateIssueRequest]) (*connect.Response[ermite.CreateIssueResponse], error) { |
| 172 | + | return c.createIssue.CallUnary(ctx, req) |
| 173 | + | } |
| 174 | + | |
| 175 | + | // ListIssues calls ermite.IssueService.ListIssues. |
| 176 | + | func (c *issueServiceClient) ListIssues(ctx context.Context, req *connect.Request[ermite.ListIssuesRequest]) (*connect.Response[ermite.ListIssuesResponse], error) { |
| 177 | + | return c.listIssues.CallUnary(ctx, req) |
| 178 | + | } |
| 179 | + | |
| 180 | + | // GetIssue calls ermite.IssueService.GetIssue. |
| 181 | + | func (c *issueServiceClient) GetIssue(ctx context.Context, req *connect.Request[ermite.GetIssueRequest]) (*connect.Response[ermite.GetIssueResponse], error) { |
| 182 | + | return c.getIssue.CallUnary(ctx, req) |
| 183 | + | } |
| 184 | + | |
| 185 | + | // AddIssueComment calls ermite.IssueService.AddIssueComment. |
| 186 | + | func (c *issueServiceClient) AddIssueComment(ctx context.Context, req *connect.Request[ermite.AddIssueCommentRequest]) (*connect.Response[ermite.AddIssueCommentResponse], error) { |
| 187 | + | return c.addIssueComment.CallUnary(ctx, req) |
| 188 | + | } |
| 189 | + | |
| 190 | + | // CloseIssue calls ermite.IssueService.CloseIssue. |
| 191 | + | func (c *issueServiceClient) CloseIssue(ctx context.Context, req *connect.Request[ermite.CloseIssueRequest]) (*connect.Response[ermite.CloseIssueResponse], error) { |
| 192 | + | return c.closeIssue.CallUnary(ctx, req) |
| 193 | + | } |
| 194 | + | |
| 195 | + | // ReopenIssue calls ermite.IssueService.ReopenIssue. |
| 196 | + | func (c *issueServiceClient) ReopenIssue(ctx context.Context, req *connect.Request[ermite.ReopenIssueRequest]) (*connect.Response[ermite.ReopenIssueResponse], error) { |
| 197 | + | return c.reopenIssue.CallUnary(ctx, req) |
| 198 | + | } |
| 199 | + | |
| 200 | + | // ListPendingIssues calls ermite.IssueService.ListPendingIssues. |
| 201 | + | func (c *issueServiceClient) ListPendingIssues(ctx context.Context, req *connect.Request[ermite.ListPendingIssuesRequest]) (*connect.Response[ermite.ListPendingIssuesResponse], error) { |
| 202 | + | return c.listPendingIssues.CallUnary(ctx, req) |
| 203 | + | } |
| 204 | + | |
| 205 | + | // ApproveIssue calls ermite.IssueService.ApproveIssue. |
| 206 | + | func (c *issueServiceClient) ApproveIssue(ctx context.Context, req *connect.Request[ermite.ApproveIssueRequest]) (*connect.Response[ermite.ApproveIssueResponse], error) { |
| 207 | + | return c.approveIssue.CallUnary(ctx, req) |
| 208 | + | } |
| 209 | + | |
| 210 | + | // RejectIssue calls ermite.IssueService.RejectIssue. |
| 211 | + | func (c *issueServiceClient) RejectIssue(ctx context.Context, req *connect.Request[ermite.RejectIssueRequest]) (*connect.Response[ermite.RejectIssueResponse], error) { |
| 212 | + | return c.rejectIssue.CallUnary(ctx, req) |
| 213 | + | } |
| 214 | + | |
| 215 | + | // IssueServiceHandler is an implementation of the ermite.IssueService service. |
| 216 | + | type IssueServiceHandler interface { |
| 217 | + | // CreateIssue opens an issue. Needs the issue:write scope. |
| 218 | + | CreateIssue(context.Context, *connect.Request[ermite.CreateIssueRequest]) (*connect.Response[ermite.CreateIssueResponse], error) |
| 219 | + | // ListIssues lists issues, highest number first, optionally in one state. |
| 220 | + | ListIssues(context.Context, *connect.Request[ermite.ListIssuesRequest]) (*connect.Response[ermite.ListIssuesResponse], error) |
| 221 | + | // GetIssue returns an issue with its comments. |
| 222 | + | GetIssue(context.Context, *connect.Request[ermite.GetIssueRequest]) (*connect.Response[ermite.GetIssueResponse], error) |
| 223 | + | // AddIssueComment adds a comment. Needs the issue:write scope. |
| 224 | + | AddIssueComment(context.Context, *connect.Request[ermite.AddIssueCommentRequest]) (*connect.Response[ermite.AddIssueCommentResponse], error) |
| 225 | + | // CloseIssue closes an issue. Needs the issue:write scope. |
| 226 | + | CloseIssue(context.Context, *connect.Request[ermite.CloseIssueRequest]) (*connect.Response[ermite.CloseIssueResponse], error) |
| 227 | + | // ReopenIssue reopens an issue. Needs the issue:write scope. |
| 228 | + | ReopenIssue(context.Context, *connect.Request[ermite.ReopenIssueRequest]) (*connect.Response[ermite.ReopenIssueResponse], error) |
| 229 | + | // ListPendingIssues lists issues awaiting moderation, oldest first. Owner |
| 230 | + | // rights only; anyone else gets NOT_FOUND. |
| 231 | + | ListPendingIssues(context.Context, *connect.Request[ermite.ListPendingIssuesRequest]) (*connect.Response[ermite.ListPendingIssuesResponse], error) |
| 232 | + | // ApproveIssue turns a pending issue into an open issue with a new number. |
| 233 | + | // Owner rights only; anyone else gets NOT_FOUND. |
| 234 | + | ApproveIssue(context.Context, *connect.Request[ermite.ApproveIssueRequest]) (*connect.Response[ermite.ApproveIssueResponse], error) |
| 235 | + | // RejectIssue discards a pending issue, optionally banning its submitter. |
| 236 | + | // Owner rights only; anyone else gets NOT_FOUND. |
| 237 | + | RejectIssue(context.Context, *connect.Request[ermite.RejectIssueRequest]) (*connect.Response[ermite.RejectIssueResponse], error) |
| 238 | + | } |
| 239 | + | |
| 240 | + | // NewIssueServiceHandler builds an HTTP handler from the service implementation. It returns the |
| 241 | + | // path on which to mount the handler and the handler itself. |
| 242 | + | // |
| 243 | + | // By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf |
| 244 | + | // and JSON codecs. They also support gzip compression. |
| 245 | + | func NewIssueServiceHandler(svc IssueServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { |
| 246 | + | issueServiceMethods := ermite.File_ermite_issue_proto.Services().ByName("IssueService").Methods() |
| 247 | + | issueServiceCreateIssueHandler := connect.NewUnaryHandler( |
| 248 | + | IssueServiceCreateIssueProcedure, |
| 249 | + | svc.CreateIssue, |
| 250 | + | connect.WithSchema(issueServiceMethods.ByName("CreateIssue")), |
| 251 | + | connect.WithHandlerOptions(opts...), |
| 252 | + | ) |
| 253 | + | issueServiceListIssuesHandler := connect.NewUnaryHandler( |
| 254 | + | IssueServiceListIssuesProcedure, |
| 255 | + | svc.ListIssues, |
| 256 | + | connect.WithSchema(issueServiceMethods.ByName("ListIssues")), |
| 257 | + | connect.WithHandlerOptions(opts...), |
| 258 | + | ) |
| 259 | + | issueServiceGetIssueHandler := connect.NewUnaryHandler( |
| 260 | + | IssueServiceGetIssueProcedure, |
| 261 | + | svc.GetIssue, |
| 262 | + | connect.WithSchema(issueServiceMethods.ByName("GetIssue")), |
| 263 | + | connect.WithHandlerOptions(opts...), |
| 264 | + | ) |
| 265 | + | issueServiceAddIssueCommentHandler := connect.NewUnaryHandler( |
| 266 | + | IssueServiceAddIssueCommentProcedure, |
| 267 | + | svc.AddIssueComment, |
| 268 | + | connect.WithSchema(issueServiceMethods.ByName("AddIssueComment")), |
| 269 | + | connect.WithHandlerOptions(opts...), |
| 270 | + | ) |
| 271 | + | issueServiceCloseIssueHandler := connect.NewUnaryHandler( |
| 272 | + | IssueServiceCloseIssueProcedure, |
| 273 | + | svc.CloseIssue, |
| 274 | + | connect.WithSchema(issueServiceMethods.ByName("CloseIssue")), |
| 275 | + | connect.WithHandlerOptions(opts...), |
| 276 | + | ) |
| 277 | + | issueServiceReopenIssueHandler := connect.NewUnaryHandler( |
| 278 | + | IssueServiceReopenIssueProcedure, |
| 279 | + | svc.ReopenIssue, |
| 280 | + | connect.WithSchema(issueServiceMethods.ByName("ReopenIssue")), |
| 281 | + | connect.WithHandlerOptions(opts...), |
| 282 | + | ) |
| 283 | + | issueServiceListPendingIssuesHandler := connect.NewUnaryHandler( |
| 284 | + | IssueServiceListPendingIssuesProcedure, |
| 285 | + | svc.ListPendingIssues, |
| 286 | + | connect.WithSchema(issueServiceMethods.ByName("ListPendingIssues")), |
| 287 | + | connect.WithHandlerOptions(opts...), |
| 288 | + | ) |
| 289 | + | issueServiceApproveIssueHandler := connect.NewUnaryHandler( |
| 290 | + | IssueServiceApproveIssueProcedure, |
| 291 | + | svc.ApproveIssue, |
| 292 | + | connect.WithSchema(issueServiceMethods.ByName("ApproveIssue")), |
| 293 | + | connect.WithHandlerOptions(opts...), |
| 294 | + | ) |
| 295 | + | issueServiceRejectIssueHandler := connect.NewUnaryHandler( |
| 296 | + | IssueServiceRejectIssueProcedure, |
| 297 | + | svc.RejectIssue, |
| 298 | + | connect.WithSchema(issueServiceMethods.ByName("RejectIssue")), |
| 299 | + | connect.WithHandlerOptions(opts...), |
| 300 | + | ) |
| 301 | + | return "/ermite.IssueService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { |
| 302 | + | switch r.URL.Path { |
| 303 | + | case IssueServiceCreateIssueProcedure: |
| 304 | + | issueServiceCreateIssueHandler.ServeHTTP(w, r) |
| 305 | + | case IssueServiceListIssuesProcedure: |
| 306 | + | issueServiceListIssuesHandler.ServeHTTP(w, r) |
| 307 | + | case IssueServiceGetIssueProcedure: |
| 308 | + | issueServiceGetIssueHandler.ServeHTTP(w, r) |
| 309 | + | case IssueServiceAddIssueCommentProcedure: |
| 310 | + | issueServiceAddIssueCommentHandler.ServeHTTP(w, r) |
| 311 | + | case IssueServiceCloseIssueProcedure: |
| 312 | + | issueServiceCloseIssueHandler.ServeHTTP(w, r) |
| 313 | + | case IssueServiceReopenIssueProcedure: |
| 314 | + | issueServiceReopenIssueHandler.ServeHTTP(w, r) |
| 315 | + | case IssueServiceListPendingIssuesProcedure: |
| 316 | + | issueServiceListPendingIssuesHandler.ServeHTTP(w, r) |
| 317 | + | case IssueServiceApproveIssueProcedure: |
| 318 | + | issueServiceApproveIssueHandler.ServeHTTP(w, r) |
| 319 | + | case IssueServiceRejectIssueProcedure: |
| 320 | + | issueServiceRejectIssueHandler.ServeHTTP(w, r) |
| 321 | + | default: |
| 322 | + | http.NotFound(w, r) |
| 323 | + | } |
| 324 | + | }) |
| 325 | + | } |
| 326 | + | |
| 327 | + | // UnimplementedIssueServiceHandler returns CodeUnimplemented from all methods. |
| 328 | + | type UnimplementedIssueServiceHandler struct{} |
| 329 | + | |
| 330 | + | func (UnimplementedIssueServiceHandler) CreateIssue(context.Context, *connect.Request[ermite.CreateIssueRequest]) (*connect.Response[ermite.CreateIssueResponse], error) { |
| 331 | + | return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.IssueService.CreateIssue is not implemented")) |
| 332 | + | } |
| 333 | + | |
| 334 | + | func (UnimplementedIssueServiceHandler) ListIssues(context.Context, *connect.Request[ermite.ListIssuesRequest]) (*connect.Response[ermite.ListIssuesResponse], error) { |
| 335 | + | return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.IssueService.ListIssues is not implemented")) |
| 336 | + | } |
| 337 | + | |
| 338 | + | func (UnimplementedIssueServiceHandler) GetIssue(context.Context, *connect.Request[ermite.GetIssueRequest]) (*connect.Response[ermite.GetIssueResponse], error) { |
| 339 | + | return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.IssueService.GetIssue is not implemented")) |
| 340 | + | } |
| 341 | + | |
| 342 | + | func (UnimplementedIssueServiceHandler) AddIssueComment(context.Context, *connect.Request[ermite.AddIssueCommentRequest]) (*connect.Response[ermite.AddIssueCommentResponse], error) { |
| 343 | + | return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.IssueService.AddIssueComment is not implemented")) |
| 344 | + | } |
| 345 | + | |
| 346 | + | func (UnimplementedIssueServiceHandler) CloseIssue(context.Context, *connect.Request[ermite.CloseIssueRequest]) (*connect.Response[ermite.CloseIssueResponse], error) { |
| 347 | + | return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.IssueService.CloseIssue is not implemented")) |
| 348 | + | } |
| 349 | + | |
| 350 | + | func (UnimplementedIssueServiceHandler) ReopenIssue(context.Context, *connect.Request[ermite.ReopenIssueRequest]) (*connect.Response[ermite.ReopenIssueResponse], error) { |
| 351 | + | return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.IssueService.ReopenIssue is not implemented")) |
| 352 | + | } |
| 353 | + | |
| 354 | + | func (UnimplementedIssueServiceHandler) ListPendingIssues(context.Context, *connect.Request[ermite.ListPendingIssuesRequest]) (*connect.Response[ermite.ListPendingIssuesResponse], error) { |
| 355 | + | return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.IssueService.ListPendingIssues is not implemented")) |
| 356 | + | } |
| 357 | + | |
| 358 | + | func (UnimplementedIssueServiceHandler) ApproveIssue(context.Context, *connect.Request[ermite.ApproveIssueRequest]) (*connect.Response[ermite.ApproveIssueResponse], error) { |
| 359 | + | return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.IssueService.ApproveIssue is not implemented")) |
| 360 | + | } |
| 361 | + | |
| 362 | + | func (UnimplementedIssueServiceHandler) RejectIssue(context.Context, *connect.Request[ermite.RejectIssueRequest]) (*connect.Response[ermite.RejectIssueResponse], error) { |
| 363 | + | return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.IssueService.RejectIssue is not implemented")) |
| 364 | + | } |