schema

package
v0.0.0-...-c846bbc Latest Latest
Warning

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

Go to latest
Published: Nov 28, 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 AccountStatus

type AccountStatus string
const (
	AccountStatusActive                AccountStatus = "ACTIVE"
	AccountStatusPendingUserActivation AccountStatus = "PENDING_USER_ACTIVATION"
)

type AccountType

type AccountType string

AccountType represents the type of an account in the system, in the format of a string that displays it's qualifiers in the format of {ROLE}.{PLATFORM}.{STORAGE_METHOD}. For example, "HOST.STELLAR.ENV" represents a host account that is used in the Stellar platform and stored in the environment.

const (
	HostStellarEnv                    AccountType = "HOST.STELLAR.ENV"
	ChannelAccountStellarDB           AccountType = "CHANNEL_ACCOUNT.STELLAR.DB"
	DistributionAccountStellarEnv     AccountType = "DISTRIBUTION_ACCOUNT.STELLAR.ENV"      // was "ENV_STELLAR"
	DistributionAccountStellarDBVault AccountType = "DISTRIBUTION_ACCOUNT.STELLAR.DB_VAULT" // was "DB_VAULT_STELLAR"
	DistributionAccountCircleDBVault  AccountType = "DISTRIBUTION_ACCOUNT.CIRCLE.DB_VAULT"  // was "DB_VAULT_CIRCLE"
)

func AllAccountTypes

func AllAccountTypes() []AccountType

func DistributionAccountTypes

func DistributionAccountTypes() []AccountType

func (AccountType) IsCircle

func (t AccountType) IsCircle() bool

func (AccountType) IsStellar

func (t AccountType) IsStellar() bool

func (AccountType) Platform

func (t AccountType) Platform() Platform

func (AccountType) Role

func (t AccountType) Role() Role

func (AccountType) StorageMethod

func (t AccountType) StorageMethod() StorageMethod

type Platform

type Platform string

Platform represents the platform where the account is used, e.g. STELLAR, or CIRCLE.

const (
	StellarPlatform Platform = "STELLAR"
	CirclePlatform  Platform = "CIRCLE"
)

type Role

type Role string

Role represents the role of an account in the system, e.g. HOST, CHANNEL_ACCOUNT, or DISTRIBUTION_ACCOUNT.

const (
	HostRole                Role = "HOST"
	ChannelAccountRole      Role = "CHANNEL_ACCOUNT"
	DistributionAccountRole Role = "DISTRIBUTION_ACCOUNT"
)

type StorageMethod

type StorageMethod string

StorageMethod represents the method used to store the account secret, e.g. ENV, DB_VAULT, or DB.

const (
	EnvStorageMethod     StorageMethod = "ENV"
	DBStorageMethod      StorageMethod = "DB"
	DBVaultStorageMethod StorageMethod = "DB_VAULT"
)

type TransactionAccount

type TransactionAccount struct {
	Address        string        `json:"address,omitempty"`
	CircleWalletID string        `json:"circle_wallet_id,omitempty"`
	Type           AccountType   `json:"type"`
	Status         AccountStatus `json:"status"`
}

TransactionAccount represents an account that is used for transactions, either directly with the STellar network or with Circle.

func NewDefaultChannelAccount

func NewDefaultChannelAccount(stellarAddress string) TransactionAccount

func NewDefaultHostAccount

func NewDefaultHostAccount(stellarAddress string) TransactionAccount

func NewDefaultStellarTransactionAccount

func NewDefaultStellarTransactionAccount(stellarAddress string) TransactionAccount

func NewStellarEnvTransactionAccount

func NewStellarEnvTransactionAccount(stellarAddress string) TransactionAccount

func (TransactionAccount) ID

func (da TransactionAccount) ID() string

func (TransactionAccount) IsActive

func (da TransactionAccount) IsActive() bool

func (TransactionAccount) IsCircle

func (da TransactionAccount) IsCircle() bool

func (TransactionAccount) IsPendingUserActivation

func (da TransactionAccount) IsPendingUserActivation() bool

func (TransactionAccount) IsStellar

func (da TransactionAccount) IsStellar() bool

func (TransactionAccount) String

func (da TransactionAccount) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