mmodel

package
v1.29.0-beta.4 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 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"`
	Name            string         `json:"name"`
	ParentAccountID *string        `json:"parentAccountId"`
	EntityID        *string        `json:"entityId"`
	AssetCode       string         `json:"assetCode"`
	OrganizationID  string         `json:"organizationId"`
	LedgerID        string         `json:"ledgerId"`
	PortfolioID     *string        `json:"portfolioId"`
	ProductID       *string        `json:"productId"`
	Balance         Balance        `json:"balance"`
	Status          Status         `json:"status"`
	AllowSending    *bool          `json:"allowSending"`
	AllowReceiving  *bool          `json:"allowReceiving"`
	Alias           *string        `json:"alias"`
	Type            string         `json:"type"`
	CreatedAt       time.Time      `json:"createdAt"`
	UpdatedAt       time.Time      `json:"updatedAt"`
	DeletedAt       *time.Time     `json:"deletedAt"`
	Metadata        map[string]any `json:"metadata,omitempty"`
}

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"`
	Limit int       `json:"limit"`
}

Accounts struct to return get all.

type Address

type Address struct {
	Line1   string  `json:"line1"`
	Line2   *string `json:"line2"`
	ZipCode string  `json:"zipCode"`
	City    string  `json:"city"`
	State   string  `json:"state"`
	Country string  `json:"country"` // According to ISO 3166-1 alpha-2
}

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"`
	Name           string         `json:"name"`
	Type           string         `json:"type"`
	Code           string         `json:"code"`
	Status         Status         `json:"status"`
	LedgerID       string         `json:"ledgerId"`
	OrganizationID string         `json:"organizationId"`
	CreatedAt      time.Time      `json:"createdAt"`
	UpdatedAt      time.Time      `json:"updatedAt"`
	DeletedAt      *time.Time     `json:"deletedAt"`
	Metadata       map[string]any `json:"metadata,omitempty"`
}

Asset is a struct designed to encapsulate payload data.

type Assets

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

Assets struct to return get all.

type Balance

type Balance struct {
	Available *float64 `json:"available"`
	OnHold    *float64 `json:"onHold"`
	Scale     *float64 `json:"scale"`
}

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"`
	Name            string         `json:"name" validate:"max=256"`
	Alias           *string        `json:"alias" validate:"max=100"`
	Type            string         `json:"type" validate:"required"`
	ParentAccountID *string        `json:"parentAccountId" validate:"omitempty,uuid"`
	ProductID       *string        `json:"productId" validate:"omitempty,uuid"`
	PortfolioID     *string        `json:"portfolioId" validate:"omitempty,uuid"`
	EntityID        *string        `json:"entityId" validate:"omitempty,max=256"`
	Status          Status         `json:"status"`
	AllowSending    *bool          `json:"allowSending"`
	AllowReceiving  *bool          `json:"allowReceiving"`
	Metadata        map[string]any `json:"metadata" validate:"dive,keys,keymax=100,endkeys,nonested,valuemax=2000"`
}

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

type CreateAssetInput

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

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

type CreateLedgerInput

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

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

type CreateOrganizationInput

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

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

type CreatePortfolioInput

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

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

type CreateProductInput

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

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

type Ledger

type Ledger struct {
	ID             string         `json:"id"`
	Name           string         `json:"name"`
	OrganizationID string         `json:"organizationId"`
	Status         Status         `json:"status"`
	CreatedAt      time.Time      `json:"createdAt"`
	UpdatedAt      time.Time      `json:"updatedAt"`
	DeletedAt      *time.Time     `json:"deletedAt" sql:"index"`
	Metadata       map[string]any `json:"metadata,omitempty"`
}

Ledger is a struct designed to encapsulate payload data.

type Ledgers

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

Ledgers struct to return get all.

type Organization

type Organization struct {
	ID                   string         `json:"id"`
	ParentOrganizationID *string        `json:"parentOrganizationId"`
	LegalName            string         `json:"legalName"`
	DoingBusinessAs      *string        `json:"doingBusinessAs"`
	LegalDocument        string         `json:"legalDocument"`
	Address              Address        `json:"address"`
	Status               Status         `json:"status"`
	CreatedAt            time.Time      `json:"createdAt"`
	UpdatedAt            time.Time      `json:"updatedAt"`
	DeletedAt            *time.Time     `json:"deletedAt"`
	Metadata             map[string]any `json:"metadata,omitempty"`
}

Organization is a struct designed to encapsulate response payload data.

type Organizations

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

Organizations struct to return get all.

type Portfolio

type Portfolio struct {
	ID             string         `json:"id"`
	Name           string         `json:"name"`
	EntityID       string         `json:"entityId"`
	LedgerID       string         `json:"ledgerId"`
	OrganizationID string         `json:"organizationId"`
	Status         Status         `json:"status"`
	CreatedAt      time.Time      `json:"createdAt"`
	UpdatedAt      time.Time      `json:"updatedAt"`
	DeletedAt      *time.Time     `json:"deletedAt"`
	Metadata       map[string]any `json:"metadata,omitempty"`
}

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

type Portfolios

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

Portfolios struct to return get all.

type Product

type Product struct {
	ID             string         `json:"id"`
	Name           string         `json:"name"`
	LedgerID       string         `json:"ledgerId"`
	OrganizationID string         `json:"organizationId"`
	Status         Status         `json:"status"`
	CreatedAt      time.Time      `json:"createdAt"`
	UpdatedAt      time.Time      `json:"updatedAt"`
	DeletedAt      *time.Time     `json:"deletedAt"`
	Metadata       map[string]any `json:"metadata,omitempty"`
}

Product is a struct designed to encapsulate payload data.

type Products

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

Products struct to return get all.

type SearchAccountsInput

type SearchAccountsInput struct {
	PortfolioID *string `json:"portfolioId" validate:"omitempty,uuid"`
}

SearchAccountsInput is a struct design to encapsulate request search payload data.

type Status

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

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"`
	Status         Status         `json:"status"`
	AllowSending   *bool          `json:"allowSending"`
	AllowReceiving *bool          `json:"allowReceiving"`
	Alias          *string        `json:"alias" validate:"max=100"`
	ProductID      *string        `json:"productId" validate:"uuid"`
	Metadata       map[string]any `json:"metadata" validate:"dive,keys,keymax=100,endkeys,nonested,valuemax=2000"`
}

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

type UpdateAssetInput

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

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

type UpdateLedgerInput

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

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

type UpdateOrganizationInput

type UpdateOrganizationInput struct {
	LegalName            string         `json:"legalName" validate:"required,max=256"`
	ParentOrganizationID *string        `json:"parentOrganizationId" validate:"omitempty,uuid"`
	DoingBusinessAs      *string        `json:"doingBusinessAs" validate:"max=256"`
	Address              Address        `json:"address"`
	Status               Status         `json:"status"`
	Metadata             map[string]any `json:"metadata" validate:"dive,keys,keymax=100,endkeys,nonested,valuemax=2000"`
}

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

type UpdatePortfolioInput

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

UpdatePortfolioInput is a struct design to encapsulate payload data.

type UpdateProductInput

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

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