repository

package
v0.0.1-0...-104a2d1 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2025 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ACCOUNTTYPE

type ACCOUNTTYPE string
const (
	ACCOUNTTYPECash       ACCOUNTTYPE = "cash"
	ACCOUNTTYPEMomo       ACCOUNTTYPE = "momo"
	ACCOUNTTYPECredit     ACCOUNTTYPE = "credit"
	ACCOUNTTYPEInvestment ACCOUNTTYPE = "investment"
	ACCOUNTTYPEChecking   ACCOUNTTYPE = "checking"
	ACCOUNTTYPESavings    ACCOUNTTYPE = "savings"
	ACCOUNTTYPELoan       ACCOUNTTYPE = "loan"
	ACCOUNTTYPEOther      ACCOUNTTYPE = "other"
)

func (*ACCOUNTTYPE) Scan

func (e *ACCOUNTTYPE) Scan(src interface{}) error

func (ACCOUNTTYPE) Valid

func (e ACCOUNTTYPE) Valid() bool

type Account

type Account struct {
	ID                uuid.UUID          `json:"id"`
	Name              string             `json:"name"`
	Type              ACCOUNTTYPE        `json:"type"`
	Balance           pgtype.Numeric     `json:"balance"`
	Currency          string             `json:"currency"`
	Color             COLORENUM          `json:"color"`
	Meta              []byte             `json:"meta"`
	CreatedBy         *uuid.UUID         `json:"created_by"`
	UpdatedBy         *uuid.UUID         `json:"updated_by"`
	CreatedAt         time.Time          `json:"created_at"`
	UpdatedAt         time.Time          `json:"updated_at"`
	DeletedAt         pgtype.Timestamptz `json:"deleted_at"`
	IsExternal        *bool              `json:"is_external"`
	ProviderAccountID *string            `json:"provider_account_id"`
	ProviderName      *string            `json:"provider_name"`
	SyncStatus        *string            `json:"sync_status"`
	LastSyncedAt      pgtype.Timestamptz `json:"last_synced_at"`
	ConnectionID      *uuid.UUID         `json:"connection_id"`
	Subtype           *string            `json:"subtype"`
}

type AddLinkedAccountParams

type AddLinkedAccountParams struct {
	UserID         uuid.UUID `json:"user_id"`
	Provider       string    `json:"provider"`
	ProviderUserID string    `json:"provider_user_id"`
	Email          *string   `json:"email"`
}

type BatchCreateAccountParams

type BatchCreateAccountParams struct {
	CreatedBy         *uuid.UUID     `json:"created_by"`
	Name              string         `json:"name"`
	Type              interface{}    `json:"type"`
	Subtype           *string        `json:"subtype"`
	Balance           pgtype.Numeric `json:"balance"`
	Currency          string         `json:"currency"`
	Color             interface{}    `json:"color"`
	Meta              []byte         `json:"meta"`
	ConnectionID      *uuid.UUID     `json:"connection_id"`
	IsExternal        *bool          `json:"is_external"`
	ProviderAccountID *string        `json:"provider_account_id"`
	ProviderName      *string        `json:"provider_name"`
}

type BatchCreateTransactionParams

type BatchCreateTransactionParams struct {
	Amount                pgtype.Numeric     `json:"amount"`
	Type                  string             `json:"type"`
	AccountID             uuid.UUID          `json:"account_id"`
	DestinationAccountID  *uuid.UUID         `json:"destination_account_id"`
	CategoryID            uuid.UUID          `json:"category_id"`
	Description           *string            `json:"description"`
	TransactionDatetime   pgtype.Timestamptz `json:"transaction_datetime"`
	Details               dto.Details        `json:"details"`
	ProviderTransactionID *string            `json:"provider_transaction_id"`
	IsExternal            *bool              `json:"is_external"`
	CreatedBy             *uuid.UUID         `json:"created_by"`
}

type COLORENUM

type COLORENUM string
const (
	COLORENUMRed   COLORENUM = "red"
	COLORENUMGreen COLORENUM = "green"
	COLORENUMBlue  COLORENUM = "blue"
)

func (*COLORENUM) Scan

func (e *COLORENUM) Scan(src interface{}) error

func (COLORENUM) Valid

func (e COLORENUM) Valid() bool

type Category

type Category struct {
	ID        uuid.UUID          `json:"id"`
	Name      string             `json:"name"`
	ParentID  *uuid.UUID         `json:"parent_id"`
	IsDefault *bool              `json:"is_default"`
	CreatedBy uuid.UUID          `json:"created_by"`
	UpdatedBy *uuid.UUID         `json:"updated_by"`
	CreatedAt time.Time          `json:"created_at"`
	UpdatedAt time.Time          `json:"updated_at"`
	DeletedAt pgtype.Timestamptz `json:"deleted_at"`
}

type ConvertAmountParams

type ConvertAmountParams struct {
	Column1 *string        `json:"column_1"`
	Column2 *string        `json:"column_2"`
	Column3 pgtype.Numeric `json:"column_3"`
}

type CreateAccountParams

type CreateAccountParams struct {
	CreatedBy         *uuid.UUID     `json:"created_by"`
	Name              string         `json:"name"`
	Type              interface{}    `json:"type"`
	Subtype           *string        `json:"subtype"`
	Balance           pgtype.Numeric `json:"balance"`
	Currency          string         `json:"currency"`
	Color             interface{}    `json:"color"`
	Meta              []byte         `json:"meta"`
	ConnectionID      *uuid.UUID     `json:"connection_id"`
	IsExternal        *bool          `json:"is_external"`
	ProviderAccountID *string        `json:"provider_account_id"`
	ProviderName      *string        `json:"provider_name"`
}

type CreateCategoryParams

type CreateCategoryParams struct {
	Name      string     `json:"name"`
	ParentID  *uuid.UUID `json:"parent_id"`
	IsDefault *bool      `json:"is_default"`
	CreatedBy uuid.UUID  `json:"created_by"`
}

type CreateConnectionParams

type CreateConnectionParams struct {
	UserID               *uuid.UUID         `json:"user_id"`
	ProviderName         *string            `json:"provider_name"`
	AccessTokenEncrypted *string            `json:"access_token_encrypted"`
	ItemID               *string            `json:"item_id"`
	InstitutionID        *string            `json:"institution_id"`
	InstitutionName      *string            `json:"institution_name"`
	ProviderAccountID    *string            `json:"provider_account_id"`
	Status               *string            `json:"status"`
	LastSyncAt           pgtype.Timestamptz `json:"last_sync_at"`
	ExpiresAt            pgtype.Timestamptz `json:"expires_at"`
}

type CreateTagParams

type CreateTagParams struct {
	UserID uuid.UUID   `json:"user_id"`
	Name   string      `json:"name"`
	Color  interface{} `json:"color"`
}

type CreateTransactionParams

type CreateTransactionParams struct {
	Amount                pgtype.Numeric     `json:"amount"`
	Type                  string             `json:"type"`
	AccountID             uuid.UUID          `json:"account_id"`
	DestinationAccountID  *uuid.UUID         `json:"destination_account_id"`
	CategoryID            uuid.UUID          `json:"category_id"`
	Description           *string            `json:"description"`
	TransactionDatetime   pgtype.Timestamptz `json:"transaction_datetime"`
	Details               dto.Details        `json:"details"`
	ProviderTransactionID *string            `json:"provider_transaction_id"`
	IsExternal            *bool              `json:"is_external"`
	CreatedBy             *uuid.UUID         `json:"created_by"`
}

