From 5f2770d522fd28a4b793b1913bc2c8a2a9ad8473 Mon Sep 17 00:00:00 2001 From: Alex Vanin Date: Thu, 20 Aug 2020 12:46:58 +0300 Subject: [PATCH] Separate type definition in accounting/grpc Signed-off-by: Alex Vanin --- v2/accounting/grpc/service.go | 14 -------------- v2/accounting/grpc/types.go | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 14 deletions(-) create mode 100644 v2/accounting/grpc/types.go diff --git a/v2/accounting/grpc/service.go b/v2/accounting/grpc/service.go index 0da7936..058067b 100644 --- a/v2/accounting/grpc/service.go +++ b/v2/accounting/grpc/service.go @@ -5,20 +5,6 @@ import ( service "github.com/nspcc-dev/neofs-api-go/v2/service/grpc" ) -// SetValue sets value of the decimal number. -func (m *Decimal) SetValue(v int64) { - if m != nil { - m.Value = v - } -} - -// SetPrecision sets precision of the decimal number. -func (m *Decimal) SetPrecision(v uint32) { - if m != nil { - m.Precision = v - } -} - // SetOwnerId sets identifier of the account owner. func (m *BalanceRequest_Body) SetOwnerId(v *refs.OwnerID) { if m != nil { diff --git a/v2/accounting/grpc/types.go b/v2/accounting/grpc/types.go new file mode 100644 index 0000000..3099f69 --- /dev/null +++ b/v2/accounting/grpc/types.go @@ -0,0 +1,15 @@ +package accounting + +// SetValue sets value of the decimal number. +func (m *Decimal) SetValue(v int64) { + if m != nil { + m.Value = v + } +} + +// SetPrecision sets precision of the decimal number. +func (m *Decimal) SetPrecision(v uint32) { + if m != nil { + m.Precision = v + } +}