Documentation ¶
Overview ¶
Package assetrate is a generated GoMock package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssetRate ¶
type AssetRate struct { ID string `json:"id" example:"00000000-0000-0000-0000-000000000000"` BaseAssetCode string `json:"baseAssetCode" example:"BRL"` CounterAssetCode string `json:"counterAssetCode" example:"USD"` Amount float64 `json:"amount" example:"5000"` Scale float64 `json:"scale" example:"2"` Source string `json:"source" example:"@person1"` OrganizationID string `json:"organizationId" example:"00000000-0000-0000-0000-000000000000"` LedgerID string `json:"ledgerId" example:"00000000-0000-0000-0000-000000000000"` CreatedAt time.Time `json:"createdAt" example:"2021-01-01T00:00:00Z"` Metadata map[string]any `json:"metadata"` } // @name AssetRate
AssetRate is a struct designed to encapsulate response payload data.
swagger:model AssetRate @Description AssetRate is a struct designed to store asset rate data.
type AssetRatePostgreSQLModel ¶
type AssetRatePostgreSQLModel struct { ID string BaseAssetCode string CounterAssetCode string Amount float64 Scale float64 Source string OrganizationID string LedgerID string CreatedAt time.Time Metadata map[string]any }
AssetRatePostgreSQLModel represents the entity AssetRatePostgreSQLModel into SQL context in Database
func (*AssetRatePostgreSQLModel) FromEntity ¶
func (a *AssetRatePostgreSQLModel) FromEntity(assetRate *AssetRate)
FromEntity converts an entity AssetRate to AssetRatePostgreSQLModel
func (*AssetRatePostgreSQLModel) ToEntity ¶
func (a *AssetRatePostgreSQLModel) ToEntity() *AssetRate
ToEntity converts an TransactionPostgreSQLModel to entity Transaction
type AssetRatePostgreSQLRepository ¶
type AssetRatePostgreSQLRepository struct {
// contains filtered or unexported fields
}
AssetRatePostgreSQLRepository is a Postgresql-specific implementation of the AssetRateRepository.
func NewAssetRatePostgreSQLRepository ¶
func NewAssetRatePostgreSQLRepository(pc *mpostgres.PostgresConnection) *AssetRatePostgreSQLRepository
NewAssetRatePostgreSQLRepository returns a new instance of AssetRatePostgreSQLRepository using the given Postgres connection.
type CreateAssetRateInput ¶
type CreateAssetRateInput struct { BaseAssetCode string `json:"baseAssetCode" example:"BRL"` CounterAssetCode string `json:"counterAssetCode" example:"USD"` Amount float64 `json:"amount" example:"5000"` Scale float64 `json:"scale" example:"2"` Source string `json:"source" example:"@person1"` Metadata map[string]any `json:"metadata,omitempty"` } // @name CreateAssetRateInput
CreateAssetRateInput is a struct design to encapsulate payload data.
swagger:model CreateAssetRateInput @Description CreateAssetRateInput is the input payload to create an asset rate.
type MockRepository ¶
type MockRepository struct {
// contains filtered or unexported fields
}
MockRepository is a mock of Repository interface.
func NewMockRepository ¶
func NewMockRepository(ctrl *gomock.Controller) *MockRepository
NewMockRepository creates a new mock instance.
func (*MockRepository) EXPECT ¶
func (m *MockRepository) EXPECT() *MockRepositoryMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockRepositoryMockRecorder ¶
type MockRepositoryMockRecorder struct {
// contains filtered or unexported fields
}
MockRepositoryMockRecorder is the mock recorder for MockRepository.