aboutsummaryrefslogtreecommitdiff
path: root/buf/mimi/announce
diff options
context:
space:
mode:
authorXe Iaso <me@xeiaso.net>2024-07-01 17:39:28 -0400
committerXe Iaso <me@xeiaso.net>2024-07-01 17:39:28 -0400
commitb64e0a9c8b8edd7f110f8c5ce211c2a88ba7fe4f (patch)
tree2d35a454673c7187bb85a9582e31cf1f5374d313 /buf/mimi/announce
parent0a905ce935191132939843943a128b82d1b2acd5 (diff)
downloadx-b64e0a9c8b8edd7f110f8c5ce211c2a88ba7fe4f.tar.xz
x-b64e0a9c8b8edd7f110f8c5ce211c2a88ba7fe4f.zip
fix buf
Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to 'buf/mimi/announce')
-rw-r--r--buf/mimi/announce/announce.pb.go80
-rw-r--r--buf/mimi/announce/announce.proto10
-rw-r--r--buf/mimi/announce/announceconnect/announce.connect.go114
3 files changed, 204 insertions, 0 deletions
diff --git a/buf/mimi/announce/announce.pb.go b/buf/mimi/announce/announce.pb.go
new file mode 100644
index 0000000..46b23d6
--- /dev/null
+++ b/buf/mimi/announce/announce.pb.go
@@ -0,0 +1,80 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.34.2
+// protoc (unknown)
+// source: mimi/announce/announce.proto
+
+package announce
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ emptypb "google.golang.org/protobuf/types/known/emptypb"
+ reflect "reflect"
+ jsonfeed "within.website/x/buf/external/jsonfeed"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+var File_mimi_announce_announce_proto protoreflect.FileDescriptor
+
+var file_mimi_announce_announce_proto_rawDesc = []byte{
+ 0x0a, 0x1c, 0x6d, 0x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, 0x70, 0x74, 0x79, 0x22, 0x00, 0x42,
+ 0x24, 0x5a, 0x22, 0x77, 0x69, 0x74, 0x68, 0x69, 0x6e, 0x2e, 0x77, 0x65, 0x62, 0x73, 0x69, 0x74,
+ 0x65, 0x2f, 0x78, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x6d, 0x69, 0x6d, 0x69, 0x2f, 0x61, 0x6e, 0x6e,
+ 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var file_mimi_announce_announce_proto_goTypes = []any{
+ (*jsonfeed.Item)(nil), // 0: jsonfeed.Item
+ (*emptypb.Empty)(nil), // 1: google.protobuf.Empty
+}
+var file_mimi_announce_announce_proto_depIdxs = []int32{
+ 0, // 0: within.website.x.mimi.announce.Announce.Announce:input_type -> jsonfeed.Item
+ 1, // 1: within.website.x.mimi.announce.Announce.Announce:output_type -> google.protobuf.Empty
+ 1, // [1:2] is the sub-list for method output_type
+ 0, // [0:1] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_mimi_announce_announce_proto_init() }
+func file_mimi_announce_announce_proto_init() {
+ if File_mimi_announce_announce_proto != nil {
+ return
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_mimi_announce_announce_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 0,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_mimi_announce_announce_proto_goTypes,
+ DependencyIndexes: file_mimi_announce_announce_proto_depIdxs,
+ }.Build()
+ File_mimi_announce_announce_proto = out.File
+ file_mimi_announce_announce_proto_rawDesc = nil
+ file_mimi_announce_announce_proto_goTypes = nil
+ file_mimi_announce_announce_proto_depIdxs = nil
+}
diff --git a/buf/mimi/announce/announce.proto b/buf/mimi/announce/announce.proto
new file mode 100644
index 0000000..9d23516
--- /dev/null
+++ b/buf/mimi/announce/announce.proto
@@ -0,0 +1,10 @@
+syntax = "proto3";
+package within.website.x.mimi.announce;
+option go_package = "within.website/x/buf/mimi/announce";
+
+import "google/protobuf/empty.proto";
+import "external/jsonfeed/jsonfeed.proto";
+
+service Announce {
+ rpc Announce(jsonfeed.Item) returns (google.protobuf.Empty) {}
+} \ No newline at end of file
diff --git a/buf/mimi/announce/announceconnect/announce.connect.go b/buf/mimi/announce/announceconnect/announce.connect.go
new file mode 100644
index 0000000..9eaf1b3
--- /dev/null
+++ b/buf/mimi/announce/announceconnect/announce.connect.go
@@ -0,0 +1,114 @@
+// Code generated by protoc-gen-connect-go. DO NOT EDIT.
+//
+// Source: mimi/announce/announce.proto
+
+package announceconnect
+
+import (
+ connect "connectrpc.com/connect"
+ context "context"
+ errors "errors"
+ emptypb "google.golang.org/protobuf/types/known/emptypb"
+ http "net/http"
+ strings "strings"
+ jsonfeed "within.website/x/buf/external/jsonfeed"
+ announce "within.website/x/buf/mimi/announce"
+)
+
+// This is a compile-time assertion to ensure that this generated file and the connect package are
+// compatible. If you get a compiler error that this constant is not defined, this code was
+// generated with a version of connect newer than the one compiled into your binary. You can fix the
+// problem by either regenerating this code with an older version of connect or updating the connect
+// version compiled into your binary.
+const _ = connect.IsAtLeastVersion1_13_0
+
+const (
+ // AnnounceName is the fully-qualified name of the Announce service.
+ AnnounceName = "within.website.x.mimi.announce.Announce"
+)
+
+// These constants are the fully-qualified names of the RPCs defined in this package. They're
+// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.
+//
+// Note that these are different from the fully-qualified method names used by
+// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to
+// reflection-formatted method names, remove the leading slash and convert the remaining slash to a
+// period.
+const (
+ // AnnounceAnnounceProcedure is the fully-qualified name of the Announce's Announce RPC.
+ AnnounceAnnounceProcedure = "/within.website.x.mimi.announce.Announce/Announce"
+)
+
+// These variables are the protoreflect.Descriptor objects for the RPCs defined in this package.
+var (
+ announceServiceDescriptor = announce.File_mimi_announce_announce_proto.Services().ByName("Announce")
+ announceAnnounceMethodDescriptor = announceServiceDescriptor.Methods().ByName("Announce")
+)
+
+// AnnounceClient is a client for the within.website.x.mimi.announce.Announce service.
+type AnnounceClient interface {
+ Announce(context.Context, *connect.Request[jsonfeed.Item]) (*connect.Response[emptypb.Empty], error)
+}
+
+// NewAnnounceClient constructs a client for the within.website.x.mimi.announce.Announce service. By
+// default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses,
+// and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the
+// connect.WithGRPC() or connect.WithGRPCWeb() options.
+//
+// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
+// http://api.acme.com or https://acme.com/grpc).
+func NewAnnounceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) AnnounceClient {
+ baseURL = strings.TrimRight(baseURL, "/")
+ return &announceClient{
+ announce: connect.NewClient[jsonfeed.Item, emptypb.Empty](
+ httpClient,
+ baseURL+AnnounceAnnounceProcedure,
+ connect.WithSchema(announceAnnounceMethodDescriptor),
+ connect.WithClientOptions(opts...),
+ ),
+ }
+}
+
+// announceClient implements AnnounceClient.
+type announceClient struct {
+ announce *connect.Client[jsonfeed.Item, emptypb.Empty]
+}
+
+// Announce calls within.website.x.mimi.announce.Announce.Announce.
+func (c *announceClient) Announce(ctx context.Context, req *connect.Request[jsonfeed.Item]) (*connect.Response[emptypb.Empty], error) {
+ return c.announce.CallUnary(ctx, req)
+}
+
+// AnnounceHandler is an implementation of the within.website.x.mimi.announce.Announce service.
+type AnnounceHandler interface {
+ Announce(context.Context, *connect.Request[jsonfeed.Item]) (*connect.Response[emptypb.Empty], error)
+}
+
+// NewAnnounceHandler builds an HTTP handler from the service implementation. It returns the path on
+// which to mount the handler and the handler itself.
+//
+// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
+// and JSON codecs. They also support gzip compression.
+func NewAnnounceHandler(svc AnnounceHandler, opts ...connect.HandlerOption) (string, http.Handler) {
+ announceAnnounceHandler := connect.NewUnaryHandler(
+ AnnounceAnnounceProcedure,
+ svc.Announce,
+ connect.WithSchema(announceAnnounceMethodDescriptor),
+ connect.WithHandlerOptions(opts...),
+ )
+ return "/within.website.x.mimi.announce.Announce/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ switch r.URL.Path {
+ case AnnounceAnnounceProcedure:
+ announceAnnounceHandler.ServeHTTP(w, r)
+ default:
+ http.NotFound(w, r)
+ }
+ })
+}
+
+// UnimplementedAnnounceHandler returns CodeUnimplemented from all methods.
+type UnimplementedAnnounceHandler struct{}
+
+func (UnimplementedAnnounceHandler) Announce(context.Context, *connect.Request[jsonfeed.Item]) (*connect.Response[emptypb.Empty], error) {
+ return nil, connect.NewError(connect.CodeUnimplemented, errors.New("within.website.x.mimi.announce.Announce.Announce is not implemented"))
+}