mmodel

package
v1.29.0-beta.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	ID              string         `json:"id" example:"00000000-0000-0000-0000-000000000000"`
	Name            string         `json:"name" example:"My Account"`
	ParentAccountID *string        `json:"parentAccountId" example:"00000000-0000-0000-0000-000000000000"`
	EntityID        *string        `json:"entityId" example:"00000000-0000-0000-0000-000000000000"`
	AssetCode       string         `json:"assetCode" example:"BRL"`
	OrganizationID  string         `json:"organizationId" example:"00000000-0000-0000-0000-000000000000"`
	LedgerID        string         `json:"ledgerId" example:"00000000-0000-0000-0000-000000000000"`
	PortfolioID     *string        `json:"portfolioId" example:"00000000-0000-0000-0000-000000000000"`
	ProductID       *string        `json:"productId" example:"00000000-0000-0000-0000-000000000000"`
	Balance         Balance        `json:"balance"`
	Status          Status         `json:"status"`
	AllowSending    *bool          `json:"allowSending" example:"true"`
	AllowReceiving  *bool          `json:"allowReceiving" example:"true"`
	Alias           *string        `json:"alias" example:"@person1"`
	Type            string         `json:"type" example:"creditCard"`
	CreatedAt       time.Time      `json:"createdAt" example:"2021-01-01T00:00:00Z"`
	UpdatedAt       time.Time      `json:"updatedAt" example:"2021-01-01T00:00:00Z"`
	DeletedAt       *time.Time     `json:"deletedAt" example:"2021-01-01T00:00:00Z"`
	Metadata        map[string]any `json:"metadata,omitempty"`

} // @name Account

Account is a struct designed to encapsulate response payload data.

swagger:model Account @Description Account is a struct designed to encapsulate response payload data.

func (*Account) ToProto

func (e *Account) ToProto() *proto.Account

ToProto converts entity Account to a response protobuf proto

type Accounts

type Accounts struct {
	Items []Account `json:"items"`
	Page  int       `json:"page" example:"1"`
	Limit int       `json:"limit" example:"10"`

} // @name Accounts

Accounts struct to return get all.

swagger:model Accounts @Description Accounts struct to return get all.

type Address

type Address struct {
	Line1   string  `json:"line1" example:"Street 1"`
	Line2   *string `json:"line2" example:"Street 2"`
	ZipCode string  `json:"zipCode" example:"00000-000"`
	City    string  `json:"city" example:"New York"`
	State   string  `json:"state" example:"NY"`
	Country string  `json:"country" example:"US"` // According to ISO 3166-1 alpha-2

} // @name Address

Address structure for marshaling/unmarshalling JSON.

swagger:model Address @Description Address structure for marshaling/unmarshalling JSON.

func (Address) IsEmpty

func (a Address) IsEmpty() bool

IsEmpty method that set empty or nil in fields

type Asset

type Asset struct {
	ID             string         `json:"id" example:"00000000-0000-0000-0000-000000000000"`
	Name           string         `json:"name" example:"Brazilian Real"`
	Type           string         `json:"type" example:"currency"`
	Code           string         `json:"code" example:"BRL"`
	Status         Status         `json:"status"`
	LedgerID       string         `json:"ledgerId" example:"00000000-0000-0000-0000-000000000000"`
	OrganizationID string         `json:"organizationId" example:"00000000-0000-0000-0000-000000000000"`
	CreatedAt      time.Time      `json:"createdAt" example:"2021-01-01T00:00:00Z"`
	UpdatedAt      time.Time      `json:"updatedAt" example:"2021-01-01T00:00:00Z"`
	DeletedAt      *time.Time     `json:"deletedAt" example:"2021-01-01T00:00:00Z"`
	Metadata       map[string]any `json:"metadata,omitempty"`

} // @name Asset

Asset is a struct designed to encapsulate payload data.