type CreateUserParams

type CreateUserParams struct {
	Email     string  `json:"email"`
	FirstName *string `json:"first_name"`
	LastName  *string `json:"last_name"`
	Password  *string `json:"password"`
}

type CreateWebhookEventParams

type CreateWebhookEventParams struct {
	SubscriptionID uuid.UUID `json:"subscription_id"`
	EventType      string    `json:"event_type"`
	Payload        []byte    `json:"payload"`
	Status         *string   `json:"status"`
}

type CreateWebhookSubscriptionParams

type CreateWebhookSubscriptionParams struct {
	UserID      uuid.UUID `json:"user_id"`
	Event       []string  `json:"event"`
	Active      bool      `json:"active"`
	EndpointUrl string    `json:"endpoint_url"`
	Secret      string    `json:"secret"`
}

type Currency

type Currency struct {
	Code string `json:"code"`
	Name string `json:"name"`
}

type DBTX

type DBTX interface {
	Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
	Query(context.Context, string, ...interface{}) (pgx.Rows, error)
	QueryRow(context.Context, string, ...interface{}) pgx.Row
	CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource) (int64, error)
}

type DeleteConnectionParams

type DeleteConnectionParams struct {
	ID     uuid.UUID `json:"id"`
	UserID uuid.UUID `json:"user_id"`
}

type DeleteLinkedAccountParams

type DeleteLinkedAccountParams struct {
	UserID   uuid.UUID `json:"user_id"`
	Provider string    `json:"provider"`
}

type DeleteTagParams

type DeleteTagParams struct {
	ID     uuid.UUID `json:"id"`
	UserID uuid.UUID `json:"user_id"`
}

type DeleteWebhookSubscriptionParams

type DeleteWebhookSubscriptionParams struct {
	ID     uuid.UUID `json:"id"`
	UserID uuid.UUID `json:"user_id"`
}

type ExchangeRate

type ExchangeRate struct {
	ID            uuid.UUID      `json:"id"`
	FromCurrency  string         `json:"from_currency"`
	ToCurrency    string         `json:"to_currency"`
	Rate          pgtype.Numeric `json:"rate"`
	EffectiveDate pgtype.Date    `json:"effective_date"`
	CreatedAt     time.Time      `json:"created_at"`
	UpdatedAt     time.Time      `json:"updated_at"`
}

type ExchangeRateExistsForDateParams

type ExchangeRateExistsForDateParams struct {
	FromCurrency  string      `json:"from_currency"`
	EffectiveDate pgtype.Date `json:"effective_date"`
}

type FinancialSyncJob

type FinancialSyncJob struct {
	ID                 uuid.UUID          `json:"id"`
	UserID             uuid.UUID          `json:"user_id"`
	ConnectionID       uuid.UUID          `json:"connection_id"`
	ProviderName       string             `json:"provider_name"`
	JobType            string             `json:"job_type"`
	Status             string             `json:"status"`
	StartedAt          pgtype.Timestamptz `json:"started_at"`
	CompletedAt        pgtype.Timestamptz `json:"completed_at"`
	ErrorMessage       *string            `json:"error_message"`
	AccountsSynced     *int32             `json:"accounts_synced"`
	TransactionsSynced *int32             `json:"transactions_synced"`
	CreatedAt          time.Time          `json:"created_at"`
}

type GetAccountBalanceTimelineRow

type GetAccountBalanceTimelineRow struct {
	Month   time.Time      `json:"month"`
	Balance pgtype.Numeric `json:"balance"`
}

type GetAccountByIdRow

type GetAccountByIdRow struct {
	ID           uuid.UUID      `json:"id"`
	Name         string         `json:"name"`
	Type         ACCOUNTTYPE    `json:"type"`
	Subtype      *string        `json:"subtype"`
	Balance      pgtype.Numeric `json:"balance"`
	Currency     string         `json:"currency"`
	Meta         []byte         `json:"meta"`
	Color        COLORENUM      `json:"color"`
	CreatedBy    *uuid.UUID     `json:"created_by"`
	UpdatedAt    time.Time      `json:"updated_at"`
	ConnectionID *uuid.UUID     `json:"connection_id"`
}

type GetAccountByProviderAccountIDParams

type GetAccountByProviderAccountIDParams struct {
	ProviderAccountID *string    `json:"provider_account_id"`
	CreatedBy         *uuid.UUID `json:"created_by"`
}

type GetAccountByProviderAccountIDRow

type GetAccountByProviderAccountIDRow struct {
	ID                uuid.UUID      `json:"id"`
	Name              string         `json:"name"`
	Type              ACCOUNTTYPE    `json:"type"`
	Subtype           *string        `json:"subtype"`
	Balance           pgtype.Numeric `json:"balance"`
	Currency          string         `json:"currency"`
	Color             COLORENUM      `json:"color"`
	Meta              []byte         `json:"meta"`
	CreatedBy         *uuid.UUID     `json:"created_by"`
	UpdatedAt         time.Time      `json:"updated_at"`
	ConnectionID      *uuid.UUID     `json:"connection_id"`
	ProviderName      *string        `json:"provider_name"`
	ProviderAccountID *string        `json:"provider_account_id"`
}

type GetAccountsBalanceTimelineRow

type GetAccountsBalanceTimelineRow struct {
	Month   time.Time      `json:"month"`
	Balance pgtype.Numeric `json:"balance"`
}

type GetAccountsByConnectionIDParams

type GetAccountsByConnectionIDParams struct {
	ConnectionID *uuid.UUID `json:"connection_id"`
	CreatedBy    *uuid.UUID `json:"created_by"`
}

type GetAccountsByConnectionIDRow

type GetAccountsByConnectionIDRow struct {
	ID                uuid.UUID      `json:"id"`
	Name              string         `json:"name"`
	Type              ACCOUNTTYPE    `json:"type"`
	Subtype           *string        `json:"subtype"`
	Balance           pgtype.Numeric `json:"balance"`
	Currency          string         `json:"currency"`
	Color             COLORENUM      `json:"color"`
	Meta              []byte         `json:"meta"`
	CreatedBy         *uuid.UUID     `json:"created_by"`
	UpdatedAt         time.Time      `json:"updated_at"`
	ConnectionID      *uuid.UUID     `json:"connection_id"`
	ProviderName      *string        `json:"provider_name"`
	ProviderAccountID *string        `json:"provider_account_id"`
}

type GetAccountsRow

type GetAccountsRow struct {
	ID           uuid.UUID      `json:"id"`
	Name         string         `json:"name"`
	Type         ACCOUNTTYPE    `json:"type"`
	Subtype      *string        `json:"subtype"`
	Balance      pgtype.Numeric `json:"balance"`
	Currency     string         `json:"currency"`
	Color        COLORENUM      `json:"color"`
	Meta         []byte         `json:"meta"`
	UpdatedAt    time.Time      `json:"updated_at"`
	ConnectionID *uuid.UUID     `json:"connection_id"`
}

type GetAccountsWithTrendParams

