refactor: rename MsgInitialize to MsgSpawn for clarity

This commit is contained in:
Prad Nukala
2024-12-24 00:59:42 -05:00
parent 7e50d7f76d
commit 630e4ad7f0
5 changed files with 289 additions and 283 deletions
+17 -17
View File
@@ -20,7 +20,7 @@ const _ = grpc.SupportPackageIsVersion9
const (
Msg_UpdateParams_FullMethodName = "/dwn.v1.Msg/UpdateParams"
Msg_Initialize_FullMethodName = "/dwn.v1.Msg/Initialize"
Msg_Spawn_FullMethodName = "/dwn.v1.Msg/Spawn"
)
// MsgClient is the client API for Msg service.
@@ -33,8 +33,8 @@ type MsgClient interface {
//
// Since: cosmos-sdk 0.47
UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error)
// Initialize spawns a new Vault
Initialize(ctx context.Context, in *MsgInitialize, opts ...grpc.CallOption) (*MsgInitializeResponse, error)
// Spawn spawns a new Vault
Spawn(ctx context.Context, in *MsgSpawn, opts ...grpc.CallOption) (*MsgSpawnResponse, error)
}
type msgClient struct {
@@ -55,10 +55,10 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts
return out, nil
}
func (c *msgClient) Initialize(ctx context.Context, in *MsgInitialize, opts ...grpc.CallOption) (*MsgInitializeResponse, error) {
func (c *msgClient) Spawn(ctx context.Context, in *MsgSpawn, opts ...grpc.CallOption) (*MsgSpawnResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(MsgInitializeResponse)
err := c.cc.Invoke(ctx, Msg_Initialize_FullMethodName, in, out, cOpts...)
out := new(MsgSpawnResponse)
err := c.cc.Invoke(ctx, Msg_Spawn_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -75,8 +75,8 @@ type MsgServer interface {
//
// Since: cosmos-sdk 0.47
UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
// Initialize spawns a new Vault
Initialize(context.Context, *MsgInitialize) (*MsgInitializeResponse, error)
// Spawn spawns a new Vault
Spawn(context.Context, *MsgSpawn) (*MsgSpawnResponse, error)
mustEmbedUnimplementedMsgServer()
}
@@ -90,8 +90,8 @@ type UnimplementedMsgServer struct{}
func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented")
}
func (UnimplementedMsgServer) Initialize(context.Context, *MsgInitialize) (*MsgInitializeResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Initialize not implemented")
func (UnimplementedMsgServer) Spawn(context.Context, *MsgSpawn) (*MsgSpawnResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Spawn not implemented")
}
func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {}
func (UnimplementedMsgServer) testEmbeddedByValue() {}
@@ -132,20 +132,20 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in
return interceptor(ctx, in, info, handler)
}
func _Msg_Initialize_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgInitialize)
func _Msg_Spawn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgSpawn)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MsgServer).Initialize(ctx, in)
return srv.(MsgServer).Spawn(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Msg_Initialize_FullMethodName,
FullMethod: Msg_Spawn_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).Initialize(ctx, req.(*MsgInitialize))
return srv.(MsgServer).Spawn(ctx, req.(*MsgSpawn))
}
return interceptor(ctx, in, info, handler)
}
@@ -162,8 +162,8 @@ var Msg_ServiceDesc = grpc.ServiceDesc{
Handler: _Msg_UpdateParams_Handler,
},
{
MethodName: "Initialize",
Handler: _Msg_Initialize_Handler,
MethodName: "Spawn",
Handler: _Msg_Spawn_Handler,
},
},
Streams: []grpc.StreamDesc{},