swagger:model Asset @Description Asset is a struct designed to encapsulate payload data.

type Assets

type Assets struct {
	Items []Asset `json:"items"`
	Page  int     `json:"page" example:"1"`
	Limit int     `json:"limit" example:"10"`

} // @name Assets

Assets struct to return get all.

swagger:model Assets @Description Assets struct to return get all. @Param items query string false "Items" @Param page query string false "Page" @Param limit query string false "Limit"

type Balance

type Balance struct {
	Available *float64 `json:"available" example:"1500"`
	OnHold    *float64 `json:"onHold" example:"500"`
	Scale     *float64 `json:"scale" example:"2"`

} // @name Balance

Balance structure for marshaling/unmarshalling JSON.

swagger:model Balance @Description Balance structure for marshaling/unmarshalling JSON.

func (Balance) IsEmpty

func (b Balance) IsEmpty() bool

IsEmpty method that set empty or nil in fields

type CreateAccountInput

type CreateAccountInput struct {
	AssetCode       string         `json:"assetCode" validate:"required,max=100" example:"BRL"`
	Name            string         `json:"name" validate:"max=256" example:"My Account"`
	Alias           *string        `json:"alias" validate:"max=100" example:"@person1"`
	Type            string         `json:"type" validate:"required" example:"creditCard"`
	ParentAccountID *string        `json:"parentAccountId" validate:"omitempty,uuid" example:"00000000-0000-0000-0000-000000000000"`
	ProductID       *string        `json:"productId" validate:"omitempty,uuid" example:"00000000-0000-0000-0000-000000000000"`
	PortfolioID     *string        `json:"portfolioId" validate:"omitempty,uuid" example:"00000000-0000-0000-0000-000000000000"`
	EntityID        *string        `json:"entityId" validate:"omitempty,max=256" example:"00000000-0000-0000-0000-000000000000"`
	Status          Status         `json:"status"`
	AllowSending    *bool          `json:"allowSending" example:"true"`
	AllowReceiving  *bool          `json:"allowReceiving" example:"true"`
	Metadata        map[string]any `json:"metadata" validate:"dive,keys,keymax=100,endkeys,nonested,valuemax=2000"`

} // @name CreateAccountInput

CreateAccountInput is a struct design to encapsulate request create payload data.

swagger:model CreateAccountInput @Description CreateAccountInput is a struct design to encapsulate request create payload data.

type CreateAssetInput

type CreateAssetInput struct {
	Name     string         `json:"name" validate:"max=256" example:"Brazilian Real"`
	Type     string         `json:"type" example:"currency"`
	Code     string         `json:"code" validate:"required,max=100" example:"BRL"`
	Status   Status         `json:"status"`
	Metadata map[string]any `json:"metadata" validate:"dive,keys,keymax=100,endkeys,nonested,valuemax=2000"`

} // @name CreateAssetInput

CreateAssetInput is a struct design to encapsulate request create payload data.

swagger:model CreateAssetInput @Description CreateAssetInput is a struct design to encapsulate request create payload data. @Param name query string false "Name" e @Param type query string false "Type" @Param code query string false "Code" @Param status query string false "Status" @Param metadata query string false "Metadata"

type CreateLedgerInput

type CreateLedgerInput struct {
	Name     string         `json:"name" validate:"required,max=256" example:"Lerian Studio"`
	Status   Status         `json:"status"`
	Metadata map[string]any `json:"metadata" validate:"dive,keys,keymax=100,endkeys,nonested,valuemax=2000"`

} // @name CreateLedgerInput

CreateLedgerInput is a struct design to encapsulate request create payload data.

swagger:model CreateLedgerInput @Description CreateLedgerInput is a struct design to encapsulate request create payload data for ledger.

type CreateOrganizationInput

