mmodel

package
v1.48.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2025 License: Apache-2.0 Imports: 3 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"`
	SegmentID       *string        `json:"segmentId" example:"00000000-0000-0000-0000-000000000000"`
	Status          Status         `json:"status"`
	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 store account data.

func (*Account) IDtoUUID

func (a *Account) IDtoUUID() uuid.UUID

IDtoUUID is a func that convert UUID string to uuid.UUID

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 is the struct designed to return a list of accounts with pagination.

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 is a struct designed to store the address data of an organization.

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 store asset 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 is the struct designed to return a list of assets with pagination.

type Balance

type Balance struct {
	ID             string         `json:"id" example:"00000000-0000-0000-0000-000000000000"`
	OrganizationID string         `json:"organizationId" example:"00000000-0000-0000-0000-000000000000"`
	LedgerID       string         `json:"ledgerId" example:"00000000-0000-0000-0000-000000000000"`
	AccountID      string         `json:"accountId" example:"00000000-0000-0000-0000-000000000000"`
	Alias          string         `json:"alias" example:"@person1"`
	AssetCode      string         `json:"assetCode" example:"BRL"`
	Available      int64          `json:"available" example:"1500"`
	OnHold         int64          `json:"onHold" example:"500"`
	Scale          int64          `json:"scale" example:"2"`
	Version        int64          `json:"-"`
	AccountType    string         `json:"accountType" example:"creditCard"`
	AllowSending   bool           `json:"allowSending" example:"true"`
	AllowReceiving bool           `json:"allowReceiving" example:"true"`
	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"`
}

Balance is a struct designed to encapsulate response payload data.

swagger:model Balance @Description Balance is a struct designed to store balance data.

func (*Balance) IDtoUUID

func (b *Balance) IDtoUUID() uuid.UUID

IDtoUUID is a func that convert UUID string to uuid.UUID

type Balances

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

} // @name Balances

Balances struct to return get all.

swagger:model Balances @Description Balances is the struct designed to return a list of balances with pagination.

type CreateAccountInput

type CreateAccountInput struct {
	Name            string         `json:"name" validate:"max=256" example:"My Account"`
	ParentAccountID *string        `json:"parentAccountId" validate:"omitempty,uuid" example:"00000000-0000-0000-0000-000000000000"`
	EntityID        *string        `json:"entityId" validate:"omitempty,max=256" example:"00000000-0000-0000-0000-000000000000"`
	AssetCode       string         `json:"assetCode" validate:"required,max=100" example:"BRL"`
	PortfolioID     *string        `json:"portfolioId" validate:"omitempty,uuid" example:"00000000-0000-0000-0000-000000000000"`
	SegmentID       *string        `json:"segmentId" validate:"omitempty,uuid" example:"00000000-0000-0000-0000-000000000000"`
	Status          Status         `json:"status"`
	Alias           *string        `json:"alias" validate:"required,max=100,prohibitedexternalaccountprefix" example:"@person1"`
	Type            string         `json:"type" validate:"required" example:"creditCard"`
	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 the input payload to create an account.

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 the input payload to create an asset.

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 the input payload to create a 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 the input payload to create an 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 the input payload to create a portfolio.

type CreateSegmentInput added in v1.47.0

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

} // @name CreateSegmentInput

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

swagger:model CreateSegmentInput @Description CreateSegmentInput is the input payload to create a segment.

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 store ledger 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 is the struct designed to return a list of ledgers with pagination.

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 store organization 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 is the struct designed to return a list of organizations with pagination.

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 store portfolio 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 is the struct designed to return a list of portfolios with pagination.

type Queue added in v1.31.0

type Queue struct {
	OrganizationID uuid.UUID   `json:"organizationId"`
	LedgerID       uuid.UUID   `json:"ledgerId"`
	AuditID        uuid.UUID   `json:"auditId"`
	AccountID      uuid.UUID   `json:"accountId"`
	QueueData      []QueueData `json:"queueData"`
}

type QueueData added in v1.31.0

type QueueData struct {
	ID    uuid.UUID       `json:"id"`
	Value json.RawMessage `json:"value"`
}

type Segment added in v1.47.0

type Segment struct {
	ID             string         `json:"id" example:"00000000-0000-0000-0000-000000000000"`
	Name           string         `json:"name" example:"My Segment"`
	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 Segment

Segment is a struct designed to encapsulate payload data.

swagger:model Segment @Description Segment is a struct designed to store segment data.

type Segments added in v1.47.0

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

} // @name Segments

Segments struct to return get all.

swagger:model Segments @Description Segments is the struct designed to return a list of segments with pagination.

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 is the struct designed to store the status data of an entity.

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"`
	SegmentID   *string        `json:"segmentId" validate:"omitempty,uuid" example:"00000000-0000-0000-0000-000000000000"`
	PortfolioID *string        `json:"portfolioId" validate:"omitempty,uuid" example:"00000000-0000-0000-0000-000000000000"`
	Status      Status         `json:"status"`
	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 the input payload to update an account.

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 the input payload to update an asset.

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 the input payload to update a 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 the input payload to update an 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 the input payload to update a portfolio.

type UpdateSegmentInput added in v1.47.0

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

} // @name UpdateSegmentInput

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

swagger:model UpdateSegmentInput @Description UpdateSegmentInput is the input payload to update a segment.

Jump to

Keyboard shortcuts

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