···11+// This is a subset of github:Xe/x/proto/mi.proto
22+33+syntax = "proto3";
44+package within.website.x.mi;
55+option go_package = "xeiaso.net/v4/pb/external/mi";
66+77+import "google/protobuf/timestamp.proto";
88+99+// Event is a single event that Xe will be attending.
1010+message Event {
1111+ // The name of the event
1212+ string name = 1;
1313+ // The URL for the event
1414+ string url = 2;
1515+ // The day the event starts
1616+ google.protobuf.Timestamp start_date = 3;
1717+ // The day the event ends
1818+ google.protobuf.Timestamp end_date = 4;
1919+ // The location of the event (human-readable)
2020+ string location = 5;
2121+ // The ID of the event
2222+ int32 id = 6;
2323+ // The description of the event
2424+ string description = 7;
2525+}
2626+2727+// A feed of events, result from mi query.
2828+message EventFeed {
2929+ // The events in the feed
3030+ repeated Event events = 1;
3131+}
···55import "google/protobuf/empty.proto";
66import "google/protobuf/timestamp.proto";
7788+import "external/mi.proto"; // unused in this file
89import "external/protofeed.proto";
9101011// Meta lets users fetch site metadata.
···3233service Feed {
3334 // Get fetches the current feed of posts.
3435 rpc Get(google.protobuf.Empty) returns (protofeed.Feed);
3636+}
3737+3838+// Events lets users fetch the current feed of events that Xe will be attending.
3939+service Events {
4040+ // Get fetches the current feed of upcoming events.
4141+ rpc Get(google.protobuf.Empty) returns (within.website.x.mi.EventFeed);
3542}
+519-20
pb/xesite.twirp.go
···18181919import google_protobuf "google.golang.org/protobuf/types/known/emptypb"
2020import protofeed "xeiaso.net/v4/pb/external/protofeed"
2121+import within_website_x_mi "xeiaso.net/v4/pb/external/mi"
21222223import bytes "bytes"
2324import errors "errors"
···10231024 return baseServicePath(s.pathPrefix, "xeiaso.net", "Feed")
10241025}
1025102610271027+// ================
10281028+// Events Interface
10291029+// ================
10301030+10311031+// Events lets users fetch the current feed of events that Xe will be attending.
10321032+type Events interface {
10331033+ // Get fetches the current feed of upcoming events.
10341034+ Get(context.Context, *google_protobuf.Empty) (*within_website_x_mi.EventFeed, error)
10351035+}
10361036+10371037+// ======================
10381038+// Events Protobuf Client
10391039+// ======================
10401040+10411041+type eventsProtobufClient struct {
10421042+ client HTTPClient
10431043+ urls [1]string
10441044+ interceptor twirp.Interceptor
10451045+ opts twirp.ClientOptions
10461046+}
10471047+10481048+// NewEventsProtobufClient creates a Protobuf client that implements the Events interface.
10491049+// It communicates using Protobuf and can be configured with a custom HTTPClient.
10501050+func NewEventsProtobufClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) Events {
10511051+ if c, ok := client.(*http.Client); ok {
10521052+ client = withoutRedirects(c)
10531053+ }
10541054+10551055+ clientOpts := twirp.ClientOptions{}
10561056+ for _, o := range opts {
10571057+ o(&clientOpts)
10581058+ }
10591059+10601060+ // Using ReadOpt allows backwards and forwards compatibility with new options in the future
10611061+ literalURLs := false
10621062+ _ = clientOpts.ReadOpt("literalURLs", &literalURLs)
10631063+ var pathPrefix string
10641064+ if ok := clientOpts.ReadOpt("pathPrefix", &pathPrefix); !ok {
10651065+ pathPrefix = "/twirp" // default prefix
10661066+ }
10671067+10681068+ // Build method URLs: <baseURL>[<prefix>]/<package>.<Service>/<Method>
10691069+ serviceURL := sanitizeBaseURL(baseURL)
10701070+ serviceURL += baseServicePath(pathPrefix, "xeiaso.net", "Events")
10711071+ urls := [1]string{
10721072+ serviceURL + "Get",
10731073+ }
10741074+10751075+ return &eventsProtobufClient{
10761076+ client: client,
10771077+ urls: urls,
10781078+ interceptor: twirp.ChainInterceptors(clientOpts.Interceptors...),
10791079+ opts: clientOpts,
10801080+ }
10811081+}
10821082+10831083+func (c *eventsProtobufClient) Get(ctx context.Context, in *google_protobuf.Empty) (*within_website_x_mi.EventFeed, error) {
10841084+ ctx = ctxsetters.WithPackageName(ctx, "xeiaso.net")
10851085+ ctx = ctxsetters.WithServiceName(ctx, "Events")
10861086+ ctx = ctxsetters.WithMethodName(ctx, "Get")
10871087+ caller := c.callGet
10881088+ if c.interceptor != nil {
10891089+ caller = func(ctx context.Context, req *google_protobuf.Empty) (*within_website_x_mi.EventFeed, error) {
10901090+ resp, err := c.interceptor(
10911091+ func(ctx context.Context, req interface{}) (interface{}, error) {
10921092+ typedReq, ok := req.(*google_protobuf.Empty)
10931093+ if !ok {
10941094+ return nil, twirp.InternalError("failed type assertion req.(*google_protobuf.Empty) when calling interceptor")
10951095+ }
10961096+ return c.callGet(ctx, typedReq)
10971097+ },
10981098+ )(ctx, req)
10991099+ if resp != nil {
11001100+ typedResp, ok := resp.(*within_website_x_mi.EventFeed)
11011101+ if !ok {
11021102+ return nil, twirp.InternalError("failed type assertion resp.(*within_website_x_mi.EventFeed) when calling interceptor")
11031103+ }
11041104+ return typedResp, err
11051105+ }
11061106+ return nil, err
11071107+ }
11081108+ }
11091109+ return caller(ctx, in)
11101110+}
11111111+11121112+func (c *eventsProtobufClient) callGet(ctx context.Context, in *google_protobuf.Empty) (*within_website_x_mi.EventFeed, error) {
11131113+ out := new(within_website_x_mi.EventFeed)
11141114+ ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[0], in, out)
11151115+ if err != nil {
11161116+ twerr, ok := err.(twirp.Error)
11171117+ if !ok {
11181118+ twerr = twirp.InternalErrorWith(err)
11191119+ }
11201120+ callClientError(ctx, c.opts.Hooks, twerr)
11211121+ return nil, err
11221122+ }
11231123+11241124+ callClientResponseReceived(ctx, c.opts.Hooks)
11251125+11261126+ return out, nil
11271127+}
11281128+11291129+// ==================
11301130+// Events JSON Client
11311131+// ==================
11321132+11331133+type eventsJSONClient struct {
11341134+ client HTTPClient
11351135+ urls [1]string
11361136+ interceptor twirp.Interceptor
11371137+ opts twirp.ClientOptions
11381138+}
11391139+11401140+// NewEventsJSONClient creates a JSON client that implements the Events interface.
11411141+// It communicates using JSON and can be configured with a custom HTTPClient.
11421142+func NewEventsJSONClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) Events {
11431143+ if c, ok := client.(*http.Client); ok {
11441144+ client = withoutRedirects(c)
11451145+ }
11461146+11471147+ clientOpts := twirp.ClientOptions{}
11481148+ for _, o := range opts {
11491149+ o(&clientOpts)
11501150+ }
11511151+11521152+ // Using ReadOpt allows backwards and forwards compatibility with new options in the future
11531153+ literalURLs := false
11541154+ _ = clientOpts.ReadOpt("literalURLs", &literalURLs)
11551155+ var pathPrefix string
11561156+ if ok := clientOpts.ReadOpt("pathPrefix", &pathPrefix); !ok {
11571157+ pathPrefix = "/twirp" // default prefix
11581158+ }
11591159+11601160+ // Build method URLs: <baseURL>[<prefix>]/<package>.<Service>/<Method>
11611161+ serviceURL := sanitizeBaseURL(baseURL)
11621162+ serviceURL += baseServicePath(pathPrefix, "xeiaso.net", "Events")
11631163+ urls := [1]string{
11641164+ serviceURL + "Get",
11651165+ }
11661166+11671167+ return &eventsJSONClient{
11681168+ client: client,
11691169+ urls: urls,
11701170+ interceptor: twirp.ChainInterceptors(clientOpts.Interceptors...),
11711171+ opts: clientOpts,
11721172+ }
11731173+}
11741174+11751175+func (c *eventsJSONClient) Get(ctx context.Context, in *google_protobuf.Empty) (*within_website_x_mi.EventFeed, error) {
11761176+ ctx = ctxsetters.WithPackageName(ctx, "xeiaso.net")
11771177+ ctx = ctxsetters.WithServiceName(ctx, "Events")
11781178+ ctx = ctxsetters.WithMethodName(ctx, "Get")
11791179+ caller := c.callGet
11801180+ if c.interceptor != nil {
11811181+ caller = func(ctx context.Context, req *google_protobuf.Empty) (*within_website_x_mi.EventFeed, error) {
11821182+ resp, err := c.interceptor(
11831183+ func(ctx context.Context, req interface{}) (interface{}, error) {
11841184+ typedReq, ok := req.(*google_protobuf.Empty)
11851185+ if !ok {
11861186+ return nil, twirp.InternalError("failed type assertion req.(*google_protobuf.Empty) when calling interceptor")
11871187+ }
11881188+ return c.callGet(ctx, typedReq)
11891189+ },
11901190+ )(ctx, req)
11911191+ if resp != nil {
11921192+ typedResp, ok := resp.(*within_website_x_mi.EventFeed)
11931193+ if !ok {
11941194+ return nil, twirp.InternalError("failed type assertion resp.(*within_website_x_mi.EventFeed) when calling interceptor")
11951195+ }
11961196+ return typedResp, err
11971197+ }
11981198+ return nil, err
11991199+ }
12001200+ }
12011201+ return caller(ctx, in)
12021202+}
12031203+12041204+func (c *eventsJSONClient) callGet(ctx context.Context, in *google_protobuf.Empty) (*within_website_x_mi.EventFeed, error) {
12051205+ out := new(within_website_x_mi.EventFeed)
12061206+ ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[0], in, out)
12071207+ if err != nil {
12081208+ twerr, ok := err.(twirp.Error)
12091209+ if !ok {
12101210+ twerr = twirp.InternalErrorWith(err)
12111211+ }
12121212+ callClientError(ctx, c.opts.Hooks, twerr)
12131213+ return nil, err
12141214+ }
12151215+12161216+ callClientResponseReceived(ctx, c.opts.Hooks)
12171217+12181218+ return out, nil
12191219+}
12201220+12211221+// =====================
12221222+// Events Server Handler
12231223+// =====================
12241224+12251225+type eventsServer struct {
12261226+ Events
12271227+ interceptor twirp.Interceptor
12281228+ hooks *twirp.ServerHooks
12291229+ pathPrefix string // prefix for routing
12301230+ jsonSkipDefaults bool // do not include unpopulated fields (default values) in the response
12311231+ jsonCamelCase bool // JSON fields are serialized as lowerCamelCase rather than keeping the original proto names
12321232+}
12331233+12341234+// NewEventsServer builds a TwirpServer that can be used as an http.Handler to handle
12351235+// HTTP requests that are routed to the right method in the provided svc implementation.
12361236+// The opts are twirp.ServerOption modifiers, for example twirp.WithServerHooks(hooks).
12371237+func NewEventsServer(svc Events, opts ...interface{}) TwirpServer {
12381238+ serverOpts := newServerOpts(opts)
12391239+12401240+ // Using ReadOpt allows backwards and forwards compatibility with new options in the future
12411241+ jsonSkipDefaults := false
12421242+ _ = serverOpts.ReadOpt("jsonSkipDefaults", &jsonSkipDefaults)
12431243+ jsonCamelCase := false
12441244+ _ = serverOpts.ReadOpt("jsonCamelCase", &jsonCamelCase)
12451245+ var pathPrefix string
12461246+ if ok := serverOpts.ReadOpt("pathPrefix", &pathPrefix); !ok {
12471247+ pathPrefix = "/twirp" // default prefix
12481248+ }
12491249+12501250+ return &eventsServer{
12511251+ Events: svc,
12521252+ hooks: serverOpts.Hooks,
12531253+ interceptor: twirp.ChainInterceptors(serverOpts.Interceptors...),
12541254+ pathPrefix: pathPrefix,
12551255+ jsonSkipDefaults: jsonSkipDefaults,
12561256+ jsonCamelCase: jsonCamelCase,
12571257+ }
12581258+}
12591259+12601260+// writeError writes an HTTP response with a valid Twirp error format, and triggers hooks.
12611261+// If err is not a twirp.Error, it will get wrapped with twirp.InternalErrorWith(err)
12621262+func (s *eventsServer) writeError(ctx context.Context, resp http.ResponseWriter, err error) {
12631263+ writeError(ctx, resp, err, s.hooks)
12641264+}
12651265+12661266+// handleRequestBodyError is used to handle error when the twirp server cannot read request
12671267+func (s *eventsServer) handleRequestBodyError(ctx context.Context, resp http.ResponseWriter, msg string, err error) {
12681268+ if context.Canceled == ctx.Err() {
12691269+ s.writeError(ctx, resp, twirp.NewError(twirp.Canceled, "failed to read request: context canceled"))
12701270+ return
12711271+ }
12721272+ if context.DeadlineExceeded == ctx.Err() {
12731273+ s.writeError(ctx, resp, twirp.NewError(twirp.DeadlineExceeded, "failed to read request: deadline exceeded"))
12741274+ return
12751275+ }
12761276+ s.writeError(ctx, resp, twirp.WrapError(malformedRequestError(msg), err))
12771277+}
12781278+12791279+// EventsPathPrefix is a convenience constant that may identify URL paths.
12801280+// Should be used with caution, it only matches routes generated by Twirp Go clients,
12811281+// with the default "/twirp" prefix and default CamelCase service and method names.
12821282+// More info: https://twitchtv.github.io/twirp/docs/routing.html
12831283+const EventsPathPrefix = "/twirp/xeiaso.net.Events/"
12841284+12851285+func (s *eventsServer) ServeHTTP(resp http.ResponseWriter, req *http.Request) {
12861286+ ctx := req.Context()
12871287+ ctx = ctxsetters.WithPackageName(ctx, "xeiaso.net")
12881288+ ctx = ctxsetters.WithServiceName(ctx, "Events")
12891289+ ctx = ctxsetters.WithResponseWriter(ctx, resp)
12901290+12911291+ var err error
12921292+ ctx, err = callRequestReceived(ctx, s.hooks)
12931293+ if err != nil {
12941294+ s.writeError(ctx, resp, err)
12951295+ return
12961296+ }
12971297+12981298+ if req.Method != "POST" {
12991299+ msg := fmt.Sprintf("unsupported method %q (only POST is allowed)", req.Method)
13001300+ s.writeError(ctx, resp, badRouteError(msg, req.Method, req.URL.Path))
13011301+ return
13021302+ }
13031303+13041304+ // Verify path format: [<prefix>]/<package>.<Service>/<Method>
13051305+ prefix, pkgService, method := parseTwirpPath(req.URL.Path)
13061306+ if pkgService != "xeiaso.net.Events" {
13071307+ msg := fmt.Sprintf("no handler for path %q", req.URL.Path)
13081308+ s.writeError(ctx, resp, badRouteError(msg, req.Method, req.URL.Path))
13091309+ return
13101310+ }
13111311+ if prefix != s.pathPrefix {
13121312+ msg := fmt.Sprintf("invalid path prefix %q, expected %q, on path %q", prefix, s.pathPrefix, req.URL.Path)
13131313+ s.writeError(ctx, resp, badRouteError(msg, req.Method, req.URL.Path))
13141314+ return
13151315+ }
13161316+13171317+ switch method {
13181318+ case "Get":
13191319+ s.serveGet(ctx, resp, req)
13201320+ return
13211321+ default:
13221322+ msg := fmt.Sprintf("no handler for path %q", req.URL.Path)
13231323+ s.writeError(ctx, resp, badRouteError(msg, req.Method, req.URL.Path))
13241324+ return
13251325+ }
13261326+}
13271327+13281328+func (s *eventsServer) serveGet(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
13291329+ header := req.Header.Get("Content-Type")
13301330+ i := strings.Index(header, ";")
13311331+ if i == -1 {
13321332+ i = len(header)
13331333+ }
13341334+ switch strings.TrimSpace(strings.ToLower(header[:i])) {
13351335+ case "application/json":
13361336+ s.serveGetJSON(ctx, resp, req)
13371337+ case "application/protobuf":
13381338+ s.serveGetProtobuf(ctx, resp, req)
13391339+ default:
13401340+ msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type"))
13411341+ twerr := badRouteError(msg, req.Method, req.URL.Path)
13421342+ s.writeError(ctx, resp, twerr)
13431343+ }
13441344+}
13451345+13461346+func (s *eventsServer) serveGetJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
13471347+ var err error
13481348+ ctx = ctxsetters.WithMethodName(ctx, "Get")
13491349+ ctx, err = callRequestRouted(ctx, s.hooks)
13501350+ if err != nil {
13511351+ s.writeError(ctx, resp, err)
13521352+ return
13531353+ }
13541354+13551355+ d := json.NewDecoder(req.Body)
13561356+ rawReqBody := json.RawMessage{}
13571357+ if err := d.Decode(&rawReqBody); err != nil {
13581358+ s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
13591359+ return
13601360+ }
13611361+ reqContent := new(google_protobuf.Empty)
13621362+ unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true}
13631363+ if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil {
13641364+ s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
13651365+ return
13661366+ }
13671367+13681368+ handler := s.Events.Get
13691369+ if s.interceptor != nil {
13701370+ handler = func(ctx context.Context, req *google_protobuf.Empty) (*within_website_x_mi.EventFeed, error) {
13711371+ resp, err := s.interceptor(
13721372+ func(ctx context.Context, req interface{}) (interface{}, error) {
13731373+ typedReq, ok := req.(*google_protobuf.Empty)
13741374+ if !ok {
13751375+ return nil, twirp.InternalError("failed type assertion req.(*google_protobuf.Empty) when calling interceptor")
13761376+ }
13771377+ return s.Events.Get(ctx, typedReq)
13781378+ },
13791379+ )(ctx, req)
13801380+ if resp != nil {
13811381+ typedResp, ok := resp.(*within_website_x_mi.EventFeed)
13821382+ if !ok {
13831383+ return nil, twirp.InternalError("failed type assertion resp.(*within_website_x_mi.EventFeed) when calling interceptor")
13841384+ }
13851385+ return typedResp, err
13861386+ }
13871387+ return nil, err
13881388+ }
13891389+ }
13901390+13911391+ // Call service method
13921392+ var respContent *within_website_x_mi.EventFeed
13931393+ func() {
13941394+ defer ensurePanicResponses(ctx, resp, s.hooks)
13951395+ respContent, err = handler(ctx, reqContent)
13961396+ }()
13971397+13981398+ if err != nil {
13991399+ s.writeError(ctx, resp, err)
14001400+ return
14011401+ }
14021402+ if respContent == nil {
14031403+ s.writeError(ctx, resp, twirp.InternalError("received a nil *within_website_x_mi.EventFeed and nil error while calling Get. nil responses are not supported"))
14041404+ return
14051405+ }
14061406+14071407+ ctx = callResponsePrepared(ctx, s.hooks)
14081408+14091409+ marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults}
14101410+ respBytes, err := marshaler.Marshal(respContent)
14111411+ if err != nil {
14121412+ s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response"))
14131413+ return
14141414+ }
14151415+14161416+ ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
14171417+ resp.Header().Set("Content-Type", "application/json")
14181418+ resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
14191419+ resp.WriteHeader(http.StatusOK)
14201420+14211421+ if n, err := resp.Write(respBytes); err != nil {
14221422+ msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
14231423+ twerr := twirp.NewError(twirp.Unknown, msg)
14241424+ ctx = callError(ctx, s.hooks, twerr)
14251425+ }
14261426+ callResponseSent(ctx, s.hooks)
14271427+}
14281428+14291429+func (s *eventsServer) serveGetProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
14301430+ var err error
14311431+ ctx = ctxsetters.WithMethodName(ctx, "Get")
14321432+ ctx, err = callRequestRouted(ctx, s.hooks)
14331433+ if err != nil {
14341434+ s.writeError(ctx, resp, err)
14351435+ return
14361436+ }
14371437+14381438+ buf, err := io.ReadAll(req.Body)
14391439+ if err != nil {
14401440+ s.handleRequestBodyError(ctx, resp, "failed to read request body", err)
14411441+ return
14421442+ }
14431443+ reqContent := new(google_protobuf.Empty)
14441444+ if err = proto.Unmarshal(buf, reqContent); err != nil {
14451445+ s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded"))
14461446+ return
14471447+ }
14481448+14491449+ handler := s.Events.Get
14501450+ if s.interceptor != nil {
14511451+ handler = func(ctx context.Context, req *google_protobuf.Empty) (*within_website_x_mi.EventFeed, error) {
14521452+ resp, err := s.interceptor(
14531453+ func(ctx context.Context, req interface{}) (interface{}, error) {
14541454+ typedReq, ok := req.(*google_protobuf.Empty)
14551455+ if !ok {
14561456+ return nil, twirp.InternalError("failed type assertion req.(*google_protobuf.Empty) when calling interceptor")
14571457+ }
14581458+ return s.Events.Get(ctx, typedReq)
14591459+ },
14601460+ )(ctx, req)
14611461+ if resp != nil {
14621462+ typedResp, ok := resp.(*within_website_x_mi.EventFeed)
14631463+ if !ok {
14641464+ return nil, twirp.InternalError("failed type assertion resp.(*within_website_x_mi.EventFeed) when calling interceptor")
14651465+ }
14661466+ return typedResp, err
14671467+ }
14681468+ return nil, err
14691469+ }
14701470+ }
14711471+14721472+ // Call service method
14731473+ var respContent *within_website_x_mi.EventFeed
14741474+ func() {
14751475+ defer ensurePanicResponses(ctx, resp, s.hooks)
14761476+ respContent, err = handler(ctx, reqContent)
14771477+ }()
14781478+14791479+ if err != nil {
14801480+ s.writeError(ctx, resp, err)
14811481+ return
14821482+ }
14831483+ if respContent == nil {
14841484+ s.writeError(ctx, resp, twirp.InternalError("received a nil *within_website_x_mi.EventFeed and nil error while calling Get. nil responses are not supported"))
14851485+ return
14861486+ }
14871487+14881488+ ctx = callResponsePrepared(ctx, s.hooks)
14891489+14901490+ respBytes, err := proto.Marshal(respContent)
14911491+ if err != nil {
14921492+ s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response"))
14931493+ return
14941494+ }
14951495+14961496+ ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
14971497+ resp.Header().Set("Content-Type", "application/protobuf")
14981498+ resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
14991499+ resp.WriteHeader(http.StatusOK)
15001500+ if n, err := resp.Write(respBytes); err != nil {
15011501+ msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
15021502+ twerr := twirp.NewError(twirp.Unknown, msg)
15031503+ ctx = callError(ctx, s.hooks, twerr)
15041504+ }
15051505+ callResponseSent(ctx, s.hooks)
15061506+}
15071507+15081508+func (s *eventsServer) ServiceDescriptor() ([]byte, int) {
15091509+ return twirpFileDescriptor0, 2
15101510+}
15111511+15121512+func (s *eventsServer) ProtocGenTwirpVersion() string {
15131513+ return "v8.1.3"
15141514+}
15151515+15161516+// PathPrefix returns the base service path, in the form: "/<prefix>/<package>.<Service>/"
15171517+// that is everything in a Twirp route except for the <Method>. This can be used for routing,
15181518+// for example to identify the requests that are targeted to this service in a mux.
15191519+func (s *eventsServer) PathPrefix() string {
15201520+ return baseServicePath(s.pathPrefix, "xeiaso.net", "Events")
15211521+}
15221522+10261523// =====
10271524// Utils
10281525// =====
···15892086}
1590208715912088var twirpFileDescriptor0 = []byte{
15921592- // 291 bytes of a gzipped FileDescriptorProto
15931593- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0xd0, 0x4d, 0x4b, 0xf3, 0x40,
15941594- 0x10, 0x07, 0x70, 0xf2, 0x34, 0x4f, 0x31, 0xd3, 0xfa, 0xc2, 0x82, 0x25, 0x44, 0xc4, 0x2a, 0x08,
15951595- 0x3d, 0x6d, 0x20, 0x8a, 0xd0, 0xa3, 0x05, 0x15, 0x0f, 0x5e, 0x8a, 0x78, 0xf0, 0x52, 0x36, 0x66,
15961596- 0x12, 0x16, 0x92, 0x6c, 0x48, 0xa6, 0x25, 0x7e, 0x42, 0xbf, 0x96, 0xec, 0x6e, 0xd2, 0x80, 0xe2,
15971597- 0x29, 0xcc, 0xcc, 0x2f, 0x33, 0xc9, 0x1f, 0xa6, 0x2d, 0x36, 0x92, 0x90, 0x57, 0xb5, 0x22, 0xc5,
15981598- 0xa0, 0x45, 0x29, 0x1a, 0xc5, 0x4b, 0xa4, 0xe0, 0x2c, 0x53, 0x2a, 0xcb, 0x31, 0x34, 0x93, 0x78,
15991599- 0x9b, 0x86, 0x58, 0x54, 0xf4, 0x69, 0x61, 0x70, 0xf1, 0x73, 0x48, 0xb2, 0xc0, 0x86, 0x44, 0x51,
16001600- 0x75, 0xc0, 0xc7, 0x96, 0xb0, 0x2e, 0x45, 0x6e, 0x49, 0x8a, 0x98, 0xd8, 0xc9, 0xd5, 0x97, 0x03,
16011601- 0xde, 0x6a, 0x2b, 0xf3, 0xe4, 0xb9, 0x4c, 0x15, 0x9b, 0xc1, 0xf8, 0x43, 0x15, 0x85, 0x24, 0xdf,
16021602- 0x99, 0x3b, 0x0b, 0x6f, 0xdd, 0x55, 0x6c, 0x09, 0x10, 0x6b, 0xb4, 0xd1, 0x8b, 0xfd, 0x7f, 0x73,
16031603- 0x67, 0x31, 0x89, 0x02, 0x6e, 0xaf, 0xf2, 0xfe, 0x2a, 0x7f, 0xed, 0xaf, 0xae, 0x3d, 0xa3, 0x75,
16041604- 0xcd, 0xce, 0x01, 0x32, 0xb5, 0xd9, 0x61, 0xdd, 0x48, 0x55, 0xfa, 0x23, 0xb3, 0xd6, 0xcb, 0xd4,
16051605- 0x9b, 0x6d, 0xb0, 0x4b, 0x98, 0x26, 0x58, 0x0e, 0xc0, 0x35, 0x60, 0xa2, 0x7b, 0x3d, 0xb9, 0x86,
16061606- 0x23, 0x1b, 0xcb, 0x1e, 0xfd, 0x37, 0xe8, 0xd0, 0x76, 0x3b, 0x16, 0xdd, 0x83, 0xfb, 0x82, 0x24,
16071607- 0xd8, 0x12, 0x0e, 0xf4, 0x33, 0x11, 0x24, 0xd8, 0xec, 0xd7, 0x37, 0x3e, 0xe8, 0xd8, 0x82, 0x53,
16081608- 0x3e, 0x44, 0xcb, 0xf7, 0xbf, 0x1f, 0xdd, 0x81, 0xfb, 0x88, 0x98, 0x30, 0x0e, 0xa3, 0x27, 0xa4,
16091609- 0x3f, 0xdf, 0x3e, 0xe6, 0x43, 0x8a, 0xda, 0xaf, 0xd8, 0xfb, 0xc9, 0xb0, 0x2f, 0xdc, 0xdd, 0x86,
16101610- 0x55, 0x1c, 0x8f, 0x8d, 0xb9, 0xf9, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x20, 0xf7, 0x0a, 0x20, 0xd3,
16111611- 0x01, 0x00, 0x00,
20892089+ // 329 bytes of a gzipped FileDescriptorProto
20902090+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x91, 0x4f, 0x4b, 0xc3, 0x40,
20912091+ 0x10, 0xc5, 0x89, 0xad, 0xc5, 0x4c, 0xeb, 0xbf, 0x05, 0x4b, 0x88, 0xa8, 0x55, 0x10, 0x7a, 0xda,
20922092+ 0x40, 0x14, 0xa1, 0x07, 0x0f, 0x16, 0x6a, 0xf1, 0xe0, 0xa5, 0x88, 0x07, 0x2f, 0x25, 0x31, 0xd3,
20932093+ 0xb8, 0xd0, 0xdd, 0x0d, 0xcd, 0xb4, 0x8d, 0x9f, 0xd0, 0xaf, 0x25, 0xbb, 0x49, 0x1b, 0x50, 0xf4,
20942094+ 0xb4, 0xcc, 0x9b, 0xdf, 0xcc, 0xbe, 0x7d, 0x0b, 0x9d, 0x02, 0x73, 0x41, 0xc8, 0xb3, 0x85, 0x26,
20952095+ 0xcd, 0xa0, 0x40, 0x11, 0xe5, 0x9a, 0x2b, 0x24, 0xff, 0x34, 0xd5, 0x3a, 0x9d, 0x63, 0x60, 0x3b,
20962096+ 0xf1, 0x72, 0x16, 0xa0, 0xcc, 0xe8, 0xb3, 0x04, 0xfd, 0x8b, 0x9f, 0x4d, 0x12, 0x12, 0x73, 0x8a,
20972097+ 0x64, 0x56, 0x01, 0xc7, 0x58, 0x10, 0x2e, 0x54, 0x34, 0x0f, 0xa4, 0xa8, 0x24, 0x6f, 0x2b, 0xd9,
20982098+ 0x7a, 0x86, 0x98, 0x94, 0x9d, 0xab, 0x2f, 0x07, 0xdc, 0xe1, 0x52, 0xcc, 0x93, 0x27, 0x35, 0xd3,
20992099+ 0xac, 0x0b, 0xad, 0x77, 0x2d, 0xa5, 0x20, 0xcf, 0xe9, 0x39, 0x7d, 0x77, 0x52, 0x55, 0x6c, 0x00,
21002100+ 0x10, 0x1b, 0x68, 0x6a, 0xee, 0xf2, 0x76, 0x7a, 0x4e, 0xbf, 0x1d, 0xfa, 0xbc, 0x34, 0xc2, 0x37,
21012101+ 0x46, 0xf8, 0xcb, 0xc6, 0xc8, 0xc4, 0xb5, 0xb4, 0xa9, 0xd9, 0x19, 0x40, 0xaa, 0xa7, 0x2b, 0x5c,
21022102+ 0xe4, 0x42, 0x2b, 0xaf, 0x61, 0xd7, 0xba, 0xa9, 0x7e, 0x2d, 0x05, 0x76, 0x09, 0x9d, 0x04, 0x55,
21032103+ 0x0d, 0x34, 0x2d, 0xd0, 0x36, 0xda, 0x06, 0xb9, 0x86, 0x83, 0x32, 0xa9, 0x2d, 0xb4, 0x6b, 0xa1,
21042104+ 0xfd, 0x52, 0xad, 0xb0, 0xf0, 0x01, 0x9a, 0xcf, 0x48, 0x11, 0x1b, 0xc0, 0x9e, 0x39, 0x93, 0x88,
21052105+ 0x22, 0xd6, 0xfd, 0xe5, 0x71, 0x64, 0x92, 0xf4, 0x4f, 0x78, 0x9d, 0x36, 0xdf, 0x3e, 0x3f, 0xbc,
21062106+ 0x83, 0xe6, 0x23, 0x62, 0xc2, 0x38, 0x34, 0xc6, 0x48, 0x7f, 0x4e, 0x1f, 0xf2, 0x3a, 0x45, 0xc3,
21072107+ 0x87, 0x63, 0x68, 0x8d, 0x56, 0xa8, 0x28, 0x67, 0xf7, 0xff, 0x4f, 0x9e, 0xf3, 0xb5, 0xa0, 0x0f,
21082108+ 0xa1, 0xf8, 0x1a, 0x63, 0xfb, 0xf7, 0x05, 0x97, 0x82, 0xdb, 0x59, 0xb3, 0x68, 0xc8, 0xde, 0x8e,
21092109+ 0x6a, 0x63, 0xc1, 0xea, 0x36, 0xc8, 0xe2, 0xb8, 0x65, 0x77, 0xdc, 0x7c, 0x07, 0x00, 0x00, 0xff,
21102110+ 0xff, 0xba, 0x70, 0xbe, 0x6e, 0x2f, 0x02, 0x00, 0x00,
16122111}