type CreateOrganizationInput struct {
	LegalName            string         `json:"legalName" validate:"required,max=256" example:"Lerian Studio"`
	ParentOrganizationID *string        `json:"parentOrganizationId" validate:"omitempty,uuid" example:"00000000-0000-0000-0000-000000000000"`
	DoingBusinessAs      *string        `json:"doingBusinessAs" validate:"max=256" example:"Lerian Studio"`
	LegalDocument        string         `json:"legalDocument" validate:"required,max=256" example:"00000000000000"`
	Address              Address        `json:"address"`
	Status               Status         `json:"status"`
	Metadata             map[string]any `json:"metadata" validate:"dive,keys,keymax=100,endkeys,nonested,valuemax=2000"`

} // @name CreateOrganizationInput

CreateOrganizationInput is a struct design to encapsulate request create payload data.

// swagger:model CreateOrganizationInput @Description CreateOrganizationInput is a struct design to encapsulate request create payload data for organization.

type CreatePortfolioInput

type CreatePortfolioInput struct {
	EntityID string         `json:"entityId" validate:"required,max=256" example:"00000000-0000-0000-0000-000000000000"`
	Name     string         `json:"name" validate:"required,max=256" example:"My Portfolio"`
	Status   Status         `json:"status"`
	Metadata map[string]any `json:"metadata" validate:"dive,keys,keymax=100,endkeys,nonested,valuemax=2000"`

} // @name CreatePortfolioInput

CreatePortfolioInput is a struct design to encapsulate request create payload data.

swagger:model CreatePortfolioInput @Description CreatePortfolioInput is a struct design to encapsulate request create payload data.

type CreateProductInput

type CreateProductInput struct {
	Name     string         `json:"name" validate:"required,max=256" example:"My Product"`
	Status   Status         `json:"status"`
	Metadata map[string]any `json:"metadata" validate:"dive,keys,keymax=100,endkeys,nonested,valuemax=2000"`

} // @name CreateProductInput

CreateProductInput is a struct design to encapsulate request create payload data.

swagger:model CreateProductInput @Description CreateProductInput is a struct design to encapsulate request create payload data.

type Ledger

type Ledger struct {
	ID             string         `json:"id" example:"00000000-0000-0000-0000-000000000000"`
	Name           string         `json:"name" example:"Lerian Studio"`
	OrganizationID string         `json:"organizationId" example:"00000000-0000-0000-0000-000000000000"`
	Status         Status         `json:"status"`
	CreatedAt      time.Time      `json:"createdAt" example:"2021-01-01T00:00:00Z"`
	UpdatedAt      time.Time      `json:"updatedAt" example:"2021-01-01T00:00:00Z"`
	DeletedAt      *time.Time     `json:"deletedAt" sql:"index" example:"2021-01-01T00:00:00Z"`
	Metadata       map[string]any `json:"metadata,omitempty"`

} // @name Ledger

Ledger is a struct designed to encapsulate payload data.

swagger:model Ledger @Description Ledger is a struct designed to encapsulate payload data.

type Ledgers

type Ledgers struct {
	Items []Ledger `json:"items"`
	Page  int      `json:"page" example:"1"`
	Limit int      `json:"limit" example:"10"`

} // @name Ledgers

Ledgers struct to return get all.

swagger:model Ledgers @Description Ledgers struct to return get all.

type Organization

type Organization struct {
	ID                   string         `json:"id" example:"00000000-0000-0000-0000-000000000000"`
	ParentOrganizationID *string        `json:"parentOrganizationId" example:"00000000-0000-0000-0000-000000000000"`
	LegalName            string         `json:"legalName" example:"Lerian Studio"`
	DoingBusinessAs      *string        `json:"doingBusinessAs" example:"Lerian Studio"`
	LegalDocument        string         `json:"legalDocument" example:"00000000000000"`
	Address              Address        `json:"address"`
	Status               Status         `json:"status"`
	CreatedAt            time.Time      `json:"createdAt" example:"2021-01-01T00:00:00Z"`
	UpdatedAt            time.Time      `json:"updatedAt" example:"2021-01-01T00:00:00Z"`
	DeletedAt            *time.Time     `json:"deletedAt" example:"2021-01-01T00:00:00Z"`
	Metadata             map[string]any `json:"metadata,omitempty"`

} // @name Organization