type GetAccountsWithTrendParams struct {
	Column1 time.Time  `json:"column_1"`
	Column2 time.Time  `json:"column_2"`
	UserID  *uuid.UUID `json:"user_id"`
}

type GetAccountsWithTrendRow

type GetAccountsWithTrendRow struct {
	ID                uuid.UUID      `json:"id"`
	Name              string         `json:"name"`
	Type              ACCOUNTTYPE    `json:"type"`
	Subtype           *string        `json:"subtype"`
	Balance           pgtype.Numeric `json:"balance"`
	Currency          string         `json:"currency"`
	Color             COLORENUM      `json:"color"`
	Meta              []byte         `json:"meta"`
	UpdatedAt         time.Time      `json:"updated_at"`
	Trend             pgtype.Numeric `json:"trend"`
	BalanceTimeseries []byte         `json:"balance_timeseries"`
}

type GetCategorySpendingParams

type GetCategorySpendingParams struct {
	UserID    *uuid.UUID         `json:"user_id"`
	StartDate pgtype.Timestamptz `json:"start_date"`
	EndDate   pgtype.Timestamptz `json:"end_date"`
}

type GetCategorySpendingRow

type GetCategorySpendingRow struct {
	CategoryName     string         `json:"category_name"`
	TotalAmount      pgtype.Numeric `json:"total_amount"`
	TransactionCount int64          `json:"transaction_count"`
}

type GetConnectionByProviderItemIDParams

type GetConnectionByProviderItemIDParams struct {
	UserID       uuid.UUID `json:"user_id"`
	ProviderName string    `json:"provider_name"`
	ItemID       *string   `json:"item_id"`
}

type GetExchangeRateParams

type GetExchangeRateParams struct {
	FromCurrency  string      `json:"from_currency"`
	ToCurrency    string      `json:"to_currency"`
	EffectiveDate pgtype.Date `json:"effective_date"`
}

type GetExchangeRatesForDateRow

type GetExchangeRatesForDateRow struct {
	FromCurrency string         `json:"from_currency"`
	ToCurrency   string         `json:"to_currency"`
	Rate         pgtype.Numeric `json:"rate"`
}

type GetLatestExchangeRateParams

type GetLatestExchangeRateParams struct {
	FromCurrency string `json:"from_currency"`
	ToCurrency   string `json:"to_currency"`
}

type GetLatestExchangeRateRow

type GetLatestExchangeRateRow struct {
	Rate          pgtype.Numeric `json:"rate"`
	EffectiveDate pgtype.Date    `json:"effective_date"`
}

type GetLinkedAccountsRow

type GetLinkedAccountsRow struct {
	ID        string    `json:"id"`
	Provider  string    `json:"provider"`
	CreatedAt time.Time `json:"created_at"`
}

type GetPreferencesByUserIdRow

type GetPreferencesByUserIdRow struct {
	ID                uuid.UUID `json:"id"`
	Locale            string    `json:"locale"`
	Theme             string    `json:"theme"`
	Timezone          string    `json:"timezone"`
	TimeFormat        string    `json:"time_format"`
	DateFormat        string    `json:"date_format"`
	Currency          string    `json:"currency"`
	StartWeekOnMonday bool      `json:"start_week_on_monday"`
	DarkSidebar       bool      `json:"dark_sidebar"`
	CreatedAt         time.Time `json:"created_at"`
	UpdatedAt         time.Time `json:"updated_at"`
}

type GetRefreshTokenParams

type GetRefreshTokenParams struct {
	UserID       uuid.UUID `json:"user_id"`
	RefreshToken string    `json:"refresh_token"`
}

type GetRefreshTokenRow

type GetRefreshTokenRow struct {
	ID           uuid.UUID `json:"id"`
	UserID       uuid.UUID `json:"user_id"`
	RefreshToken string    `json:"refresh_token"`
	ExpiresAt    time.Time `json:"expires_at"`
	LastUsedAt   time.Time `json:"last_used_at"`
}

type GetSessionsRow

type GetSessionsRow struct {
	ID          uuid.UUID `json:"id"`
	LastUsedAt  time.Time `json:"last_used_at"`
	UserAgent   *string   `json:"user_agent"`
	IpAddress   *string   `json:"ip_address"`
	Location    *string   `json:"location"`
	BrowserName *string   `json:"browser_name"`
	DeviceName  *string   `json:"device_name"`
	OsName      *string   `json:"os_name"`
}

type GetTagByIdRow

type GetTagByIdRow struct {
	ID     uuid.UUID `json:"id"`
	UserID uuid.UUID `json:"user_id"`
	Name   string    `json:"name"`
	Color  COLORENUM `json:"color"`
}

type GetTagsByUserIdRow

type GetTagsByUserIdRow struct {
	ID    uuid.UUID `json:"id"`
	Name  string    `json:"name"`
	Color COLORENUM `json:"color"`
}

type GetTransactionStatsParams

type GetTransactionStatsParams struct {
	UserID    *uuid.UUID `json:"user_id"`
	StartDate time.Time  `json:"start_date"`
	EndDate   time.Time  `json:"end_date"`
}

type GetTransactionStatsRow

type GetTransactionStatsRow struct {
	TotalCount     int64          `json:"total_count"`
	TotalIncome    pgtype.Numeric `json:"total_income"`
	TotalExpenses  pgtype.Numeric `json:"total_expenses"`
	TotalTransfers pgtype.Numeric `json:"total_transfers"`
}

type GetTransactionWithCurrencyRow

type GetTransactionWithCurrencyRow struct {
	ID                    uuid.UUID          `json:"id"`
	Amount                pgtype.Numeric     `json:"amount"`
	Type                  string             `json:"type"`
	AccountID             uuid.UUID          `json:"account_id"`
	CategoryID            uuid.UUID          `json:"category_id"`
	DestinationAccountID  *uuid.UUID         `json:"destination_account_id"`
	TransactionDatetime   time.Time          `json:"transaction_datetime"`
	Description           *string            `json:"description"`
	Details               dto.Details        `json:"details"`
	CreatedBy             *uuid.UUID         `json:"created_by"`
	UpdatedBy             *uuid.UUID         `json:"updated_by"`
	CreatedAt             time.Time          `json:"created_at"`
	UpdatedAt             time.Time          `json:"updated_at"`
	DeletedAt             pgtype.Timestamptz `json:"deleted_at"`
	IsExternal            *bool              `json:"is_external"`
	ProviderTransactionID *string            `json:"provider_transaction_id"`
	TransactionCurrency   string             `json:"transaction_currency"`
	OriginalAmount        pgtype.Numeric     `json:"original_amount"`
	ExchangeRate          pgtype.Numeric     `json:"exchange_rate"`
	ExchangeRateDate      pgtype.Date        `json:"exchange_rate_date"`
	AccountCurrency       string             `json:"account_currency"`
	DisplayAmount         pgtype.Numeric     `json:"display_amount"`
}

type GetUserByEmailRow

