@@ -27,7 +27,6 @@ package keyvaluepb
 import (
 	context "context"
 	fmt "fmt"
-
 	proto "github.com/gogo/protobuf/proto"
 	fx "go.uber.org/fx"
 	yarpc "go.uber.org/yarpc/v2"
// Code generated by protoc-gen-yarpc-go
// source: src/keyvalue/key_value.proto
// DO NOT EDIT!

// Copyright (c) 2018 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

package keyvaluepb

import (
	context "context"
	fmt "fmt"

	proto "github.com/gogo/protobuf/proto"
	fx "go.uber.org/fx"
	yarpc "go.uber.org/yarpc/v2"
	yarpcprotobuf "go.uber.org/yarpc/v2/yarpcprotobuf"
	common "go.uber.org/yarpc/v2/yarpcprotobuf/protoc-gen-yarpc-go/internal/tests/gen/proto/src/common"
	reflection "go.uber.org/yarpc/v2/yarpcprotobuf/reflection"
)

// StoreYARPCClient is the Store service's client interface.
type StoreYARPCClient interface {
	Get(
		context.Context,
		*common.GetRequest,
		...yarpc.CallOption,
	) (*common.GetResponse, error)
	Set(
		context.Context,
		*common.SetRequest,
		...yarpc.CallOption,
	) (*common.SetResponse, error)
}

// NewStoreYARPCClient builds a new YARPC client for the Store service.
func NewStoreYARPCClient(c yarpc.Client, opts ...yarpcprotobuf.ClientOption) StoreYARPCClient {
	return &_StoreYARPCClient{stream: yarpcprotobuf.NewStreamClient(c, "keyvalue.Store", opts...)}
}

type _StoreYARPCClient struct {
	stream yarpcprotobuf.StreamClient
}

var _ StoreYARPCClient = (*_StoreYARPCClient)(nil)

func (c *_StoreYARPCClient) Get(ctx context.Context, req *common.GetRequest, opts ...yarpc.CallOption) (*common.GetResponse, error) {
	msg, err := c.stream.Call(ctx, "Get", req, new(common.GetResponse), opts...)
	if err != nil {
		return nil, err
	}
	res, ok := msg.(*common.GetResponse)
	if !ok {
		return nil, yarpcprotobuf.CastError(new(common.GetResponse), res)
	}
	return res, nil
}

func (c *_StoreYARPCClient) Set(ctx context.Context, req *common.SetRequest, opts ...yarpc.CallOption) (*common.SetResponse, error) {
	msg, err := c.stream.Call(ctx, "Set", req, new(common.SetResponse), opts...)
	if err != nil {
		return nil, err
	}
	res, ok := msg.(*common.SetResponse)
	if !ok {
		return nil, yarpcprotobuf.CastError(new(common.SetResponse), res)
	}
	return res, nil
}

// StoreYARPCServer is the Store service's server interface.
type StoreYARPCServer interface {
	Get(
		context.Context,
		*common.GetRequest,
	) (*common.GetResponse, error)
	Set(
		context.Context,
		*common.SetRequest,
	) (*common.SetResponse, error)
}

// BuildStoreYARPCProcedures constructs the YARPC procedures for the Store service.
func BuildStoreYARPCProcedures(s StoreYARPCServer) []yarpc.TransportProcedure {
	h := &_StoreYARPCServer{server: s}
	return yarpcprotobuf.Procedures(
		yarpcprotobuf.ProceduresParams{
			Service: "keyvalue.Store",
			Unary: []yarpcprotobuf.UnaryProceduresParams{
				{
					Method: "Get",
					Handler: yarpcprotobuf.NewUnaryHandler(
						yarpcprotobuf.UnaryHandlerParams{
							Handle:      h.Get,
							RequestType: new(common.GetRequest),
						},
					),
				},
				{
					Method: "Set",
					Handler: yarpcprotobuf.NewUnaryHandler(
						yarpcprotobuf.UnaryHandlerParams{
							Handle:      h.Set,
							RequestType: new(common.SetRequest),
						},
					),
				},
			},
			Stream: []yarpcprotobuf.StreamProceduresParams{},
		},
	)
}

type _StoreYARPCServer struct {
	server StoreYARPCServer
}

func (h *_StoreYARPCServer) Get(ctx context.Context, m proto.Message) (proto.Message, error) {
	req, _ := m.(*common.GetRequest)
	if req == nil {
		return nil, yarpcprotobuf.CastError(new(common.GetRequest), m)
	}
	return h.server.Get(ctx, req)
}

func (h *_StoreYARPCServer) Set(ctx context.Context, m proto.Message) (proto.Message, error) {
	req, _ := m.(*common.SetRequest)
	if req == nil {
		return nil, yarpcprotobuf.CastError(new(common.SetRequest), m)
	}
	return h.server.Set(ctx, req)
}

// FxStoreYARPCClientParams defines the parameters
// required to provide a StoreYARPCClient into an
// Fx application.
type FxStoreYARPCClientParams struct {
	fx.In

	ClientProvider yarpc.ClientProvider
}

// FxStoreYARPCClientResult provides a StoreYARPCClient
// into an Fx application.
type FxStoreYARPCClientResult struct {
	fx.Out

	Client StoreYARPCClient
}

// NewFxStoreYARPCClient provides a StoreYARPCClient
// into an Fx application, using the given
// name for routing.
//
//  fx.Provide(
//    keyvaluepb.NewFxStoreYARPCClient("service-name"),
//    ...
//  )
func NewFxStoreYARPCClient(name string, opts ...yarpcprotobuf.ClientOption) interface{} {
	return func(p FxStoreYARPCClientParams) (FxStoreYARPCClientResult, error) {
		client, ok := p.ClientProvider.Client(name)
		if !ok {
			return FxStoreYARPCClientResult{},
				fmt.Errorf("generated code could not retrieve client for %q", name)
		}
		return FxStoreYARPCClientResult{
			Client: NewStoreYARPCClient(client, opts...),
		}, nil
	}
}

// FxStoreYARPCServerParams defines the paramaters
// required to provide the StoreYARPCServer procedures
// into an Fx application.
type FxStoreYARPCServerParams struct {
	fx.In

	Server StoreYARPCServer
}

// FxStoreYARPCServerResult provides the StoreYARPCServer
// procedures into an Fx application.
type FxStoreYARPCServerResult struct {
	fx.Out

	Procedures     []yarpc.TransportProcedure `group:"yarpcfx"`
	ReflectionMeta reflection.ServerMeta      `group:"yarpcfx"`
}

// NewFxStoreYARPCServer provides the StoreYARPCServer
// procedures to an Fx application. It expects
// a StoreYARPCServer to be present in the container.
//
//  fx.Provide(
//    keyvaluepb.NewFxStoreYARPCServer(),
//    ...
//  )
func NewFxStoreYARPCServer() interface{} {
	return func(p FxStoreYARPCServerParams) FxStoreYARPCServerResult {
		return FxStoreYARPCServerResult{
			Procedures: BuildStoreYARPCProcedures(p.Server),
			ReflectionMeta: reflection.ServerMeta{
				ServiceName:     "keyvalue.Store",
				FileDescriptors: yarpcFileDescriptorClosure8a9b3e67e16f054c,
			},
		}
	}
}

var yarpcFileDescriptorClosure8a9b3e67e16f054c = [][]byte{
	// src/keyvalue/key_value.proto
	[]byte{
		0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x29, 0x2e, 0x4a, 0xd6,
		0xcf, 0x4e, 0xad, 0x2c, 0x4b, 0xcc, 0x29, 0x4d, 0x05, 0x31, 0xe2, 0xc1, 0x2c, 0xbd, 0x82, 0xa2,
		0xfc, 0x92, 0x7c, 0x21, 0x0e, 0x98, 0x8c, 0x94, 0x38, 0x48, 0x5d, 0x72, 0x7e, 0x6e, 0x6e, 0x7e,
		0x1e, 0x94, 0x82, 0x28, 0x31, 0x4a, 0xe7, 0x62, 0x0d, 0x2e, 0xc9, 0x2f, 0x4a, 0x15, 0xd2, 0xe3,
		0x62, 0x76, 0x4f, 0x2d, 0x11, 0x12, 0xd2, 0x83, 0x4a, 0xbb, 0xa7, 0x96, 0x04, 0xa5, 0x16, 0x96,
		0xa6, 0x16, 0x97, 0x48, 0x09, 0xa3, 0x88, 0x15, 0x17, 0xe4, 0xe7, 0x15, 0x83, 0xd5, 0x07, 0x23,
		0xab, 0x0f, 0xc6, 0xa2, 0x3e, 0x18, 0xa1, 0xde, 0x89, 0x27, 0x8a, 0x0b, 0xe6, 0x9a, 0x82, 0xa4,
		0x24, 0x36, 0xb0, 0xed, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x9d, 0x4c, 0x20, 0x1b, 0xc0,
		0x00, 0x00, 0x00,
	},
	// src/common/common.proto
	[]byte{
		0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2f, 0x2e, 0x4a, 0xd6,
		0x4f, 0xce, 0xcf, 0xcd, 0xcd, 0xcf, 0x83, 0x52, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x6c,
		0x10, 0x9e, 0x92, 0x1c, 0x17, 0x97, 0x7b, 0x6a, 0x49, 0x50, 0x6a, 0x61, 0x69, 0x6a, 0x71, 0x89,
		0x90, 0x00, 0x17, 0x73, 0x76, 0x6a, 0xa5, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x67, 0x10, 0x88, 0xa9,
		0xa4, 0xcc, 0xc5, 0x0d, 0x96, 0x2f, 0x2e, 0xc8, 0xcf, 0x2b, 0x4e, 0x15, 0x12, 0xe1, 0x62, 0x2d,
		0x4b, 0xcc, 0x29, 0x4d, 0x85, 0x2a, 0x81, 0x70, 0x94, 0x4c, 0xb8, 0xb8, 0x82, 0xf1, 0x18, 0x82,
		0xd0, 0xc5, 0x84, 0xac, 0x8b, 0x97, 0x8b, 0x3b, 0x18, 0x61, 0xb4, 0x13, 0x57, 0x14, 0x07, 0xc4,
		0x4d, 0x05, 0x49, 0x49, 0x6c, 0x60, 0x47, 0x1a, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x92, 0x1f,
		0xc4, 0x11, 0xbf, 0x00, 0x00, 0x00,
	},
}

these files are autogenerated, looks like you may have accidentally reformatted and saved