Organization is a struct designed to encapsulate response payload data.

swagger:model Organization @Description Organization is a struct designed to encapsulate response payload data.

type Organizations

type Organizations struct {
	Items []Organization `json:"items"`
	Page  int            `json:"page" example:"1"`
	Limit int            `json:"limit" example:"10"`

} // @name Organizations

Organizations struct to return get all.

swagger:model Organizations @Description Organizations struct to return get all.

type Portfolio

type Portfolio struct {
	ID             string         `json:"id" example:"00000000-0000-0000-0000-000000000000"`
	Name           string         `json:"name" example:"My Portfolio"`
	EntityID       string         `json:"entityId" example:"00000000-0000-0000-0000-000000000000"`
	LedgerID       string         `json:"ledgerId" example:"00000000-0000-0000-0000-000000000000"`
	OrganizationID string         `json:"organizationId" example:"00000000-0000-0000-0000-000000000000"`
	Status         Status         `json:"status"`
	CreatedAt      time.Time      `json:"createdAt" example:"2021-01-01T00:00:00Z"`
	UpdatedAt      time.Time      `json:"updatedAt" example:"2021-01-01T00:00:00Z"`
	DeletedAt      *time.Time     `json:"deletedAt" example:"2021-01-01T00:00:00Z"`
	Metadata       map[string]any `json:"metadata,omitempty"`

} // @name Portfolio

Portfolio is a struct designed to encapsulate request update payload data.

swagger:model Portfolio @Description Portfolio is a struct designed to encapsulate request update payload data.

type Portfolios

type Portfolios struct {
	Items []Portfolio `json:"items"`
	Page  int         `json:"page" example:"1"`
	Limit int         `json:"limit" example:"10"`

} // @name Portfolios

Portfolios struct to return get all.

swagger:model Portfolios @Description Portfolios struct to return get all.

type Product

type Product struct {
	ID             string         `json:"id" example:"00000000-0000-0000-0000-000000000000"`
	Name           string         `json:"name" example:"My Product"`
	LedgerID       string         `json:"ledgerId" example:"00000000-0000-0000-0000-000000000000"`
	OrganizationID string         `json:"organizationId" example:"00000000-0000-0000-0000-000000000000"`
	Status         Status         `json:"status"`
	CreatedAt      time.Time      `json:"createdAt" example:"2021-01-01T00:00:00Z"`
	UpdatedAt      time.Time      `json:"updatedAt" example:"2021-01-01T00:00:00Z"`
	DeletedAt      *time.Time     `json:"deletedAt" example:"2021-01-01T00:00:00Z"`
	Metadata       map[string]any `json:"metadata,omitempty"`

} // @name Product

Product is a struct designed to encapsulate payload data.

swagger:model Product @Description Product is a struct designed to encapsulate payload data.

type Products

type Products struct {
	Items []Product `json:"items"`
	Page  int       `json:"page" example:"1"`
	Limit int       `json:"limit" example:"10"`

} // @name Products

Products struct to return get all.

swagger:model Products @Description Products struct to return get all.

type Status

type Status struct {
	Code        string  `json:"code" validate:"max=100" example:"ACTIVE"`
	Description *string `json:"description" validate:"omitempty,max=256" example:"Active status"`

} // @name Status

Status structure for marshaling/unmarshalling JSON.

swagger:model Status @Description Status structure for marshaling/unmarshalling JSON.

func (Status) IsEmpty

func (s Status) IsEmpty() bool

IsEmpty method that set empty or nil in fields

type UpdateAccountInput