type GetUserByEmailRow struct {
	ID        uuid.UUID `json:"id"`
	Email     string    `json:"email"`
	FirstName *string   `json:"first_name"`
	LastName  *string   `json:"last_name"`
	Password  *string   `json:"password"`
	AvatarUrl *string   `json:"avatar_url"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

type GetUserByIdRow

type GetUserByIdRow struct {
	ID         uuid.UUID `json:"id"`
	Email      string    `json:"email"`
	FirstName  *string   `json:"first_name"`
	LastName   *string   `json:"last_name"`
	Password   *string   `json:"password"`
	AvatarUrl  *string   `json:"avatar_url"`
	MfaEnabled bool      `json:"mfa_enabled"`
	CreatedAt  time.Time `json:"created_at"`
	UpdatedAt  time.Time `json:"updated_at"`
}

type GetUserNetWorthInBaseCurrencyParams

type GetUserNetWorthInBaseCurrencyParams struct {
	CreatedBy  *uuid.UUID `json:"created_by"`
	ToCurrency string     `json:"to_currency"`
}

type LinkedAccount

type LinkedAccount struct {
	ID             uuid.UUID `json:"id"`
	UserID         uuid.UUID `json:"user_id"`
	Provider       string    `json:"provider"`
	ProviderUserID string    `json:"provider_user_id"`
	Email          *string   `json:"email"`
	CreatedAt      time.Time `json:"created_at"`
}

type ListConnectionsParams

type ListConnectionsParams struct {
	Limit  int64 `json:"limit"`
	Offset int64 `json:"offset"`
}

type ListPreferencesParams

type ListPreferencesParams struct {
	Limit  int64 `json:"limit"`
	Offset int64 `json:"offset"`
}

type ListPreferencesRow

type ListPreferencesRow struct {
	ID        uuid.UUID `json:"id"`
	UserID    uuid.UUID `json:"user_id"`
	Locale    string    `json:"locale"`
	Theme     string    `json:"theme"`
	Currency  string    `json:"currency"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

type ListTagsParams

type ListTagsParams struct {
	Limit  int64 `json:"limit"`
	Offset int64 `json:"offset"`
}

type ListTagsRow

type ListTagsRow struct {
	ID     uuid.UUID `json:"id"`
	UserID uuid.UUID `json:"user_id"`
	Name   string    `json:"name"`
	Color  COLORENUM `json:"color"`
}

type ListTransactionsByDateRangeParams

type ListTransactionsByDateRangeParams struct {
	UserID    uuid.UUID `json:"user_id"`
	StartDate time.Time `json:"start_date"`
	EndDate   time.Time `json:"end_date"`
}

type ListTransactionsParams

type ListTransactionsParams struct {
	UserID    *uuid.UUID         `json:"user_id"`
	Type      *string            `json:"type"`
	StartDate pgtype.Timestamptz `json:"start_date"`
	EndDate   pgtype.Timestamptz `json:"end_date"`
	AccountID *uuid.UUID         `json:"account_id"`
	Offset    int32              `json:"offset"`
	Limit     *int32             `json:"limit"`
}

type ListTransactionsRow

type ListTransactionsRow struct {
	ID                   uuid.UUID      `json:"id"`
	Amount               pgtype.Numeric `json:"amount"`
	Type                 string         `json:"type"`
	DestinationAccountID *uuid.UUID     `json:"destination_account_id"`
	TransactionDatetime  time.Time      `json:"transaction_datetime"`
	Description          *string        `json:"description"`
	Details              dto.Details    `json:"details"`
	UpdatedAt            time.Time      `json:"updated_at"`
	Category             Category       `json:"category"`
	Account              Account        `json:"account"`
}

type ListUsersParams

type ListUsersParams struct {
	Limit  int64 `json:"limit"`
	Offset int64 `json:"offset"`
}

type ListUsersRow

type ListUsersRow struct {
	ID        uuid.UUID `json:"id"`
	Email     string    `json:"email"`
	FirstName *string   `json:"first_name"`
	LastName  *string   `json:"last_name"`
	AvatarUrl *string   `json:"avatar_url"`
	Password  *string   `json:"password"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

type ListWebhookSubscriptionsParams

type ListWebhookSubscriptionsParams struct {
	Limit  int64 `json:"limit"`
	Offset int64 `json:"offset"`
}

type ListWebhookSubscriptionsRow

type ListWebhookSubscriptionsRow struct {
	ID          uuid.UUID        `json:"id"`
	UserID      uuid.UUID        `json:"user_id"`
	Active      bool             `json:"active"`
	Event       []string         `json:"event"`
	EndpointUrl string           `json:"endpoint_url"`
	Secret      string           `json:"secret"`
	CreatedAt   pgtype.Timestamp `json:"created_at"`
}

type NullACCOUNTTYPE

type NullACCOUNTTYPE struct {
	ACCOUNTTYPE ACCOUNTTYPE `json:"ACCOUNT_TYPE"`
	Valid       bool        `json:"valid"` // Valid is true if ACCOUNTTYPE is not NULL
}

func (*NullACCOUNTTYPE) Scan

func (ns *NullACCOUNTTYPE) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullACCOUNTTYPE) Value

func (ns NullACCOUNTTYPE) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type NullCOLORENUM

type NullCOLORENUM struct {
	COLORENUM COLORENUM `json:"COLOR_ENUM"`
	Valid     bool      `json:"valid"` // Valid is true if COLORENUM is not NULL
}

func (*NullCOLORENUM) Scan

func (ns *NullCOLORENUM) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullCOLORENUM) Value

func (ns NullCOLORENUM) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type NullRiverJobState

type NullRiverJobState struct {
	RiverJobState RiverJobState `json:"river_job_state"`
	Valid         bool          `json:"valid"` // Valid is true if RiverJobState is not NULL
}

func (*NullRiverJobState) Scan

func (ns *NullRiverJobState) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullRiverJobState) Value

func (ns NullRiverJobState) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type Preference

type Preference struct {
	ID                uuid.UUID          `json:"id"`
	UserID            uuid.UUID          `json:"user_id"`
	Locale            string             `json:"locale"`
	Theme             string             `json:"theme"`
	Currency          string             `json:"currency"`
	CreatedAt         time.Time          `json:"created_at"`
	UpdatedAt         time.Time          `json:"updated_at"`
	DeletedAt         pgtype.Timestamptz `json:"deleted_at"`
	Timezone          string             `json:"timezone"`
	TimeFormat        string             `json:"time_format"`
	DateFormat        string             `json:"date_format"`
	StartWeekOnMonday bool               `json:"start_week_on_monday"`
	DarkSidebar       bool               `json:"dark_sidebar"`
}

type Queries

type Queries struct {
	// contains filtered or unexported fields
}

func New

func New(db DBTX) *Queries

func (*Queries) AddLinkedAccount

func (q *Queries) AddLinkedAccount(ctx context.Context, arg AddLinkedAccountParams) error

func (*Queries) BatchCreateAccount

func (q *Queries) BatchCreateAccount(ctx context.Context, arg []BatchCreateAccountParams) (int64, error)

func (*Queries) BatchCreateTransaction

func (q *Queries) BatchCreateTransaction(ctx context.Context, arg []BatchCreateTransactionParams) (int64, error)

func (*Queries) CleanupOldWebhookEvents

func (q *Queries) CleanupOldWebhookEvents(ctx context.Context) error

func (*Queries) ConvertAmount

func (q *Queries) ConvertAmount(ctx context.Context, arg ConvertAmountParams) (pgtype.Numeric, error)

func (*Queries) CreateAccount

func (q *Queries) CreateAccount(ctx context.Context, arg CreateAccountParams) (Account, error)

func (*Queries) CreateCategory

func (q *Queries) CreateCategory(ctx context.Context, arg CreateCategoryParams) (Category, error)

func (*Queries) CreateConnection

func (*Queries) CreateDefaultCategories

func (q *Queries) CreateDefaultCategories(ctx context.Context, userID uuid.UUID) error

func (*Queries) CreateDefaultPreferences

func (q *Queries) CreateDefaultPreferences(ctx context.Context, userID uuid.UUID) error

func (*Queries) CreateTag

func (q *Queries) CreateTag(ctx context.Context, arg CreateTagParams) (Tag, error)

func (*Queries) CreateTransaction

func (q *Queries) CreateTransaction(ctx context.Context, arg CreateTransactionParams) (Transaction, error)

func (*Queries) CreateUser

func (q *Queries) CreateUser(ctx context.Context, arg CreateUserParams) (User, error)

func (*Queries) CreateWebhookEvent

func (q *Queries) CreateWebhookEvent(ctx context.Context, arg CreateWebhookEventParams) (WebhookEvent, error)

func (*Queries) CreateWebhookSubscription

func (q *Queries) CreateWebhookSubscription(ctx context.Context, arg CreateWebhookSubscriptionParams) (WebhookSubscription, error)

func (*Queries) DeleteAccount

func (q *Queries) DeleteAccount(ctx context.Context, id uuid.UUID) error

func (*Queries) DeleteCategory

func (q *Queries) DeleteCategory(ctx context.Context, id uuid.UUID) error

func (*Queries) DeleteConnection

func (q *Queries) DeleteConnection(ctx context.Context, arg DeleteConnectionParams) error

func (*Queries) DeleteExpiredTokens

func (q *Queries) DeleteExpiredTokens(ctx context.Context, userID uuid.UUID) error

func (*Queries) DeleteLinkedAccount

func (q *Queries) DeleteLinkedAccount(ctx context.Context, arg DeleteLinkedAccountParams) error

func (*Queries) DeletePreferences

func (q *Queries) DeletePreferences(ctx context.Context, userID uuid.UUID) error

func (*Queries) DeleteTag

func (q *Queries) DeleteTag(ctx context.Context, arg DeleteTagParams) error

func (*Queries) DeleteTransaction

func (q *Queries) DeleteTransaction(ctx context.Context, id uuid.UUID) error

func (*Queries) DeleteUser

func (q *Queries) DeleteUser(ctx context.Context, id uuid.UUID) error

func (*Queries) DeleteUserToken

func (q *Queries) DeleteUserToken(ctx context.Context, userID uuid.UUID) error

func (*Queries) DeleteWebhookEvent

func (q *Queries) DeleteWebhookEvent(ctx context.Context, id uuid.UUID) error

func (*Queries) DeleteWebhookSubscription

func (q *Queries) DeleteWebhookSubscription(ctx context.Context, arg DeleteWebhookSubscriptionParams) error

func (*Queries) DisableMFA

func (q *Queries) DisableMFA(ctx context.Context, id uuid.UUID) error

func (*Queries) EnableMFA

func (q *Queries) EnableMFA(ctx context.Context, id uuid.UUID) error

func (*Queries) ExchangeRateExistsForDate

func (q *Queries) ExchangeRateExistsForDate(ctx context.Context, arg ExchangeRateExistsForDateParams) (bool, error)

func (*Queries) GetAccountBalanceTimeline

func (q *Queries) GetAccountBalanceTimeline(ctx context.Context, id uuid.UUID) ([]GetAccountBalanceTimelineRow, error)

Changed to :many as it returns multiple rows (one per month)

func (*Queries) GetAccountById

func (q *Queries) GetAccountById(ctx context.Context, id uuid.UUID) (GetAccountByIdRow, error)

func (*Queries) GetAccountByProviderAccountID

Or other desired order

func (*Queries) GetAccountCurrency

func (q *Queries) GetAccountCurrency(ctx context.Context, id uuid.UUID) (string, error)

func (*Queries) GetAccounts

func (q *Queries) GetAccounts(ctx context.Context, userID *uuid.UUID) ([]GetAccountsRow, error)

func (*Queries) GetAccountsBalanceTimeline

func (q *Queries) GetAccountsBalanceTimeline(ctx context.Context, userID *uuid.UUID) ([]GetAccountsBalanceTimelineRow, error)

Get all transactions for each account to understand what data we have Calculate transactions that happened before our timeline period Calculate transactions within our timeline period Determine the correct initial balance for the start of our timeline Monthly transaction aggregation within our timeline Combine everything: accounts, months, and their balances Calculate running balances Final aggregation: Sum all account balances per month

func (*Queries) GetAccountsByConnectionID

func (q *Queries) GetAccountsByConnectionID(ctx context.Context, arg GetAccountsByConnectionIDParams) ([]GetAccountsByConnectionIDRow, error)

func (*Queries) GetAccountsWithTrend

func (q *Queries) GetAccountsWithTrend(ctx context.Context, arg GetAccountsWithTrendParams) ([]GetAccountsWithTrendRow, error)

Final query joining trend with last 3 transactions

func (*Queries) GetCategoryById

func (q *Queries) GetCategoryById(ctx context.Context, id uuid.UUID) (Category, error)

func (*Queries) GetCategoryByName

func (q *Queries) GetCategoryByName(ctx context.Context, name string) (Category, error)

func (*Queries) GetCategorySpending

func (q *Queries) GetCategorySpending(ctx context.Context, arg GetCategorySpendingParams) ([]GetCategorySpendingRow, error)

func (*Queries) GetConnectionByID

func (q *Queries) GetConnectionByID(ctx context.Context, id uuid.UUID) (UserFinancialConnection, error)

func (*Queries) GetConnectionByProviderItemID

func (q *Queries) GetConnectionByProviderItemID(ctx context.Context, arg GetConnectionByProviderItemIDParams) (UserFinancialConnection, error)

func (*Queries) GetConnectionsByUserID

func (q *Queries) GetConnectionsByUserID(ctx context.Context, userID uuid.UUID) ([]UserFinancialConnection, error)

func (*Queries) GetCurrencies

func (q *Queries) GetCurrencies(ctx context.Context) ([]Currency, error)

func (*Queries) GetDefaultCategories

func (q *Queries) GetDefaultCategories(ctx context.Context, userID uuid.UUID) ([]Category, error)

func (*Queries) GetExchangeRate

func (q *Queries) GetExchangeRate(ctx context.Context, arg GetExchangeRateParams) (pgtype.Numeric, error)

func (*Queries) GetExchangeRatesForDate

func (q *Queries) GetExchangeRatesForDate(ctx context.Context, effectiveDate pgtype.Date) ([]GetExchangeRatesForDateRow, error)

func (*Queries) GetLatestExchangeRate

func (q *Queries) GetLatestExchangeRate(ctx context.Context, arg GetLatestExchangeRateParams) (GetLatestExchangeRateRow, error)

func (*Queries) GetLinkedAccounts

func (q *Queries) GetLinkedAccounts(ctx context.Context, userID uuid.UUID) ([]GetLinkedAccountsRow, error)

func (*Queries) GetMFASecret

func (q *Queries) GetMFASecret(ctx context.Context, id uuid.UUID) ([]byte, error)

func (*Queries) GetPendingWebhookEvents

func (q *Queries) GetPendingWebhookEvents(ctx context.Context, limit int64) ([]WebhookEvent, error)

func (*Queries) GetPreferencesByUserId

func (q *Queries) GetPreferencesByUserId(ctx context.Context, userID uuid.UUID) (GetPreferencesByUserIdRow, error)

func (*Queries) GetRefreshToken

func (q *Queries) GetRefreshToken(ctx context.Context, arg GetRefreshTokenParams) (GetRefreshTokenRow, error)

func (*Queries) GetSessions

func (q *Queries) GetSessions(ctx context.Context, userID uuid.UUID) ([]GetSessionsRow, error)

func (*Queries) GetTagById

func (q *Queries) GetTagById(ctx context.Context, id uuid.UUID) (GetTagByIdRow, error)

func (*Queries) GetTagsByUserId

func (q *Queries) GetTagsByUserId(ctx context.Context, userID uuid.UUID) ([]GetTagsByUserIdRow, error)

func (*Queries) GetTransactionById

func (q *Queries) GetTransactionById(ctx context.Context, id uuid.UUID) (Transaction, error)

func (*Queries) GetTransactionStats

func (q *Queries) GetTransactionStats(ctx context.Context, arg GetTransactionStatsParams) (GetTransactionStatsRow, error)

func (*Queries) GetTransactionWithCurrency

func (q *Queries) GetTransactionWithCurrency(ctx context.Context, id uuid.UUID) (GetTransactionWithCurrencyRow, error)

func (*Queries) GetUserByEmail

func (q *Queries) GetUserByEmail(ctx context.Context, email string) (GetUserByEmailRow, error)

func (*Queries) GetUserById

func (q *Queries) GetUserById(ctx context.Context, id uuid.UUID) (GetUserByIdRow, error)

func (*Queries) GetUserNetWorthInBaseCurrency

func (q *Queries) GetUserNetWorthInBaseCurrency(ctx context.Context, arg GetUserNetWorthInBaseCurrencyParams) (pgtype.Numeric, error)

func (*Queries) GetWebhookEventById

func (q *Queries) GetWebhookEventById(ctx context.Context, id uuid.UUID) (WebhookEvent, error)

func (*Queries) GetWebhookEventsBySubscriptionId

func (q *Queries) GetWebhookEventsBySubscriptionId(ctx context.Context, subscriptionID uuid.UUID) ([]WebhookEvent, error)

func (*Queries) GetWebhookSubscriptionById

func (q *Queries) GetWebhookSubscriptionById(ctx context.Context, id uuid.UUID) (WebhookSubscription, error)

func (*Queries) GetWebhookSubscriptionsByEvent

func (q *Queries) GetWebhookSubscriptionsByEvent(ctx context.Context, event string) ([]WebhookSubscription, error)

func (*Queries) GetWebhookSubscriptionsByUserId

func (q *Queries) GetWebhookSubscriptionsByUserId(ctx context.Context, userID uuid.UUID) ([]WebhookSubscription, error)

func (*Queries) HasPasswordAuth

func (q *Queries) HasPasswordAuth(ctx context.Context, id uuid.UUID) (*bool, error)

func (*Queries) IsMFAEnabled

func (q *Queries) IsMFAEnabled(ctx context.Context, id uuid.UUID) (bool, error)

func (*Queries) ListCategories

func (q *Queries) ListCategories(ctx context.Context, userID uuid.UUID) ([]Category, error)

func (*Queries) ListChildCategories

func (q *Queries) ListChildCategories(ctx context.Context, parentID *uuid.UUID) ([]Category, error)

func (*Queries) ListConnections

func (q *Queries) ListConnections(ctx context.Context, arg ListConnectionsParams) ([]UserFinancialConnection, error)

func (*Queries) ListPreferences

func (q *Queries) ListPreferences(ctx context.Context, arg ListPreferencesParams) ([]ListPreferencesRow, error)

func (*Queries) ListTags

func (q *Queries) ListTags(ctx context.Context, arg ListTagsParams) ([]ListTagsRow, error)

func (*Queries) ListTransactions

func (q *Queries) ListTransactions(ctx context.Context, arg ListTransactionsParams) ([]ListTransactionsRow, error)

func (*Queries) ListTransactionsByAccount

func (q *Queries) ListTransactionsByAccount(ctx context.Context, accountID uuid.UUID) ([]Transaction, error)

SELECT FROM transactions JOIN categories ON transactions.category_id = categories.id JOIN accounts ON transactions.account_id = accounts.id LEFT JOIN accounts ON transactions.destination_account_id = accounts.id WHERE

transactions.created_by = sqlc.arg('user_id')
AND transactions.deleted_at IS NULL

ORDER BY transactions.transaction_datetime DESC;

func (*Queries) ListTransactionsByCategory

func (q *Queries) ListTransactionsByCategory(ctx context.Context, categoryID uuid.UUID) ([]Transaction, error)

func (*Queries) ListTransactionsByDateRange

func (q *Queries) ListTransactionsByDateRange(ctx context.Context, arg ListTransactionsByDateRangeParams) ([]Transaction, error)

func (*Queries) ListUsers

func (q *Queries) ListUsers(ctx context.Context, arg ListUsersParams) ([]ListUsersRow, error)

func (*Queries) ListWebhookSubscriptions

func (q *Queries) ListWebhookSubscriptions(ctx context.Context, arg ListWebhookSubscriptionsParams) ([]ListWebhookSubscriptionsRow, error)

func (*Queries) RevokeSession

func (q *Queries) RevokeSession(ctx context.Context, id uuid.UUID) error

func (*Queries) SaveUserToken

func (q *Queries) SaveUserToken(ctx context.Context, arg SaveUserTokenParams) error

func (*Queries) SetConnectionErrorStatus

func (q *Queries) SetConnectionErrorStatus(ctx context.Context, arg SetConnectionErrorStatusParams) (UserFinancialConnection, error)

func (*Queries) SetConnectionSyncStatus

func (q *Queries) SetConnectionSyncStatus(ctx context.Context, arg SetConnectionSyncStatusParams) (UserFinancialConnection, error)

func (*Queries) StoreMFASecret

func (q *Queries) StoreMFASecret(ctx context.Context, arg StoreMFASecretParams) error

func (*Queries) UpdateAccount

func (q *Queries) UpdateAccount(ctx context.Context, arg UpdateAccountParams) (Account, error)

func (*Queries) UpdateAccountBalance

func (q *Queries) UpdateAccountBalance(ctx context.Context, arg UpdateAccountBalanceParams) error

func (*Queries) UpdateCategory

func (q *Queries) UpdateCategory(ctx context.Context, arg UpdateCategoryParams) (Category, error)

func (*Queries) UpdateConnection

func (*Queries) UpdatePassword

func (q *Queries) UpdatePassword(ctx context.Context, arg UpdatePasswordParams) error

func (*Queries) UpdatePreferences

func (q *Queries) UpdatePreferences(ctx context.Context, arg UpdatePreferencesParams) (Preference, error)

func (*Queries) UpdateTag

func (q *Queries) UpdateTag(ctx context.Context, arg UpdateTagParams) (Tag, error)

func (*Queries) UpdateTokenTimeSTamp

func (q *Queries) UpdateTokenTimeSTamp(ctx context.Context, id uuid.UUID) error

func (*Queries) UpdateTransaction

func (q *Queries) UpdateTransaction(ctx context.Context, arg UpdateTransactionParams) (Transaction, error)

func (*Queries) UpdateUser

func (q *Queries) UpdateUser(ctx context.Context, arg UpdateUserParams) (User, error)

func (*Queries) UpdateWebhookEventStatus

func (q *Queries) UpdateWebhookEventStatus(ctx context.Context, arg UpdateWebhookEventStatusParams) (WebhookEvent, error)

func (*Queries) UpdateWebhookSubscription

func (q *Queries) UpdateWebhookSubscription(ctx context.Context, arg UpdateWebhookSubscriptionParams) (WebhookSubscription, error)

func (*Queries) UpsertExchangeRate

func (q *Queries) UpsertExchangeRate(ctx context.Context, arg UpsertExchangeRateParams) error

func (*Queries) WithTx

func (q *Queries) WithTx(tx pgx.Tx) *Queries

type RiverClient

type RiverClient struct {
	ID        string             `json:"id"`
	CreatedAt time.Time          `json:"created_at"`
	Metadata  []byte             `json:"metadata"`
	PausedAt  pgtype.Timestamptz `json:"paused_at"`
	UpdatedAt time.Time          `json:"updated_at"`
}

type RiverClientQueue

type RiverClientQueue struct {
	RiverClientID    string    `json:"river_client_id"`
	Name             string    `json:"name"`
	CreatedAt        time.Time `json:"created_at"`
	MaxWorkers       int64     `json:"max_workers"`
	Metadata         []byte    `json:"metadata"`
	NumJobsCompleted int64     `json:"num_jobs_completed"`
	NumJobsRunning   int64     `json:"num_jobs_running"`
	UpdatedAt        time.Time `json:"updated_at"`
}

type RiverJob

type RiverJob struct {
	ID           int64              `json:"id"`
	State        RiverJobState      `json:"state"`
	Attempt      int16              `json:"attempt"`
	MaxAttempts  int16              `json:"max_attempts"`
	AttemptedAt  pgtype.Timestamptz `json:"attempted_at"`
	CreatedAt    time.Time          `json:"created_at"`
	FinalizedAt  pgtype.Timestamptz `json:"finalized_at"`
	ScheduledAt  time.Time          `json:"scheduled_at"`
	Priority     int16              `json:"priority"`
	Args         []byte             `json:"args"`
	AttemptedBy  []string           `json:"attempted_by"`
	Errors       [][]byte           `json:"errors"`
	Kind         string             `json:"kind"`
	Metadata     []byte             `json:"metadata"`
	Queue        string             `json:"queue"`
	Tags         []string           `json:"tags"`
	UniqueKey    []byte             `json:"unique_key"`
	UniqueStates pgtype.Bits        `json:"unique_states"`
}

type RiverJobState

type RiverJobState string
const (
	RiverJobStateAvailable RiverJobState = "available"
	RiverJobStateCancelled RiverJobState = "cancelled"
	RiverJobStateCompleted RiverJobState = "completed"
	RiverJobStateDiscarded RiverJobState = "discarded"
	RiverJobStatePending   RiverJobState = "pending"
	RiverJobStateRetryable RiverJobState = "retryable"
	RiverJobStateRunning   RiverJobState = "running"
	RiverJobStateScheduled RiverJobState = "scheduled"
)

func (*RiverJobState) Scan

func (e *RiverJobState) Scan(src interface{}) error

func (RiverJobState) Valid

func (e RiverJobState) Valid() bool

type RiverLeader

type RiverLeader struct {
	ElectedAt time.Time `json:"elected_at"`
	ExpiresAt time.Time `json:"expires_at"`
	LeaderID  string    `json:"leader_id"`
	Name      string    `json:"name"`
}

type RiverQueue

type RiverQueue struct {
	Name      string             `json:"name"`
	CreatedAt time.Time          `json:"created_at"`
	Metadata  []byte             `json:"metadata"`
	PausedAt  pgtype.Timestamptz `json:"paused_at"`
	UpdatedAt time.Time          `json:"updated_at"`
}

type SaveUserTokenParams

type SaveUserTokenParams struct {
	UserID       uuid.UUID          `json:"user_id"`
	RefreshToken string             `json:"refresh_token"`
	ExpiresAt    pgtype.Timestamptz `json:"expires_at"`
	UserAgent    *string            `json:"user_agent"`
	IpAddress    *string            `json:"ip_address"`
	Location     *string            `json:"location"`
	BrowserName  *string            `json:"browser_name"`
	DeviceName   *string            `json:"device_name"`
	OsName       *string            `json:"os_name"`
}

type SetConnectionErrorStatusParams

type SetConnectionErrorStatusParams struct {
	ID     uuid.UUID `json:"id"`
	Status *string   `json:"status"`
	UserID uuid.UUID `json:"user_id"`
}

type SetConnectionSyncStatusParams

type SetConnectionSyncStatusParams struct {
	ID         uuid.UUID          `json:"id"`
	Status     *string            `json:"status"`
	LastSyncAt pgtype.Timestamptz `json:"last_sync_at"`
	UserID     uuid.UUID          `json:"user_id"`
}

type StoreMFASecretParams

type StoreMFASecretParams struct {
	MfaSecret []byte    `json:"mfa_secret"`
	ID        uuid.UUID `json:"id"`
}

type Tag

type Tag struct {
	ID        uuid.UUID `json:"id"`
	UserID    uuid.UUID `json:"user_id"`
	Name      string    `json:"name"`
	Color     COLORENUM `json:"color"`
	CreatedAt time.Time `json:"created_at"`
}

type Transaction

type Transaction struct {
	ID                    uuid.UUID          `json:"id"`
	Amount                pgtype.Numeric     `json:"amount"`
	Type                  string             `json:"type"`
	AccountID             uuid.UUID          `json:"account_id"`
	CategoryID            uuid.UUID          `json:"category_id"`
	DestinationAccountID  *uuid.UUID         `json:"destination_account_id"`
	TransactionDatetime   time.Time          `json:"transaction_datetime"`
	Description           *string            `json:"description"`
	Details               dto.Details        `json:"details"`
	CreatedBy             *uuid.UUID         `json:"created_by"`
	UpdatedBy             *uuid.UUID         `json:"updated_by"`
	CreatedAt             time.Time          `json:"created_at"`
	UpdatedAt             time.Time          `json:"updated_at"`
	DeletedAt             pgtype.Timestamptz `json:"deleted_at"`
	IsExternal            *bool              `json:"is_external"`
	ProviderTransactionID *string            `json:"provider_transaction_id"`
	TransactionCurrency   string             `json:"transaction_currency"`
	OriginalAmount        pgtype.Numeric     `json:"original_amount"`
	ExchangeRate          pgtype.Numeric     `json:"exchange_rate"`
	ExchangeRateDate      pgtype.Date        `json:"exchange_rate_date"`
}

type UpdateAccountBalanceParams

type UpdateAccountBalanceParams struct {
	ID      uuid.UUID      `json:"id"`
	Balance pgtype.Numeric `json:"balance"`
}

type UpdateAccountParams

type UpdateAccountParams struct {
	Name      *string        `json:"name"`
	Type      interface{}    `json:"type"`
	Subtype   *string        `json:"subtype"`
	Balance   pgtype.Numeric `json:"balance"`
	Currency  *string        `json:"currency"`
	Color     interface{}    `json:"color"`
	Meta      []byte         `json:"meta"`
	UpdatedBy *uuid.UUID     `json:"updated_by"`
	ID        uuid.UUID      `json:"id"`
}

type UpdateCategoryParams

type UpdateCategoryParams struct {
	Name      *string    `json:"name"`
	ParentID  *uuid.UUID `json:"parent_id"`
	IsDefault *bool      `json:"is_default"`
	UpdatedBy *uuid.UUID `json:"updated_by"`
	ID        uuid.UUID  `json:"id"`
}

type UpdateConnectionParams

type UpdateConnectionParams struct {
	AccessTokenEncrypted *string            `json:"access_token_encrypted"`
	ItemID               *string            `json:"item_id"`
	InstitutionID        *string            `json:"institution_id"`
	InstitutionName      *string            `json:"institution_name"`
	ProviderAccountID    *string            `json:"provider_account_id"`
	Status               *string            `json:"status"`
	LastSyncAt           pgtype.Timestamptz `json:"last_sync_at"`
	ExpiresAt            pgtype.Timestamptz `json:"expires_at"`
	ID                   *uuid.UUID         `json:"id"`
	UserID               *uuid.UUID         `json:"user_id"`
}

type UpdatePasswordParams

type UpdatePasswordParams struct {
	Password *string   `json:"password"`
	ID       uuid.UUID `json:"id"`
}

type UpdatePreferencesParams

type UpdatePreferencesParams struct {
	Locale            *string   `json:"locale"`
	Theme             *string   `json:"theme"`
	Currency          *string   `json:"currency"`
	Timezone          *string   `json:"timezone"`
	TimeFormat        *string   `json:"time_format"`
	DateFormat        *string   `json:"date_format"`
	StartWeekOnMonday *bool     `json:"start_week_on_monday"`
	DarkSidebar       *bool     `json:"dark_sidebar"`
	UserID            uuid.UUID `json:"user_id"`
}

type UpdateTagParams

type UpdateTagParams struct {
	Name   *string     `json:"name"`
	Color  interface{} `json:"color"`
	ID     uuid.UUID   `json:"id"`
	UserID uuid.UUID   `json:"user_id"`
}

type UpdateTransactionParams

type UpdateTransactionParams struct {
	Amount              pgtype.Numeric     `json:"amount"`
	Type                *string            `json:"type"`
	AccountID           *uuid.UUID         `json:"account_id"`
	CategoryID          *uuid.UUID         `json:"category_id"`
	Description         *string            `json:"description"`
	TransactionDatetime pgtype.Timestamptz `json:"transaction_datetime"`
	Details             dto.Details        `json:"details"`
	UpdatedBy           *uuid.UUID         `json:"updated_by"`
	ID                  uuid.UUID          `json:"id"`
}

type UpdateUserParams

type UpdateUserParams struct {
	Email     *string   `json:"email"`
	FirstName *string   `json:"first_name"`
	LastName  *string   `json:"last_name"`
	AvatarUrl *string   `json:"avatar_url"`
	ID        uuid.UUID `json:"id"`
}

type UpdateWebhookEventStatusParams

type UpdateWebhookEventStatusParams struct {
	ID     uuid.UUID `json:"id"`
	Status *string   `json:"status"`
}

type UpdateWebhookSubscriptionParams

type UpdateWebhookSubscriptionParams struct {
	Event       []string  `json:"event"`
	EndpointUrl *string   `json:"endpoint_url"`
	Secret      *string   `json:"secret"`
	Active      *bool     `json:"active"`
	ID          uuid.UUID `json:"id"`
	UserID      uuid.UUID `json:"user_id"`
}

type UpsertExchangeRateParams

type UpsertExchangeRateParams struct {
	FromCurrency  string         `json:"from_currency"`
	ToCurrency    string         `json:"to_currency"`
	Rate          pgtype.Numeric `json:"rate"`
	EffectiveDate pgtype.Date    `json:"effective_date"`
}

type User

type User struct {
	ID            uuid.UUID          `json:"id"`
	Email         string             `json:"email"`
	FirstName     *string            `json:"first_name"`
	LastName      *string            `json:"last_name"`
	Password      *string            `json:"password"`
	CreatedAt     time.Time          `json:"created_at"`
	UpdatedAt     time.Time          `json:"updated_at"`
	DeletedAt     pgtype.Timestamptz `json:"deleted_at"`
	AvatarUrl     *string            `json:"avatar_url"`
	MfaSecret     []byte             `json:"mfa_secret"`
	MfaEnabled    bool               `json:"mfa_enabled"`
	MfaVerifiedAt pgtype.Timestamptz `json:"mfa_verified_at"`
}

type UserFinancialConnection

type UserFinancialConnection struct {
	ID                   uuid.UUID          `json:"id"`
	UserID               uuid.UUID          `json:"user_id"`
	ProviderName         string             `json:"provider_name"`
	AccessTokenEncrypted string             `json:"access_token_encrypted"`
	ItemID               *string            `json:"item_id"`
	InstitutionID        *string            `json:"institution_id"`
	InstitutionName      *string            `json:"institution_name"`
	Status               *string            `json:"status"`
	LastSyncAt           pgtype.Timestamptz `json:"last_sync_at"`
	ExpiresAt            pgtype.Timestamptz `json:"expires_at"`
	CreatedAt            time.Time          `json:"created_at"`
	UpdatedAt            time.Time          `json:"updated_at"`
}

type UserToken

type UserToken struct {
	ID           uuid.UUID          `json:"id"`
	UserID       uuid.UUID          `json:"user_id"`
	RefreshToken string             `json:"refresh_token"`
	ExpiresAt    time.Time          `json:"expires_at"`
	LastUsedAt   time.Time          `json:"last_used_at"`
	UserAgent    *string            `json:"user_agent"`
	IpAddress    *string            `json:"ip_address"`
	IsCurrent    *bool              `json:"is_current"`
	CreatedAt    pgtype.Timestamptz `json:"created_at"`
	Location     *string            `json:"location"`
	BrowserName  *string            `json:"browser_name"`
	DeviceName   *string            `json:"device_name"`
	OsName       *string            `json:"os_name"`
	Revoked      *bool              `json:"revoked"`
}

type WebhookEvent

type WebhookEvent struct {
	ID             uuid.UUID        `json:"id"`
	SubscriptionID uuid.UUID        `json:"subscription_id"`
	EventType      string           `json:"event_type"`
	Payload        []byte           `json:"payload"`
	Status         *string          `json:"status"`
	Attempts       *int32           `json:"attempts"`
	LastAttempt    pgtype.Timestamp `json:"last_attempt"`
	CreatedAt      pgtype.Timestamp `json:"created_at"`
}

type WebhookSubscription

type WebhookSubscription struct {
	ID          uuid.UUID        `json:"id"`
	UserID      uuid.UUID        `json:"user_id"`
	Event       []string         `json:"event"`
	Active      bool             `json:"active"`
	EndpointUrl string           `json:"endpoint_url"`
	Secret      string           `json:"secret"`
	CreatedAt   pgtype.Timestamp `json:"created_at"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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