type UpdateAccountInput struct {
	Name           string         `json:"name" validate:"max=256" example:"My Account Updated"`
	Status         Status         `json:"status"`
	AllowSending   *bool          `json:"allowSending" example:"true"`
	AllowReceiving *bool          `json:"allowReceiving" example:"true"`
	Alias          *string        `json:"alias" validate:"max=100" example:"@person1"`
	ProductID      *string        `json:"productId" validate:"uuid" example:"00000000-0000-0000-0000-000000000000"`
	Metadata       map[string]any `json:"metadata" validate:"dive,keys,keymax=100,endkeys,nonested,valuemax=2000"`

} // @name UpdateAccountInput

UpdateAccountInput is a struct design to encapsulate request update payload data.

swagger:model UpdateAccountInput @Description UpdateAccountInput is a struct design to encapsulate request update payload data.

type UpdateAssetInput

type UpdateAssetInput struct {
	Name     string         `json:"name" validate:"max=256" example:"Bitcoin"`
	Status   Status         `json:"status"`
	Metadata map[string]any `json:"metadata" validate:"dive,keys,keymax=100,endkeys,nonested,valuemax=2000"`

} // @name UpdateAssetInput

UpdateAssetInput is a struct design to encapsulate request update payload data.

swagger:model UpdateAssetInput @Description UpdateAssetInput is a struct design to encapsulate request update payload data.

type UpdateLedgerInput

type UpdateLedgerInput struct {
	Name     string         `json:"name" validate:"max=256" example:"Lerian Studio Updated"`
	Status   Status         `json:"status"`
	Metadata map[string]any `json:"metadata" validate:"dive,keys,keymax=100,endkeys,nonested,valuemax=2000"`

} // @name UpdateLedgerInput

UpdateLedgerInput is a struct design to encapsulate request update payload data.

swagger:model UpdateLedgerInput @Description UpdateLedgerInput is a struct design to encapsulate request update payload data for ledger.

type UpdateOrganizationInput

type UpdateOrganizationInput struct {
	LegalName            string         `json:"legalName" validate:"required,max=256" example:"Lerian Studio Updated"`
	ParentOrganizationID *string        `json:"parentOrganizationId" validate:"omitempty,uuid" example:"00000000-0000-0000-0000-000000000000"`
	DoingBusinessAs      *string        `json:"doingBusinessAs" validate:"max=256" example:"The ledger.io"`
	Address              Address        `json:"address"`
	Status               Status         `json:"status"`
	Metadata             map[string]any `json:"metadata" validate:"dive,keys,keymax=100,endkeys,nonested,valuemax=2000"`

} // @name UpdateOrganizationInput

UpdateOrganizationInput is a struct design to encapsulate request update payload data.

// swagger:model UpdateOrganizationInput @Description UpdateOrganizationInput is a struct design to encapsulate request update payload data for organization.

type UpdatePortfolioInput

type UpdatePortfolioInput struct {
	Name     string         `json:"name" validate:"max=256" example:"My Portfolio Updated"`
	Status   Status         `json:"status"`
	Metadata map[string]any `json:"metadata" validate:"dive,keys,keymax=100,endkeys,nonested,valuemax=2000"`

} // @name UpdatePortfolioInput

UpdatePortfolioInput is a struct design to encapsulate payload data.

swagger:model UpdatePortfolioInput @Description UpdatePortfolioInput is a struct design to encapsulate payload data.

type UpdateProductInput

type UpdateProductInput struct {
	Name     string         `json:"name" validate:"max=256" example:"My Product Updated"`
	Status   Status         `json:"status"`
	Metadata map[string]any `json:"metadata" validate:"dive,keys,keymax=100,endkeys,nonested,valuemax=2000"`

} // @name UpdateProductInput

UpdateProductInput is a struct design to encapsulate request update payload data.

swagger:model UpdateProductInput @Description UpdateProductInput is a struct design to encapsulate request update payload data.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL