Documentation
¶
Index ¶
- Constants
- type Account
- type AccountCategory
- type AccountCreateRequest
- type AccountDeleteRequest
- type AccountExtend
- type AccountGetRequest
- type AccountHideRequest
- type AccountInfoResponse
- type AccountInfoResponseSlice
- type AccountListRequest
- type AccountModifyRequest
- type AccountMoveRequest
- type AccountNewDisplayOrderRequest
- type AccountType
- type AmountColorType
- type AuthResponse
- type ClearDataRequest
- type DataStatisticsResponse
- type ForgetPasswordRequest
- type ImportTransaction
- type ImportTransactionResponse
- type ImportTransactionResponsePageWrapper
- type ImportedTransactionSlice
- func (s ImportedTransactionSlice) Len() int
- func (s ImportedTransactionSlice) Less(i, j int) bool
- func (s ImportedTransactionSlice) Swap(i, j int)
- func (s ImportedTransactionSlice) ToImportTransactionResponseList() []*ImportTransactionResponse
- func (s ImportedTransactionSlice) ToTransactionTagIdsMap() (map[int][]int64, error)
- func (s ImportedTransactionSlice) ToTransactionsList() []*Transaction
- type LatestExchangeRate
- type LatestExchangeRateResponse
- type LatestExchangeRateSlice
- type PasswordResetRequest
- type RegisterResponse
- type TokenInfoResponse
- type TokenInfoResponseSlice
- type TokenRecord
- type TokenRefreshResponse
- type TokenRevokeRequest
- type Transaction
- type TransactionAmountsRequest
- type TransactionAmountsRequestItem
- type TransactionAmountsResponseItem
- type TransactionAmountsResponseItemAmountInfo
- type TransactionAmountsResponseItemAmountInfoSlice
- type TransactionCategory
- type TransactionCategoryCreateBatchRequest
- type TransactionCategoryCreateRequest
- type TransactionCategoryCreateWithSubCategories
- type TransactionCategoryDeleteRequest
- type TransactionCategoryGetRequest
- type TransactionCategoryHideRequest
- type TransactionCategoryInfoResponse
- type TransactionCategoryInfoResponseSlice
- type TransactionCategoryListRequest
- type TransactionCategoryModifyRequest
- type TransactionCategoryMoveRequest
- type TransactionCategoryNewDisplayOrderRequest
- type TransactionCategoryType
- type TransactionCountRequest
- type TransactionCountResponse
- type TransactionCreateRequest
- type TransactionDbType
- type TransactionDeleteRequest
- type TransactionEditScope
- type TransactionGeoLocationRequest
- type TransactionGeoLocationResponse
- type TransactionGetRequest
- type TransactionImportRequest
- type TransactionInfoPageWrapperResponse
- type TransactionInfoPageWrapperResponse2
- type TransactionInfoResponse
- type TransactionInfoResponseSlice
- type TransactionListByMaxTimeRequest
- type TransactionListInMonthByPageRequest
- type TransactionModifyRequest
- type TransactionMonthAmountsResponseItem
- type TransactionPictureInfo
- type TransactionPictureInfoBasicResponse
- type TransactionPictureInfoBasicResponseSlice
- type TransactionPictureUnusedDeleteRequest
- type TransactionScheduleFrequencyType
- type TransactionStatisticRequest
- type TransactionStatisticResponse
- type TransactionStatisticResponseItem
- type TransactionStatisticTrendsRequest
- type TransactionStatisticTrendsResponseItem
- type TransactionStatisticTrendsResponseItemSlice
- type TransactionTag
- type TransactionTagCreateRequest
- type TransactionTagDeleteRequest
- type TransactionTagFilterType
- type TransactionTagGetRequest
- type TransactionTagHideRequest
- type TransactionTagIndex
- type TransactionTagInfoResponse
- type TransactionTagInfoResponseSlice
- type TransactionTagModifyRequest
- type TransactionTagMoveRequest
- type TransactionTagNewDisplayOrderRequest
- type TransactionTemplate
- type TransactionTemplateCreateRequest
- type TransactionTemplateDeleteRequest
- type TransactionTemplateGetRequest
- type TransactionTemplateHideRequest
- type TransactionTemplateInfoResponse
- type TransactionTemplateInfoResponseSlice
- type TransactionTemplateListRequest
- type TransactionTemplateModifyNameRequest
- type TransactionTemplateModifyRequest
- type TransactionTemplateMoveRequest
- type TransactionTemplateNewDisplayOrderRequest
- type TransactionTemplateType
- type TransactionType
- type TwoFactor
- type TwoFactorDisableRequest
- type TwoFactorEnableConfirmRequest
- type TwoFactorEnableConfirmResponse
- type TwoFactorEnableResponse
- type TwoFactorLoginRequest
- type TwoFactorRecoveryCode
- type TwoFactorRecoveryCodeLoginRequest
- type TwoFactorRegenerateRecoveryCodeRequest
- type TwoFactorStatusResponse
- type User
- type UserBasicInfo
- type UserLoginRequest
- type UserProfileResponse
- type UserProfileUpdateRequest
- type UserProfileUpdateResponse
- type UserRegisterRequest
- type UserResendVerifyEmailRequest
- type UserVerifyEmailRequest
- type UserVerifyEmailResponse
- type YearMonthRangeRequest
Constants ¶
const LevelOneAccountParentId = 0
LevelOneAccountParentId represents the parent id of level-one account
const LevelOneTransactionParentId = 0
LevelOneTransactionParentId represents the parent id of level-one transaction category
const TokenMaxUserAgentLength = 255
TokenMaxUserAgentLength represents the maximum size of user agent stored in database
const TransactionPictureNewPictureTransactionId = int64(0)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { AccountId int64 `xorm:"PK"` Uid int64 `xorm:"INDEX(IDX_account_uid_deleted_parent_account_id_order) NOT NULL"` Deleted bool `xorm:"INDEX(IDX_account_uid_deleted_parent_account_id_order) NOT NULL"` Category AccountCategory `xorm:"NOT NULL"` Type AccountType `xorm:"NOT NULL"` ParentAccountId int64 `xorm:"INDEX(IDX_account_uid_deleted_parent_account_id_order) NOT NULL"` Name string `xorm:"VARCHAR(64) NOT NULL"` DisplayOrder int32 `xorm:"INDEX(IDX_account_uid_deleted_parent_account_id_order) NOT NULL"` Icon int64 `xorm:"NOT NULL"` Color string `xorm:"VARCHAR(6) NOT NULL"` Currency string `xorm:"VARCHAR(3) NOT NULL"` Balance int64 `xorm:"NOT NULL"` Comment string `xorm:"VARCHAR(255) NOT NULL"` Extend *AccountExtend `xorm:"BLOB"` Hidden bool `xorm:"NOT NULL"` CreatedUnixTime int64 UpdatedUnixTime int64 DeletedUnixTime int64 }
Account represents account data stored in database
func (*Account) ToAccountInfoResponse ¶
func (a *Account) ToAccountInfoResponse() *AccountInfoResponse
ToAccountInfoResponse returns a view-object according to database model
type AccountCategory ¶
type AccountCategory byte
AccountCategory represents account category
const ( ACCOUNT_CATEGORY_CASH AccountCategory = 1 ACCOUNT_CATEGORY_CHECKING_ACCOUNT AccountCategory = 2 ACCOUNT_CATEGORY_CREDIT_CARD AccountCategory = 3 ACCOUNT_CATEGORY_VIRTUAL AccountCategory = 4 ACCOUNT_CATEGORY_DEBT AccountCategory = 5 ACCOUNT_CATEGORY_RECEIVABLES AccountCategory = 6 ACCOUNT_CATEGORY_INVESTMENT AccountCategory = 7 ACCOUNT_CATEGORY_SAVINGS_ACCOUNT AccountCategory = 8 ACCOUNT_CATEGORY_CERTIFICATE_OF_DEPOSIT AccountCategory = 9 )
Account categories
type AccountCreateRequest ¶
type AccountCreateRequest struct { Name string `json:"name" binding:"required,notBlank,max=64"` Category AccountCategory `json:"category" binding:"required"` Type AccountType `json:"type" binding:"required"` Icon int64 `json:"icon,string" binding:"required,min=1"` Color string `json:"color" binding:"required,len=6,validHexRGBColor"` Currency string `json:"currency" binding:"required,len=3,validCurrency"` Balance int64 `json:"balance"` BalanceTime int64 `json:"balanceTime"` Comment string `json:"comment" binding:"max=255"` CreditCardStatementDate int `json:"creditCardStatementDate" binding:"min=0,max=28"` SubAccounts []*AccountCreateRequest `json:"subAccounts" binding:"omitempty"` ClientSessionId string `json:"clientSessionId"` }
AccountCreateRequest represents all parameters of account creation request
type AccountDeleteRequest ¶
type AccountDeleteRequest struct {
Id int64 `json:"id,string" binding:"required,min=1"`
}
AccountDeleteRequest represents all parameters of account deleting request
type AccountExtend ¶ added in v0.7.0
type AccountExtend struct {
CreditCardStatementDate *int `json:"creditCardStatementDate"`
}
AccountExtend represents account extend data stored in database
func (*AccountExtend) FromDB ¶ added in v0.7.0
func (a *AccountExtend) FromDB(data []byte) error
FromDB fills the fields from the data stored in database
func (*AccountExtend) ToDB ¶ added in v0.7.0
func (a *AccountExtend) ToDB() ([]byte, error)
ToDB returns the actual stored data in database
type AccountGetRequest ¶
type AccountGetRequest struct {
Id int64 `form:"id,string" binding:"required,min=1"`
}
AccountGetRequest represents all parameters of account getting request
type AccountHideRequest ¶
type AccountHideRequest struct { Id int64 `json:"id,string" binding:"required,min=1"` Hidden bool `json:"hidden"` }
AccountHideRequest represents all parameters of account hiding request
type AccountInfoResponse ¶
type AccountInfoResponse struct { Id int64 `json:"id,string"` Name string `json:"name"` ParentId int64 `json:"parentId,string"` Category AccountCategory `json:"category"` Type AccountType `json:"type"` Icon int64 `json:"icon,string"` Color string `json:"color"` Currency string `json:"currency"` Balance int64 `json:"balance"` Comment string `json:"comment"` CreditCardStatementDate *int `json:"creditCardStatementDate,omitempty"` DisplayOrder int32 `json:"displayOrder"` IsAsset bool `json:"isAsset,omitempty"` IsLiability bool `json:"isLiability,omitempty"` Hidden bool `json:"hidden"` SubAccounts AccountInfoResponseSlice `json:"subAccounts,omitempty"` }
AccountInfoResponse represents a view-object of account
type AccountInfoResponseSlice ¶
type AccountInfoResponseSlice []*AccountInfoResponse
AccountInfoResponseSlice represents the slice data structure of AccountInfoResponse
func (AccountInfoResponseSlice) Len ¶
func (a AccountInfoResponseSlice) Len() int
Len returns the count of items
func (AccountInfoResponseSlice) Less ¶
func (a AccountInfoResponseSlice) Less(i, j int) bool
Less reports whether the first item is less than the second one
func (AccountInfoResponseSlice) Swap ¶
func (a AccountInfoResponseSlice) Swap(i, j int)
Swap swaps two items
type AccountListRequest ¶
type AccountListRequest struct {
VisibleOnly bool `form:"visible_only"`
}
AccountListRequest represents all parameters of account listing request
type AccountModifyRequest ¶
type AccountModifyRequest struct { Id int64 `json:"id,string" binding:"required,min=1"` Name string `json:"name" binding:"required,notBlank,max=64"` Category AccountCategory `json:"category" binding:"required"` Icon int64 `json:"icon,string" binding:"min=1"` Color string `json:"color" binding:"required,len=6,validHexRGBColor"` Comment string `json:"comment" binding:"max=255"` CreditCardStatementDate int `json:"creditCardStatementDate" binding:"min=0,max=28"` Hidden bool `json:"hidden"` SubAccounts []*AccountModifyRequest `json:"subAccounts" binding:"omitempty"` }
AccountModifyRequest represents all parameters of account modification request
type AccountMoveRequest ¶
type AccountMoveRequest struct {
NewDisplayOrders []*AccountNewDisplayOrderRequest `json:"newDisplayOrders" binding:"required,min=1"`
}
AccountMoveRequest represents all parameters of account moving request
type AccountNewDisplayOrderRequest ¶
type AccountNewDisplayOrderRequest struct { Id int64 `json:"id,string" binding:"required,min=1"` DisplayOrder int32 `json:"displayOrder"` }
AccountNewDisplayOrderRequest represents a data pair of id and display order
type AccountType ¶
type AccountType byte
AccountType represents account type
const ( ACCOUNT_TYPE_SINGLE_ACCOUNT AccountType = 1 ACCOUNT_TYPE_MULTI_SUB_ACCOUNTS AccountType = 2 )
Account types
type AmountColorType ¶ added in v0.5.0
type AmountColorType byte
AmountColorType represents the type of amount color in frontend
const ( AMOUNT_COLOR_TYPE_DEFAULT AmountColorType = 0 AMOUNT_COLOR_TYPE_GREEN AmountColorType = 1 AMOUNT_COLOR_TYPE_RED AmountColorType = 2 AMOUNT_COLOR_TYPE_YELLOW AmountColorType = 3 AMOUNT_COLOR_TYPE_BLACK_OR_WHITE AmountColorType = 4 AMOUNT_COLOR_TYPE_INVALID AmountColorType = 255 )
Amount Color Types
func (AmountColorType) String ¶ added in v0.5.0
func (s AmountColorType) String() string
String returns a textual representation of the amount color type enum
type AuthResponse ¶
type AuthResponse struct { Token string `json:"token"` Need2FA bool `json:"need2FA"` User *UserBasicInfo `json:"user"` NotificationContent string `json:"notificationContent,omitempty"` }
AuthResponse returns a view-object of user authorization
type ClearDataRequest ¶
type ClearDataRequest struct {
Password string `json:"password" binding:"omitempty,min=6,max=128"`
}
ClearDataRequest represents all parameters of clear user data request
type DataStatisticsResponse ¶ added in v0.2.0
type DataStatisticsResponse struct { TotalAccountCount int64 `json:"totalAccountCount,string"` TotalTransactionCategoryCount int64 `json:"totalTransactionCategoryCount,string"` TotalTransactionTagCount int64 `json:"totalTransactionTagCount,string"` TotalTransactionCount int64 `json:"totalTransactionCount,string"` TotalTransactionPictureCount int64 `json:"totalTransactionPictureCount,string"` TotalTransactionTemplateCount int64 `json:"totalTransactionTemplateCount,string"` TotalScheduledTransactionCount int64 `json:"totalScheduledTransactionCount,string"` }
DataStatisticsResponse represents a view-object of user data statistic
type ForgetPasswordRequest ¶ added in v0.4.0
type ForgetPasswordRequest struct {
Email string `json:"email" binding:"required,notBlank,max=100,validEmail"`
}
ForgetPasswordRequest represents all parameters of forget password request
type ImportTransaction ¶ added in v0.6.0
type ImportTransaction struct { *Transaction TagIds []string OriginalCategoryName string OriginalSourceAccountName string OriginalSourceAccountCurrency string OriginalDestinationAccountName string OriginalDestinationAccountCurrency string OriginalTagNames []string }
ImportTransaction represents the imported transaction data
func (ImportTransaction) ToImportTransactionResponse ¶ added in v0.6.0
func (t ImportTransaction) ToImportTransactionResponse() *ImportTransactionResponse
ToImportTransactionResponse returns the a view-objects according to imported transaction data
type ImportTransactionResponse ¶ added in v0.6.0
type ImportTransactionResponse struct { Type TransactionType `json:"type"` CategoryId int64 `json:"categoryId,string"` OriginalCategoryName string `json:"originalCategoryName"` Time int64 `json:"time"` UtcOffset int16 `json:"utcOffset"` SourceAccountId int64 `json:"sourceAccountId,string"` OriginalSourceAccountName string `json:"originalSourceAccountName"` OriginalSourceAccountCurrency string `json:"originalSourceAccountCurrency"` DestinationAccountId int64 `json:"destinationAccountId,string,omitempty"` OriginalDestinationAccountName string `json:"originalDestinationAccountName,omitempty"` OriginalDestinationAccountCurrency string `json:"originalDestinationAccountCurrency,omitempty"` SourceAmount int64 `json:"sourceAmount"` DestinationAmount int64 `json:"destinationAmount,omitempty"` TagIds []string `json:"tagIds"` OriginalTagNames []string `json:"originalTagNames"` Comment string `json:"comment"` GeoLocation *TransactionGeoLocationResponse `json:"geoLocation,omitempty"` }
ImportTransactionResponse represents a view-object of the imported transaction data
type ImportTransactionResponsePageWrapper ¶ added in v0.6.0
type ImportTransactionResponsePageWrapper struct { Items []*ImportTransactionResponse `json:"items"` TotalCount int64 `json:"totalCount"` }
ImportTransactionResponsePageWrapper represents a response of imported transaction which contains items and count
type ImportedTransactionSlice ¶ added in v0.6.0
type ImportedTransactionSlice []*ImportTransaction
ImportedTransactionSlice represents the slice data structure of import transaction data
func (ImportedTransactionSlice) Len ¶ added in v0.6.0
func (s ImportedTransactionSlice) Len() int
Len returns the count of items
func (ImportedTransactionSlice) Less ¶ added in v0.6.0
func (s ImportedTransactionSlice) Less(i, j int) bool
Less reports whether the first item is less than the second one
func (ImportedTransactionSlice) Swap ¶ added in v0.6.0
func (s ImportedTransactionSlice) Swap(i, j int)
Swap swaps two items
func (ImportedTransactionSlice) ToImportTransactionResponseList ¶ added in v0.6.0
func (s ImportedTransactionSlice) ToImportTransactionResponseList() []*ImportTransactionResponse
ToImportTransactionResponseList returns the a list of view-objects according to imported transaction data
func (ImportedTransactionSlice) ToTransactionTagIdsMap ¶ added in v0.6.0
func (s ImportedTransactionSlice) ToTransactionTagIdsMap() (map[int][]int64, error)
ToTransactionTagIdsMap returns a list of transaction tag ids
func (ImportedTransactionSlice) ToTransactionsList ¶ added in v0.6.0
func (s ImportedTransactionSlice) ToTransactionsList() []*Transaction
ToTransactionsList returns a list of transaction models
type LatestExchangeRate ¶
LatestExchangeRate represents a data pair of currency and exchange rate
type LatestExchangeRateResponse ¶
type LatestExchangeRateResponse struct { DataSource string `json:"dataSource"` ReferenceUrl string `json:"referenceUrl"` UpdateTime int64 `json:"updateTime"` BaseCurrency string `json:"baseCurrency"` ExchangeRates LatestExchangeRateSlice `json:"exchangeRates"` }
LatestExchangeRateResponse returns a view-object which contains latest exchange rate
type LatestExchangeRateSlice ¶
type LatestExchangeRateSlice []*LatestExchangeRate
LatestExchangeRateSlice represents the slice data structure of LatestExchangeRate
func (LatestExchangeRateSlice) Len ¶
func (s LatestExchangeRateSlice) Len() int
Len returns the count of items
func (LatestExchangeRateSlice) Less ¶
func (s LatestExchangeRateSlice) Less(i, j int) bool
Less reports whether the first item is less than the second one
func (LatestExchangeRateSlice) Swap ¶
func (s LatestExchangeRateSlice) Swap(i, j int)
Swap swaps two items
type PasswordResetRequest ¶ added in v0.4.0
type PasswordResetRequest struct { Email string `json:"email" binding:"required,notBlank,max=100,validEmail"` Password string `json:"password" binding:"required,min=6,max=128"` }
PasswordResetRequest represents all parameters of reset password request
type RegisterResponse ¶ added in v0.4.0
type RegisterResponse struct { AuthResponse NeedVerifyEmail bool `json:"needVerifyEmail"` PresetCategoriesSaved bool `json:"presetCategoriesSaved"` }
RegisterResponse returns a view-object of user register response
type TokenInfoResponse ¶
type TokenInfoResponse struct { TokenId string `json:"tokenId"` TokenType core.TokenType `json:"tokenType"` UserAgent string `json:"userAgent"` LastSeen int64 `json:"lastSeen"` IsCurrent bool `json:"isCurrent"` }
TokenInfoResponse represents a view-object of token
type TokenInfoResponseSlice ¶
type TokenInfoResponseSlice []*TokenInfoResponse
TokenInfoResponseSlice represents the slice data structure of TokenInfoResponse
func (TokenInfoResponseSlice) Len ¶
func (a TokenInfoResponseSlice) Len() int
Len returns the count of items
func (TokenInfoResponseSlice) Less ¶
func (a TokenInfoResponseSlice) Less(i, j int) bool
Less reports whether the first item is less than the second one
func (TokenInfoResponseSlice) Swap ¶
func (a TokenInfoResponseSlice) Swap(i, j int)
Swap swaps two items
type TokenRecord ¶
type TokenRecord struct { Uid int64 `xorm:"PK INDEX(IDX_token_record_uid_type_expired_time) INDEX(IDX_token_record_expired_time)"` UserTokenId int64 `xorm:"PK"` TokenType core.TokenType `xorm:"INDEX(IDX_token_record_uid_type_expired_time) TINYINT NOT NULL"` Secret string `xorm:"VARCHAR(10) NOT NULL"` UserAgent string `xorm:"VARCHAR(255)"` CreatedUnixTime int64 `xorm:"PK"` ExpiredUnixTime int64 `xorm:"INDEX(IDX_token_record_uid_type_expired_time) INDEX(IDX_token_record_expired_time)"` LastSeenUnixTime int64 }
TokenRecord represents token data stored in database
type TokenRefreshResponse ¶
type TokenRefreshResponse struct { NewToken string `json:"newToken,omitempty"` OldTokenId string `json:"oldTokenId,omitempty"` User *UserBasicInfo `json:"user"` NotificationContent string `json:"notificationContent,omitempty"` }
TokenRefreshResponse represents all parameters of token refreshing request
type TokenRevokeRequest ¶
type TokenRevokeRequest struct {
TokenId string `json:"tokenId" binding:"required,notBlank"`
}
TokenRevokeRequest represents all parameters of token revoking request
type Transaction ¶
type Transaction struct { TransactionId int64 `xorm:"PK"` Uid int64 `` /* 351-byte string literal not displayed */ Deleted bool `` /* 318-byte string literal not displayed */ Type TransactionDbType `xorm:"INDEX(IDX_transaction_uid_deleted_type_time) INDEX(IDX_transaction_uid_deleted_type_account_id_time) NOT NULL"` CategoryId int64 `xorm:"INDEX(IDX_transaction_uid_deleted_category_id_time) NOT NULL"` AccountId int64 `xorm:"INDEX(IDX_transaction_uid_deleted_account_id_time) INDEX(IDX_transaction_uid_deleted_type_account_id_time) NOT NULL"` TransactionTime int64 `` /* 292-byte string literal not displayed */ TimezoneUtcOffset int16 `xorm:"NOT NULL"` Amount int64 `xorm:"NOT NULL"` RelatedId int64 `xorm:"NOT NULL"` RelatedAccountId int64 `xorm:"NOT NULL"` RelatedAccountAmount int64 `xorm:"NOT NULL"` HideAmount bool `xorm:"NOT NULL"` Comment string `xorm:"VARCHAR(255) NOT NULL"` GeoLongitude float64 `xorm:"INDEX(IDX_transaction_uid_deleted_time_longitude_latitude)"` GeoLatitude float64 `xorm:"INDEX(IDX_transaction_uid_deleted_time_longitude_latitude)"` CreatedIp string `xorm:"VARCHAR(39)"` ScheduledCreated bool CreatedUnixTime int64 UpdatedUnixTime int64 DeletedUnixTime int64 }
Transaction represents transaction data stored in database
func (*Transaction) IsEditable ¶
func (t *Transaction) IsEditable(currentUser *User, utcOffset int16, account *Account, relatedAccount *Account) bool
IsEditable returns whether this transaction can be edited
func (*Transaction) ToTransactionInfoResponse ¶
func (t *Transaction) ToTransactionInfoResponse(tagIds []int64, editable bool) *TransactionInfoResponse
ToTransactionInfoResponse returns a view-object according to database model
type TransactionAmountsRequest ¶
type TransactionAmountsRequest struct { Query string `form:"query"` UseTransactionTimezone bool `form:"use_transaction_timezone"` }
TransactionAmountsRequest represents all parameters of transaction amounts request
func (*TransactionAmountsRequest) GetTransactionAmountsRequestItems ¶
func (t *TransactionAmountsRequest) GetTransactionAmountsRequestItems() ([]*TransactionAmountsRequestItem, error)
GetTransactionAmountsRequestItems returns request items by query parameters
type TransactionAmountsRequestItem ¶
TransactionAmountsRequestItem represents an item of transaction amounts request
type TransactionAmountsResponseItem ¶
type TransactionAmountsResponseItem struct { StartTime int64 `json:"startTime"` EndTime int64 `json:"endTime"` Amounts []*TransactionAmountsResponseItemAmountInfo `json:"amounts"` }
TransactionAmountsResponseItem represents an item of transaction amounts
type TransactionAmountsResponseItemAmountInfo ¶
type TransactionAmountsResponseItemAmountInfo struct { Currency string `json:"currency"` IncomeAmount int64 `json:"incomeAmount"` ExpenseAmount int64 `json:"expenseAmount"` }
TransactionAmountsResponseItemAmountInfo represents amount info for a response item
type TransactionAmountsResponseItemAmountInfoSlice ¶ added in v0.4.0
type TransactionAmountsResponseItemAmountInfoSlice []*TransactionAmountsResponseItemAmountInfo
TransactionAmountsResponseItemAmountInfoSlice represents the slice data structure of TransactionAmountsResponseItemAmountInfo
func (TransactionAmountsResponseItemAmountInfoSlice) Len ¶ added in v0.4.0
func (s TransactionAmountsResponseItemAmountInfoSlice) Len() int
Len returns the count of items
func (TransactionAmountsResponseItemAmountInfoSlice) Less ¶ added in v0.4.0
func (s TransactionAmountsResponseItemAmountInfoSlice) Less(i, j int) bool
Less reports whether the first item is less than the second one
func (TransactionAmountsResponseItemAmountInfoSlice) Swap ¶ added in v0.4.0
func (s TransactionAmountsResponseItemAmountInfoSlice) Swap(i, j int)
Swap swaps two items
type TransactionCategory ¶
type TransactionCategory struct { CategoryId int64 `xorm:"PK"` Uid int64 `xorm:"INDEX(IDX_category_uid_deleted_type_parent_category_id_order) NOT NULL"` Deleted bool `xorm:"INDEX(IDX_category_uid_deleted_type_parent_category_id_order) NOT NULL"` Type TransactionCategoryType `xorm:"INDEX(IDX_category_uid_deleted_type_parent_category_id_order) NOT NULL"` ParentCategoryId int64 `xorm:"INDEX(IDX_category_uid_deleted_type_parent_category_id_order) NOT NULL"` Name string `xorm:"VARCHAR(64) NOT NULL"` DisplayOrder int32 `xorm:"INDEX(IDX_category_uid_deleted_type_parent_category_id_order) NOT NULL"` Icon int64 `xorm:"NOT NULL"` Color string `xorm:"VARCHAR(6) NOT NULL"` Hidden bool `xorm:"NOT NULL"` Comment string `xorm:"VARCHAR(255) NOT NULL"` CreatedUnixTime int64 UpdatedUnixTime int64 DeletedUnixTime int64 }
TransactionCategory represents transaction category data stored in database
func (*TransactionCategory) ToTransactionCategoryInfoResponse ¶
func (c *TransactionCategory) ToTransactionCategoryInfoResponse() *TransactionCategoryInfoResponse
ToTransactionCategoryInfoResponse returns a view-object according to database model
type TransactionCategoryCreateBatchRequest ¶
type TransactionCategoryCreateBatchRequest struct {
Categories []*TransactionCategoryCreateWithSubCategories `json:"categories" binding:"required"`
}
TransactionCategoryCreateBatchRequest represents all parameters of transaction category batch creation request
type TransactionCategoryCreateRequest ¶
type TransactionCategoryCreateRequest struct { Name string `json:"name" binding:"required,notBlank,max=64"` Type TransactionCategoryType `json:"type" binding:"required"` ParentId int64 `json:"parentId,string" binding:"min=0"` Icon int64 `json:"icon,string" binding:"min=1"` Color string `json:"color" binding:"required,len=6,validHexRGBColor"` Comment string `json:"comment" binding:"max=255"` ClientSessionId string `json:"clientSessionId"` }
TransactionCategoryCreateRequest represents all parameters of single transaction category creation request
type TransactionCategoryCreateWithSubCategories ¶
type TransactionCategoryCreateWithSubCategories struct { Name string `json:"name" binding:"required,notBlank,max=64"` Type TransactionCategoryType `json:"type" binding:"required"` Icon int64 `json:"icon,string" binding:"min=1"` Color string `json:"color" binding:"required,len=6,validHexRGBColor"` Comment string `json:"comment" binding:"max=255"` SubCategories []*TransactionCategoryCreateRequest `json:"subCategories" binding:"required"` }
TransactionCategoryCreateWithSubCategories represents all parameters of multi transaction categories creation request
type TransactionCategoryDeleteRequest ¶
type TransactionCategoryDeleteRequest struct {
Id int64 `json:"id,string" binding:"required,min=1"`
}
TransactionCategoryDeleteRequest represents all parameters of transaction category deleting request
type TransactionCategoryGetRequest ¶
type TransactionCategoryGetRequest struct {
Id int64 `form:"id,string" binding:"required,min=1"`
}
TransactionCategoryGetRequest represents all parameters of transaction category getting request
type TransactionCategoryHideRequest ¶
type TransactionCategoryHideRequest struct { Id int64 `json:"id,string" binding:"required,min=1"` Hidden bool `json:"hidden"` }
TransactionCategoryHideRequest represents all parameters of transaction category hiding request
type TransactionCategoryInfoResponse ¶
type TransactionCategoryInfoResponse struct { Id int64 `json:"id,string"` Name string `json:"name"` ParentId int64 `json:"parentId,string"` Type TransactionCategoryType `json:"type"` Icon int64 `json:"icon,string"` Color string `json:"color"` Comment string `json:"comment"` DisplayOrder int32 `json:"displayOrder"` Hidden bool `json:"hidden"` SubCategories TransactionCategoryInfoResponseSlice `json:"subCategories,omitempty"` }
TransactionCategoryInfoResponse represents a view-object of transaction category
type TransactionCategoryInfoResponseSlice ¶
type TransactionCategoryInfoResponseSlice []*TransactionCategoryInfoResponse
TransactionCategoryInfoResponseSlice represents the slice data structure of TransactionCategoryInfoResponse
func (TransactionCategoryInfoResponseSlice) Len ¶
func (s TransactionCategoryInfoResponseSlice) Len() int
Len returns the count of items
func (TransactionCategoryInfoResponseSlice) Less ¶
func (s TransactionCategoryInfoResponseSlice) Less(i, j int) bool
Less reports whether the first item is less than the second one
func (TransactionCategoryInfoResponseSlice) Swap ¶
func (s TransactionCategoryInfoResponseSlice) Swap(i, j int)
Swap swaps two items
type TransactionCategoryListRequest ¶
type TransactionCategoryListRequest struct { Type TransactionCategoryType `form:"type" binding:"min=0"` ParentId int64 `form:"parent_id,string,default=-1" binding:"min=-1"` }
TransactionCategoryListRequest represents all parameters of transaction category listing request
type TransactionCategoryModifyRequest ¶
type TransactionCategoryModifyRequest struct { Id int64 `json:"id,string" binding:"required,min=1"` Name string `json:"name" binding:"required,notBlank,max=64"` ParentId int64 `json:"parentId,string" binding:"min=0"` Icon int64 `json:"icon,string" binding:"min=1"` Color string `json:"color" binding:"required,len=6,validHexRGBColor"` Comment string `json:"comment" binding:"max=255"` Hidden bool `json:"hidden"` }
TransactionCategoryModifyRequest represents all parameters of transaction category modification request
type TransactionCategoryMoveRequest ¶
type TransactionCategoryMoveRequest struct {
NewDisplayOrders []*TransactionCategoryNewDisplayOrderRequest `json:"newDisplayOrders" binding:"required,min=1"`
}
TransactionCategoryMoveRequest represents all parameters of transaction category moving request
type TransactionCategoryNewDisplayOrderRequest ¶
type TransactionCategoryNewDisplayOrderRequest struct { Id int64 `json:"id,string" binding:"required,min=1"` DisplayOrder int32 `json:"displayOrder"` }
TransactionCategoryNewDisplayOrderRequest represents a data pair of id and display order
type TransactionCategoryType ¶
type TransactionCategoryType byte
TransactionCategoryType represents transaction category type
const ( CATEGORY_TYPE_INCOME TransactionCategoryType = 1 CATEGORY_TYPE_EXPENSE TransactionCategoryType = 2 CATEGORY_TYPE_TRANSFER TransactionCategoryType = 3 )
Transaction category types
type TransactionCountRequest ¶
type TransactionCountRequest struct { Type TransactionDbType `form:"type" binding:"min=0,max=4"` CategoryIds string `form:"category_ids"` AccountIds string `form:"account_ids"` TagIds string `form:"tag_ids"` TagFilterType TransactionTagFilterType `form:"tag_filter_type" binding:"min=0,max=3"` AmountFilter string `form:"amount_filter" binding:"validAmountFilter"` Keyword string `form:"keyword"` MaxTime int64 `form:"max_time" binding:"min=0"` MinTime int64 `form:"min_time" binding:"min=0"` }
TransactionCountRequest represents transaction count request
type TransactionCountResponse ¶
type TransactionCountResponse struct {
TotalCount int64 `json:"totalCount"`
}
TransactionCountResponse represents transaction count response
type TransactionCreateRequest ¶
type TransactionCreateRequest struct { Type TransactionType `json:"type" binding:"required"` CategoryId int64 `json:"categoryId,string"` Time int64 `json:"time" binding:"required,min=1"` UtcOffset int16 `json:"utcOffset" binding:"min=-720,max=840"` SourceAccountId int64 `json:"sourceAccountId,string" binding:"required,min=1"` DestinationAccountId int64 `json:"destinationAccountId,string" binding:"min=0"` SourceAmount int64 `json:"sourceAmount" binding:"min=-99999999999,max=99999999999"` DestinationAmount int64 `json:"destinationAmount" binding:"min=-99999999999,max=99999999999"` HideAmount bool `json:"hideAmount"` TagIds []string `json:"tagIds"` PictureIds []string `json:"pictureIds"` Comment string `json:"comment" binding:"max=255"` GeoLocation *TransactionGeoLocationRequest `json:"geoLocation" binding:"omitempty"` ClientSessionId string `json:"clientSessionId"` }
TransactionCreateRequest represents all parameters of transaction creation request
type TransactionDbType ¶
type TransactionDbType byte
TransactionDbType represents transaction type in database
const ( TRANSACTION_DB_TYPE_MODIFY_BALANCE TransactionDbType = 1 TRANSACTION_DB_TYPE_INCOME TransactionDbType = 2 TRANSACTION_DB_TYPE_EXPENSE TransactionDbType = 3 TRANSACTION_DB_TYPE_TRANSFER_OUT TransactionDbType = 4 TRANSACTION_DB_TYPE_TRANSFER_IN TransactionDbType = 5 )
Transaction db types
func (TransactionDbType) String ¶ added in v0.6.0
func (s TransactionDbType) String() string
String returns a textual representation of the transaction types for db enum
func (TransactionDbType) ToTransactionType ¶ added in v0.6.0
func (s TransactionDbType) ToTransactionType() (TransactionType, error)
ToTransactionType returns the transaction type for this db enum
type TransactionDeleteRequest ¶
type TransactionDeleteRequest struct {
Id int64 `json:"id,string" binding:"required,min=1"`
}
TransactionDeleteRequest represents all parameters of transaction deleting request
type TransactionEditScope ¶
type TransactionEditScope byte
TransactionEditScope represents the scope which transaction can be edited
const ( TRANSACTION_EDIT_SCOPE_NONE TransactionEditScope = 0 TRANSACTION_EDIT_SCOPE_ALL TransactionEditScope = 1 TRANSACTION_EDIT_SCOPE_TODAY_OR_LATER TransactionEditScope = 2 TRANSACTION_EDIT_SCOPE_LAST_24H_OR_LATER TransactionEditScope = 3 TRANSACTION_EDIT_SCOPE_THIS_WEEK_OR_LATER TransactionEditScope = 4 TRANSACTION_EDIT_SCOPE_THIS_MONTH_OR_LATER TransactionEditScope = 5 TRANSACTION_EDIT_SCOPE_THIS_YEAR_OR_LATER TransactionEditScope = 6 TRANSACTION_EDIT_SCOPE_INVALID TransactionEditScope = 255 )
Editable Transaction Ranges
func (TransactionEditScope) String ¶
func (s TransactionEditScope) String() string
String returns a textual representation of the editable transaction ranges enum
type TransactionGeoLocationRequest ¶ added in v0.3.0
type TransactionGeoLocationRequest struct { Latitude float64 `json:"latitude" binding:"required"` Longitude float64 `json:"longitude" binding:"required"` }
TransactionGeoLocationRequest represents all parameters of transaction geographic location info update request
type TransactionGeoLocationResponse ¶ added in v0.3.0
type TransactionGeoLocationResponse struct { Latitude float64 `json:"latitude"` Longitude float64 `json:"longitude"` }
TransactionGeoLocationResponse represents a view-object of transaction geographic location info
type TransactionGetRequest ¶
type TransactionGetRequest struct { Id int64 `form:"id,string" binding:"required,min=1"` WithPictures bool `form:"with_pictures"` TrimAccount bool `form:"trim_account"` TrimCategory bool `form:"trim_category"` TrimTag bool `form:"trim_tag"` }
TransactionGetRequest represents all parameters of transaction getting request
type TransactionImportRequest ¶ added in v0.6.0
type TransactionImportRequest struct { Transactions []*TransactionCreateRequest `json:"transactions"` ClientSessionId string `json:"clientSessionId"` }
TransactionImportRequest represents all parameters of transaction import request
type TransactionInfoPageWrapperResponse ¶
type TransactionInfoPageWrapperResponse struct { Items TransactionInfoResponseSlice `json:"items"` NextTimeSequenceId *int64 `json:"nextTimeSequenceId,string"` TotalCount *int64 `json:"totalCount,omitempty"` }
TransactionInfoPageWrapperResponse represents a response of transaction which contains items and next id
type TransactionInfoPageWrapperResponse2 ¶
type TransactionInfoPageWrapperResponse2 struct { Items TransactionInfoResponseSlice `json:"items"` TotalCount int64 `json:"totalCount"` }
TransactionInfoPageWrapperResponse2 represents a response of transaction which contains items and count
type TransactionInfoResponse ¶
type TransactionInfoResponse struct { Id int64 `json:"id,string"` TimeSequenceId int64 `json:"timeSequenceId,string"` Type TransactionType `json:"type"` CategoryId int64 `json:"categoryId,string"` Category *TransactionCategoryInfoResponse `json:"category,omitempty"` Time int64 `json:"time"` UtcOffset int16 `json:"utcOffset"` SourceAccountId int64 `json:"sourceAccountId,string"` SourceAccount *AccountInfoResponse `json:"sourceAccount,omitempty"` DestinationAccountId int64 `json:"destinationAccountId,string,omitempty"` DestinationAccount *AccountInfoResponse `json:"destinationAccount,omitempty"` SourceAmount int64 `json:"sourceAmount"` DestinationAmount int64 `json:"destinationAmount,omitempty"` HideAmount bool `json:"hideAmount"` TagIds []string `json:"tagIds"` Tags []*TransactionTagInfoResponse `json:"tags,omitempty"` Pictures TransactionPictureInfoBasicResponseSlice `json:"pictures,omitempty"` Comment string `json:"comment"` GeoLocation *TransactionGeoLocationResponse `json:"geoLocation,omitempty"` Editable bool `json:"editable"` }
TransactionInfoResponse represents a view-object of transaction
type TransactionInfoResponseSlice ¶
type TransactionInfoResponseSlice []*TransactionInfoResponse
TransactionInfoResponseSlice represents the slice data structure of TransactionInfoResponse
func (TransactionInfoResponseSlice) Len ¶
func (s TransactionInfoResponseSlice) Len() int
Len returns the count of items
func (TransactionInfoResponseSlice) Less ¶
func (s TransactionInfoResponseSlice) Less(i, j int) bool
Less reports whether the first item is less than the second one
func (TransactionInfoResponseSlice) Swap ¶
func (s TransactionInfoResponseSlice) Swap(i, j int)
Swap swaps two items
type TransactionListByMaxTimeRequest ¶
type TransactionListByMaxTimeRequest struct { Type TransactionDbType `form:"type" binding:"min=0,max=4"` CategoryIds string `form:"category_ids"` AccountIds string `form:"account_ids"` TagIds string `form:"tag_ids"` TagFilterType TransactionTagFilterType `form:"tag_filter_type" binding:"min=0,max=3"` AmountFilter string `form:"amount_filter" binding:"validAmountFilter"` Keyword string `form:"keyword"` MaxTime int64 `form:"max_time" binding:"min=0"` MinTime int64 `form:"min_time" binding:"min=0"` Page int32 `form:"page" binding:"min=0"` Count int32 `form:"count" binding:"required,min=1,max=50"` WithCount bool `form:"with_count"` WithPictures bool `form:"with_pictures"` TrimAccount bool `form:"trim_account"` TrimCategory bool `form:"trim_category"` TrimTag bool `form:"trim_tag"` }
TransactionListByMaxTimeRequest represents all parameters of transaction listing by max time request
type TransactionListInMonthByPageRequest ¶
type TransactionListInMonthByPageRequest struct { Year int32 `form:"year" binding:"required,min=1"` Month int32 `form:"month" binding:"required,min=1"` Type TransactionDbType `form:"type" binding:"min=0,max=4"` CategoryIds string `form:"category_ids"` AccountIds string `form:"account_ids"` TagIds string `form:"tag_ids"` TagFilterType TransactionTagFilterType `form:"tag_filter_type" binding:"min=0,max=3"` AmountFilter string `form:"amount_filter" binding:"validAmountFilter"` Keyword string `form:"keyword"` WithPictures bool `form:"with_pictures"` TrimAccount bool `form:"trim_account"` TrimCategory bool `form:"trim_category"` TrimTag bool `form:"trim_tag"` }
TransactionListInMonthByPageRequest represents all parameters of transaction listing by month request
type TransactionModifyRequest ¶
type TransactionModifyRequest struct { Id int64 `json:"id,string" binding:"required,min=1"` CategoryId int64 `json:"categoryId,string"` Time int64 `json:"time" binding:"required,min=1"` UtcOffset int16 `json:"utcOffset" binding:"min=-720,max=840"` SourceAccountId int64 `json:"sourceAccountId,string" binding:"required,min=1"` DestinationAccountId int64 `json:"destinationAccountId,string" binding:"min=0"` SourceAmount int64 `json:"sourceAmount" binding:"min=-99999999999,max=99999999999"` DestinationAmount int64 `json:"destinationAmount" binding:"min=-99999999999,max=99999999999"` HideAmount bool `json:"hideAmount"` TagIds []string `json:"tagIds"` PictureIds []string `json:"pictureIds"` Comment string `json:"comment" binding:"max=255"` GeoLocation *TransactionGeoLocationRequest `json:"geoLocation" binding:"omitempty"` }
TransactionModifyRequest represents all parameters of transaction modification request
type TransactionMonthAmountsResponseItem ¶
type TransactionMonthAmountsResponseItem struct { Year int32 `json:"year"` Month int32 `json:"month"` Amounts []*TransactionAmountsResponseItemAmountInfo `json:"amounts"` }
TransactionMonthAmountsResponseItem represents an item of transaction month amounts
type TransactionPictureInfo ¶ added in v0.6.0
type TransactionPictureInfo struct { Uid int64 `` /* 138-byte string literal not displayed */ Deleted bool `` /* 138-byte string literal not displayed */ TransactionId int64 `xorm:"INDEX(IDX_transaction_picture_uid_deleted_transaction_id_picture_id) NOT NULL"` PictureId int64 `` /* 132-byte string literal not displayed */ PictureExtension string `xorm:"VARCHAR(10) NOT NULL"` CreatedIp string `xorm:"VARCHAR(39)"` CreatedUnixTime int64 UpdatedUnixTime int64 DeletedUnixTime int64 }
TransactionPictureInfo represents transaction picture file info stored in database
func (*TransactionPictureInfo) ToTransactionPictureInfoBasicResponse ¶ added in v0.6.0
func (p *TransactionPictureInfo) ToTransactionPictureInfoBasicResponse(originalUrl string) *TransactionPictureInfoBasicResponse
ToTransactionPictureInfoBasicResponse returns a view-object according to database model
type TransactionPictureInfoBasicResponse ¶ added in v0.6.0
type TransactionPictureInfoBasicResponse struct { PictureId int64 `json:"pictureId,string"` OriginalUrl string `json:"originalUrl"` }
TransactionPictureInfoBasicResponse represents a view-object of transaction picture basic info
type TransactionPictureInfoBasicResponseSlice ¶ added in v0.6.0
type TransactionPictureInfoBasicResponseSlice []*TransactionPictureInfoBasicResponse
TransactionPictureInfoBasicResponseSlice represents the slice data structure of TransactionPictureInfoBasicResponse
func (TransactionPictureInfoBasicResponseSlice) Len ¶ added in v0.6.0
func (s TransactionPictureInfoBasicResponseSlice) Len() int
Len returns the count of items
func (TransactionPictureInfoBasicResponseSlice) Less ¶ added in v0.6.0
func (s TransactionPictureInfoBasicResponseSlice) Less(i, j int) bool
Less reports whether the first item is less than the second one
func (TransactionPictureInfoBasicResponseSlice) Swap ¶ added in v0.6.0
func (s TransactionPictureInfoBasicResponseSlice) Swap(i, j int)
Swap swaps two items
type TransactionPictureUnusedDeleteRequest ¶ added in v0.6.0
type TransactionPictureUnusedDeleteRequest struct {
Id int64 `json:"id,string" binding:"required,min=1"`
}
TransactionPictureUnusedDeleteRequest represents all parameters of unused transaction picture deleting request
type TransactionScheduleFrequencyType ¶ added in v0.6.0
type TransactionScheduleFrequencyType byte
TransactionScheduleFrequencyType represents transaction template schedule frequency type
const ( TRANSACTION_SCHEDULE_FREQUENCY_TYPE_DISABLED TransactionScheduleFrequencyType = 0 TRANSACTION_SCHEDULE_FREQUENCY_TYPE_WEEKLY TransactionScheduleFrequencyType = 1 TRANSACTION_SCHEDULE_FREQUENCY_TYPE_MONTHLY TransactionScheduleFrequencyType = 2 )
Transaction template schedule frequency types
type TransactionStatisticRequest ¶
type TransactionStatisticRequest struct { StartTime int64 `form:"start_time" binding:"min=0"` EndTime int64 `form:"end_time" binding:"min=0"` TagIds string `form:"tag_ids"` TagFilterType TransactionTagFilterType `form:"tag_filter_type" binding:"min=0,max=3"` UseTransactionTimezone bool `form:"use_transaction_timezone"` }
TransactionStatisticRequest represents all parameters of transaction statistic request
type TransactionStatisticResponse ¶
type TransactionStatisticResponse struct { StartTime int64 `json:"startTime"` EndTime int64 `json:"endTime"` Items []*TransactionStatisticResponseItem `json:"items"` }
TransactionStatisticResponse represents transaction statistic response
type TransactionStatisticResponseItem ¶
type TransactionStatisticResponseItem struct { CategoryId int64 `json:"categoryId,string"` AccountId int64 `json:"accountId,string"` TotalAmount int64 `json:"amount"` }
TransactionStatisticResponseItem represents total amount item for a response
type TransactionStatisticTrendsRequest ¶ added in v0.5.0
type TransactionStatisticTrendsRequest struct { YearMonthRangeRequest TagIds string `form:"tag_ids"` TagFilterType TransactionTagFilterType `form:"tag_filter_type" binding:"min=0,max=3"` UseTransactionTimezone bool `form:"use_transaction_timezone"` }
TransactionStatisticTrendsRequest represents all parameters of transaction statistic trends request
type TransactionStatisticTrendsResponseItem ¶ added in v0.8.0
type TransactionStatisticTrendsResponseItem struct { Year int32 `json:"year"` Month int32 `json:"month"` Items []*TransactionStatisticResponseItem `json:"items"` }
TransactionStatisticTrendsResponseItem represents the data within each statistic interval
type TransactionStatisticTrendsResponseItemSlice ¶ added in v0.8.0
type TransactionStatisticTrendsResponseItemSlice []*TransactionStatisticTrendsResponseItem
TransactionStatisticTrendsResponseItemSlice represents the slice data structure of TransactionStatisticTrendsResponseItem
func (TransactionStatisticTrendsResponseItemSlice) Len ¶ added in v0.8.0
func (s TransactionStatisticTrendsResponseItemSlice) Len() int
Len returns the count of items
func (TransactionStatisticTrendsResponseItemSlice) Less ¶ added in v0.8.0
func (s TransactionStatisticTrendsResponseItemSlice) Less(i, j int) bool
Less reports whether the first item is less than the second one
func (TransactionStatisticTrendsResponseItemSlice) Swap ¶ added in v0.8.0
func (s TransactionStatisticTrendsResponseItemSlice) Swap(i, j int)
Swap swaps two items
type TransactionTag ¶
type TransactionTag struct { TagId int64 `xorm:"PK"` Uid int64 `xorm:"INDEX(IDX_tag_uid_deleted_order) NOT NULL"` Deleted bool `xorm:"INDEX(IDX_tag_uid_deleted_order) NOT NULL"` Name string `xorm:"VARCHAR(64) NOT NULL"` DisplayOrder int32 `xorm:"INDEX(IDX_tag_uid_deleted_order) NOT NULL"` Hidden bool `xorm:"NOT NULL"` CreatedUnixTime int64 UpdatedUnixTime int64 DeletedUnixTime int64 }
TransactionTag represents transaction tag data stored in database
func (*TransactionTag) ToTransactionTagInfoResponse ¶
func (t *TransactionTag) ToTransactionTagInfoResponse() *TransactionTagInfoResponse
ToTransactionTagInfoResponse returns a view-object according to database model
type TransactionTagCreateRequest ¶
type TransactionTagCreateRequest struct {
Name string `json:"name" binding:"required,notBlank,max=64"`
}
TransactionTagCreateRequest represents all parameters of transaction tag creation request
type TransactionTagDeleteRequest ¶
type TransactionTagDeleteRequest struct {
Id int64 `json:"id,string" binding:"required,min=1"`
}
TransactionTagDeleteRequest represents all parameters of transaction tag deleting request
type TransactionTagFilterType ¶ added in v0.7.0
type TransactionTagFilterType byte
TransactionTagFilterType represents transaction tag filter type
const ( TRANSACTION_TAG_FILTER_HAS_ANY TransactionTagFilterType = 0 TRANSACTION_TAG_FILTER_HAS_ALL TransactionTagFilterType = 1 TRANSACTION_TAG_FILTER_NOT_HAS_ANY TransactionTagFilterType = 2 TRANSACTION_TAG_FILTER_NOT_HAS_ALL TransactionTagFilterType = 3 )
Transaction tag filter types
type TransactionTagGetRequest ¶
type TransactionTagGetRequest struct {
Id int64 `form:"id,string" binding:"required,min=1"`
}
TransactionTagGetRequest represents all parameters of transaction tag getting request
type TransactionTagHideRequest ¶
type TransactionTagHideRequest struct { Id int64 `json:"id,string" binding:"required,min=1"` Hidden bool `json:"hidden"` }
TransactionTagHideRequest represents all parameters of transaction tag hiding request
type TransactionTagIndex ¶
type TransactionTagIndex struct { TagIndexId int64 `xorm:"PK"` Uid int64 `` /* 202-byte string literal not displayed */ Deleted bool `` /* 211-byte string literal not displayed */ TransactionTime int64 `xorm:"INDEX(IDX_transaction_tag_index_uid_deleted_transaction_time_tag_id) NOT NULL"` TagId int64 `` /* 142-byte string literal not displayed */ TransactionId int64 `` /* 133-byte string literal not displayed */ CreatedUnixTime int64 UpdatedUnixTime int64 DeletedUnixTime int64 }
TransactionTagIndex represents transaction and transaction tag relation stored in database
type TransactionTagInfoResponse ¶
type TransactionTagInfoResponse struct { Id int64 `json:"id,string"` Name string `json:"name"` DisplayOrder int32 `json:"displayOrder"` Hidden bool `json:"hidden"` }
TransactionTagInfoResponse represents a view-object of transaction tag
type TransactionTagInfoResponseSlice ¶
type TransactionTagInfoResponseSlice []*TransactionTagInfoResponse
TransactionTagInfoResponseSlice represents the slice data structure of TransactionTagInfoResponse
func (TransactionTagInfoResponseSlice) Len ¶
func (s TransactionTagInfoResponseSlice) Len() int
Len returns the count of items
func (TransactionTagInfoResponseSlice) Less ¶
func (s TransactionTagInfoResponseSlice) Less(i, j int) bool
Less reports whether the first item is less than the second one
func (TransactionTagInfoResponseSlice) Swap ¶
func (s TransactionTagInfoResponseSlice) Swap(i, j int)
Swap swaps two items
type TransactionTagModifyRequest ¶
type TransactionTagModifyRequest struct { Id int64 `json:"id,string" binding:"required,min=1"` Name string `json:"name" binding:"required,notBlank,max=64"` }
TransactionTagModifyRequest represents all parameters of transaction tag modification request
type TransactionTagMoveRequest ¶
type TransactionTagMoveRequest struct {
NewDisplayOrders []*TransactionTagNewDisplayOrderRequest `json:"newDisplayOrders" binding:"required,min=1"`
}
TransactionTagMoveRequest represents all parameters of transaction tag moving request
type TransactionTagNewDisplayOrderRequest ¶
type TransactionTagNewDisplayOrderRequest struct { Id int64 `json:"id,string" binding:"required,min=1"` DisplayOrder int32 `json:"displayOrder"` }
TransactionTagNewDisplayOrderRequest represents a data pair of id and display order
type TransactionTemplate ¶ added in v0.5.0
type TransactionTemplate struct { TemplateId int64 `xorm:"PK"` Uid int64 `xorm:"INDEX(IDX_transaction_template_uid_deleted_template_type_order) NOT NULL"` Deleted bool `` /* 148-byte string literal not displayed */ TemplateType TransactionTemplateType `` /* 148-byte string literal not displayed */ Name string `xorm:"VARCHAR(64) NOT NULL"` Type TransactionType `xorm:"NOT NULL"` CategoryId int64 `xorm:"NOT NULL"` AccountId int64 `xorm:"NOT NULL"` ScheduledFrequencyType TransactionScheduleFrequencyType `xorm:"INDEX(IDX_transaction_template_deleted_type_freqtype_scheduled_time)"` ScheduledFrequency string `xorm:"VARCHAR(100)"` ScheduledStartTime *int64 `xorm:"INDEX(IDX_transaction_template_deleted_type_freqtype_scheduled_time)"` ScheduledEndTime *int64 `xorm:"INDEX(IDX_transaction_template_deleted_type_freqtype_scheduled_time)"` ScheduledAt int16 `xorm:"INDEX(IDX_transaction_template_deleted_type_freqtype_scheduled_time)"` ScheduledTimezoneUtcOffset int16 TagIds string `xorm:"VARCHAR(255) NOT NULL"` Amount int64 `xorm:"NOT NULL"` RelatedAccountId int64 `xorm:"NOT NULL"` RelatedAccountAmount int64 `xorm:"NOT NULL"` HideAmount bool `xorm:"NOT NULL"` Comment string `xorm:"VARCHAR(255) NOT NULL"` DisplayOrder int32 `xorm:"INDEX(IDX_transaction_template_uid_deleted_template_type_order) NOT NULL"` Hidden bool `xorm:"NOT NULL"` CreatedUnixTime int64 UpdatedUnixTime int64 DeletedUnixTime int64 }
TransactionTemplate represents transaction template stored in database
func (*TransactionTemplate) GetTagIds ¶ added in v0.6.0
func (t *TransactionTemplate) GetTagIds() []int64
GetTagIds returns all tag ids of the transaction template
func (*TransactionTemplate) ToTransactionTemplateInfoResponse ¶ added in v0.5.0
func (t *TransactionTemplate) ToTransactionTemplateInfoResponse(serverUtcOffset int16) *TransactionTemplateInfoResponse
ToTransactionTemplateInfoResponse returns a view-object according to database model
type TransactionTemplateCreateRequest ¶ added in v0.5.0
type TransactionTemplateCreateRequest struct { TemplateType TransactionTemplateType `json:"templateType"` Name string `json:"name" binding:"required,notBlank,max=64"` Type TransactionType `json:"type" binding:"required"` CategoryId int64 `json:"categoryId,string" binding:"required,min=1"` SourceAccountId int64 `json:"sourceAccountId,string" binding:"required,min=1"` DestinationAccountId int64 `json:"destinationAccountId,string" binding:"min=0"` SourceAmount int64 `json:"sourceAmount" binding:"min=-99999999999,max=99999999999"` DestinationAmount int64 `json:"destinationAmount" binding:"min=-99999999999,max=99999999999"` HideAmount bool `json:"hideAmount"` TagIds []string `json:"tagIds"` Comment string `json:"comment" binding:"max=255"` ScheduledFrequencyType *TransactionScheduleFrequencyType `json:"scheduledFrequencyType" binding:"omitempty"` ScheduledFrequency *string `json:"scheduledFrequency" binding:"omitempty"` ScheduledStartDate *string `json:"scheduledStartDate" binding:"omitempty"` ScheduledEndDate *string `json:"scheduledEndDate" binding:"omitempty"` ScheduledTimezoneUtcOffset *int16 `json:"utcOffset" binding:"omitempty,min=-720,max=840"` ClientSessionId string `json:"clientSessionId"` }
TransactionTemplateCreateRequest represents all parameters of transaction template creation request
type TransactionTemplateDeleteRequest ¶ added in v0.5.0
type TransactionTemplateDeleteRequest struct {
Id int64 `json:"id,string" binding:"required,min=1"`
}
TransactionTemplateDeleteRequest represents all parameters of transaction template deleting request
type TransactionTemplateGetRequest ¶ added in v0.5.0
type TransactionTemplateGetRequest struct {
Id int64 `form:"id,string" binding:"required,min=1"`
}
TransactionTemplateGetRequest represents all parameters of transaction template getting request
type TransactionTemplateHideRequest ¶ added in v0.5.0
type TransactionTemplateHideRequest struct { Id int64 `json:"id,string" binding:"required,min=1"` Hidden bool `json:"hidden"` }
TransactionTemplateHideRequest represents all parameters of transaction template hiding request
type TransactionTemplateInfoResponse ¶ added in v0.5.0
type TransactionTemplateInfoResponse struct { *TransactionInfoResponse TemplateType TransactionTemplateType `json:"templateType"` Name string `json:"name"` ScheduledFrequencyType *TransactionScheduleFrequencyType `json:"scheduledFrequencyType,omitempty"` ScheduledFrequency *string `json:"scheduledFrequency,omitempty"` ScheduledStartDate *string `json:"scheduledStartDate" binding:"omitempty"` ScheduledEndDate *string `json:"scheduledEndDate" binding:"omitempty"` ScheduledAt *int16 `json:"scheduledAt,omitempty"` DisplayOrder int32 `json:"displayOrder"` Hidden bool `json:"hidden"` }
type TransactionTemplateInfoResponseSlice ¶ added in v0.5.0
type TransactionTemplateInfoResponseSlice []*TransactionTemplateInfoResponse
TransactionTemplateInfoResponseSlice represents the slice data structure of TransactionTemplateInfoResponse
func (TransactionTemplateInfoResponseSlice) Len ¶ added in v0.5.0
func (s TransactionTemplateInfoResponseSlice) Len() int
Len returns the count of items
func (TransactionTemplateInfoResponseSlice) Less ¶ added in v0.5.0
func (s TransactionTemplateInfoResponseSlice) Less(i, j int) bool
Less reports whether the first item is less than the second one
func (TransactionTemplateInfoResponseSlice) Swap ¶ added in v0.5.0
func (s TransactionTemplateInfoResponseSlice) Swap(i, j int)
Swap swaps two items
type TransactionTemplateListRequest ¶ added in v0.5.0
type TransactionTemplateListRequest struct {
TemplateType TransactionTemplateType `form:"templateType"`
}
TransactionTemplateListRequest represents all parameters of transaction template list request
type TransactionTemplateModifyNameRequest ¶ added in v0.5.0
type TransactionTemplateModifyNameRequest struct { Id int64 `json:"id,string" binding:"required,min=1"` Name string `json:"name" binding:"required,notBlank,max=64"` }
TransactionTemplateModifyNameRequest represents all parameters of transaction template name modification request
type TransactionTemplateModifyRequest ¶ added in v0.5.0
type TransactionTemplateModifyRequest struct { Id int64 `json:"id,string" binding:"required,min=1"` Name string `json:"name" binding:"required,notBlank,max=64"` Type TransactionType `json:"type" binding:"required"` CategoryId int64 `json:"categoryId,string" binding:"required,min=1"` SourceAccountId int64 `json:"sourceAccountId,string" binding:"required,min=1"` DestinationAccountId int64 `json:"destinationAccountId,string" binding:"min=0"` SourceAmount int64 `json:"sourceAmount" binding:"min=-99999999999,max=99999999999"` DestinationAmount int64 `json:"destinationAmount" binding:"min=-99999999999,max=99999999999"` HideAmount bool `json:"hideAmount"` TagIds []string `json:"tagIds"` Comment string `json:"comment" binding:"max=255"` ScheduledFrequencyType *TransactionScheduleFrequencyType `json:"scheduledFrequencyType" binding:"omitempty"` ScheduledFrequency *string `json:"scheduledFrequency" binding:"omitempty"` ScheduledStartDate *string `json:"scheduledStartDate" binding:"omitempty"` ScheduledEndDate *string `json:"scheduledEndDate" binding:"omitempty"` ScheduledTimezoneUtcOffset *int16 `json:"utcOffset" binding:"omitempty,min=-720,max=840"` }
TransactionTemplateModifyRequest represents all parameters of transaction template modification request
type TransactionTemplateMoveRequest ¶ added in v0.5.0
type TransactionTemplateMoveRequest struct {
NewDisplayOrders []*TransactionTemplateNewDisplayOrderRequest `json:"newDisplayOrders" binding:"required,min=1"`
}
TransactionTemplateMoveRequest represents all parameters of transaction template moving request
type TransactionTemplateNewDisplayOrderRequest ¶ added in v0.5.0
type TransactionTemplateNewDisplayOrderRequest struct { Id int64 `json:"id,string" binding:"required,min=1"` DisplayOrder int32 `json:"displayOrder"` }
TransactionTemplateNewDisplayOrderRequest represents a data pair of id and display order
type TransactionTemplateType ¶ added in v0.5.0
type TransactionTemplateType byte
TransactionTemplateType represents transaction template type in database
const ( TRANSACTION_TEMPLATE_TYPE_NORMAL TransactionTemplateType = 1 TRANSACTION_TEMPLATE_TYPE_SCHEDULE TransactionTemplateType = 2 )
Transaction template types
type TransactionType ¶
type TransactionType byte
TransactionType represents transaction type
const ( TRANSACTION_TYPE_MODIFY_BALANCE TransactionType = 1 TRANSACTION_TYPE_INCOME TransactionType = 2 TRANSACTION_TYPE_EXPENSE TransactionType = 3 TRANSACTION_TYPE_TRANSFER TransactionType = 4 )
Transaction types
type TwoFactor ¶
type TwoFactor struct { Uid int64 `xorm:"PK"` Secret string `xorm:"VARCHAR(80) NOT NULL"` CreatedUnixTime int64 }
TwoFactor represents user 2fa data stored in database
type TwoFactorDisableRequest ¶
type TwoFactorDisableRequest struct {
Password string `json:"password" binding:"omitempty,min=6,max=128"`
}
TwoFactorDisableRequest represents all parameters of 2fa disabling request
type TwoFactorEnableConfirmRequest ¶
type TwoFactorEnableConfirmRequest struct { Secret string `json:"secret" binding:"required,notBlank,len=32"` Passcode string `json:"passcode" binding:"required,notBlank,len=6"` }
TwoFactorEnableConfirmRequest represents all parameters of 2fa confirm request
type TwoFactorEnableConfirmResponse ¶
type TwoFactorEnableConfirmResponse struct { Token string `json:"token,omitempty"` RecoveryCodes []string `json:"recoveryCodes"` }
TwoFactorEnableConfirmResponse represents all response parameters after user have enabled 2fa
type TwoFactorEnableResponse ¶
TwoFactorEnableResponse represents all response parameters when user requests to enable 2fa
type TwoFactorLoginRequest ¶
type TwoFactorLoginRequest struct {
Passcode string `json:"passcode" binding:"required,notBlank,len=6"`
}
TwoFactorLoginRequest represents all parameters of 2fa login request
type TwoFactorRecoveryCode ¶
type TwoFactorRecoveryCode struct { Uid int64 `xorm:"PK"` RecoveryCode string `xorm:"VARCHAR(64) PK"` Used bool `xorm:"NOT NULL"` CreatedUnixTime int64 UsedUnixTime int64 }
TwoFactorRecoveryCode represents user 2fa recovery codes stored in database
type TwoFactorRecoveryCodeLoginRequest ¶
type TwoFactorRecoveryCodeLoginRequest struct {
RecoveryCode string `json:"recoveryCode" binding:"required,notBlank,len=11"`
}
TwoFactorRecoveryCodeLoginRequest represents all parameters of 2fa login request via recovery code
type TwoFactorRegenerateRecoveryCodeRequest ¶
type TwoFactorRegenerateRecoveryCodeRequest struct {
Password string `json:"password" binding:"omitempty,min=6,max=128"`
}
TwoFactorRegenerateRecoveryCodeRequest represents all parameters of 2fa regenerating recovery codes request
type TwoFactorStatusResponse ¶
type TwoFactorStatusResponse struct { Enable bool `json:"enable"` CreatedAt int64 `json:"createdAt,omitempty"` }
TwoFactorStatusResponse represents a view-object of 2fa status
type User ¶
type User struct { Uid int64 `xorm:"PK"` Username string `xorm:"VARCHAR(32) UNIQUE NOT NULL"` Email string `xorm:"VARCHAR(100) UNIQUE NOT NULL"` Nickname string `xorm:"VARCHAR(64) NOT NULL"` Password string `xorm:"VARCHAR(64) NOT NULL"` Salt string `xorm:"VARCHAR(10) NOT NULL"` CustomAvatarType string `xorm:"VARCHAR(10)"` DefaultAccountId int64 TransactionEditScope TransactionEditScope `xorm:"TINYINT NOT NULL"` Language string `xorm:"VARCHAR(10)"` DefaultCurrency string `xorm:"VARCHAR(3) NOT NULL"` FirstDayOfWeek core.WeekDay `xorm:"TINYINT NOT NULL"` LongDateFormat core.LongDateFormat `xorm:"TINYINT"` ShortDateFormat core.ShortDateFormat `xorm:"TINYINT"` LongTimeFormat core.LongTimeFormat `xorm:"TINYINT"` ShortTimeFormat core.ShortTimeFormat `xorm:"TINYINT"` DecimalSeparator core.DecimalSeparator `xorm:"TINYINT"` DigitGroupingSymbol core.DigitGroupingSymbol `xorm:"TINYINT"` DigitGrouping core.DigitGroupingType `xorm:"TINYINT"` CurrencyDisplayType core.CurrencyDisplayType `xorm:"TINYINT"` ExpenseAmountColor AmountColorType `xorm:"TINYINT"` IncomeAmountColor AmountColorType `xorm:"TINYINT"` FeatureRestriction core.UserFeatureRestrictions Disabled bool Deleted bool `xorm:"NOT NULL"` EmailVerified bool `xorm:"NOT NULL"` CreatedUnixTime int64 UpdatedUnixTime int64 DeletedUnixTime int64 LastLoginUnixTime int64 }
User represents user data stored in database
func (*User) CanEditTransactionByTransactionTime ¶
CanEditTransactionByTransactionTime returns whether this user can edit transaction with specified transaction time
func (*User) ToUserBasicInfo ¶
func (u *User) ToUserBasicInfo(avatarProvider core.UserAvatarProviderType, avatarUrl string) *UserBasicInfo
ToUserBasicInfo returns a user basic view-object according to database model
func (*User) ToUserProfileResponse ¶
func (u *User) ToUserProfileResponse(basicInfo *UserBasicInfo) *UserProfileResponse
ToUserProfileResponse returns a user profile view-object according to database model
type UserBasicInfo ¶
type UserBasicInfo struct { Username string `json:"username"` Email string `json:"email"` Nickname string `json:"nickname"` AvatarUrl string `json:"avatar"` AvatarProvider string `json:"avatarProvider,omitempty"` DefaultAccountId int64 `json:"defaultAccountId,string"` TransactionEditScope TransactionEditScope `json:"transactionEditScope"` Language string `json:"language"` DefaultCurrency string `json:"defaultCurrency"` FirstDayOfWeek core.WeekDay `json:"firstDayOfWeek"` LongDateFormat core.LongDateFormat `json:"longDateFormat"` ShortDateFormat core.ShortDateFormat `json:"shortDateFormat"` LongTimeFormat core.LongTimeFormat `json:"longTimeFormat"` ShortTimeFormat core.ShortTimeFormat `json:"shortTimeFormat"` DecimalSeparator core.DecimalSeparator `json:"decimalSeparator"` DigitGroupingSymbol core.DigitGroupingSymbol `json:"digitGroupingSymbol"` DigitGrouping core.DigitGroupingType `json:"digitGrouping"` CurrencyDisplayType core.CurrencyDisplayType `json:"currencyDisplayType"` ExpenseAmountColor AmountColorType `json:"expenseAmountColor"` IncomeAmountColor AmountColorType `json:"incomeAmountColor"` EmailVerified bool `json:"emailVerified"` }
UserBasicInfo represents a view-object of user basic info
type UserLoginRequest ¶
type UserLoginRequest struct { LoginName string `json:"loginName" binding:"required,notBlank,max=100,validUsername|validEmail"` Password string `json:"password" binding:"required,min=6,max=128"` }
UserLoginRequest represents all parameters of user login request
type UserProfileResponse ¶
type UserProfileResponse struct { *UserBasicInfo LastLoginAt int64 `json:"lastLoginAt"` }
UserProfileResponse represents a view-object of user profile
type UserProfileUpdateRequest ¶
type UserProfileUpdateRequest struct { Email string `json:"email" binding:"omitempty,notBlank,max=100,validEmail"` Nickname string `json:"nickname" binding:"omitempty,notBlank,max=64"` Password string `json:"password" binding:"omitempty,min=6,max=128"` OldPassword string `json:"oldPassword" binding:"omitempty,min=6,max=128"` DefaultAccountId int64 `json:"defaultAccountId,string" binding:"omitempty,min=1"` TransactionEditScope *TransactionEditScope `json:"transactionEditScope" binding:"omitempty,min=0,max=6"` Language string `json:"language" binding:"omitempty,min=2,max=16"` DefaultCurrency string `json:"defaultCurrency" binding:"omitempty,len=3,validCurrency"` FirstDayOfWeek *core.WeekDay `json:"firstDayOfWeek" binding:"omitempty,min=0,max=6"` LongDateFormat *core.LongDateFormat `json:"longDateFormat" binding:"omitempty,min=0,max=3"` ShortDateFormat *core.ShortDateFormat `json:"shortDateFormat" binding:"omitempty,min=0,max=3"` LongTimeFormat *core.LongTimeFormat `json:"longTimeFormat" binding:"omitempty,min=0,max=3"` ShortTimeFormat *core.ShortTimeFormat `json:"shortTimeFormat" binding:"omitempty,min=0,max=3"` DecimalSeparator *core.DecimalSeparator `json:"decimalSeparator" binding:"omitempty,min=0,max=3"` DigitGroupingSymbol *core.DigitGroupingSymbol `json:"digitGroupingSymbol" binding:"omitempty,min=0,max=4"` DigitGrouping *core.DigitGroupingType `json:"digitGrouping" binding:"omitempty,min=0,max=2"` CurrencyDisplayType *core.CurrencyDisplayType `json:"currencyDisplayType" binding:"omitempty,min=0,max=11"` ExpenseAmountColor *AmountColorType `json:"expenseAmountColor" binding:"omitempty,min=0,max=4"` IncomeAmountColor *AmountColorType `json:"incomeAmountColor" binding:"omitempty,min=0,max=4"` }
UserProfileUpdateRequest represents all parameters of user updating profile request
type UserProfileUpdateResponse ¶
type UserProfileUpdateResponse struct { User *UserBasicInfo `json:"user"` NewToken string `json:"newToken,omitempty"` }
UserProfileUpdateResponse represents the data returns to frontend after updating profile
type UserRegisterRequest ¶
type UserRegisterRequest struct { Username string `json:"username" binding:"required,notBlank,max=32,validUsername"` Email string `json:"email" binding:"required,notBlank,max=100,validEmail"` Nickname string `json:"nickname" binding:"required,notBlank,max=64"` Password string `json:"password" binding:"required,min=6,max=128"` Language string `json:"language" binding:"required,min=2,max=16"` DefaultCurrency string `json:"defaultCurrency" binding:"required,len=3,validCurrency"` FirstDayOfWeek core.WeekDay `json:"firstDayOfWeek" binding:"min=0,max=6"` TransactionCategoryCreateBatchRequest }
UserRegisterRequest represents all parameters of user registering request
type UserResendVerifyEmailRequest ¶ added in v0.4.0
type UserResendVerifyEmailRequest struct { Email string `json:"email" binding:"omitempty,max=100,validEmail"` Password string `json:"password" binding:"omitempty,min=6,max=128"` }
UserResendVerifyEmailRequest represents all parameters of user resend verify email request
type UserVerifyEmailRequest ¶ added in v0.4.0
type UserVerifyEmailRequest struct {
RequestNewToken bool `json:"requestNewToken" binding:"omitempty"`
}
UserVerifyEmailRequest represents all parameters of user verify email request
type UserVerifyEmailResponse ¶ added in v0.4.0
type UserVerifyEmailResponse struct { NewToken string `json:"newToken,omitempty"` User *UserBasicInfo `json:"user"` NotificationContent string `json:"notificationContent,omitempty"` }
UserVerifyEmailResponse represents all response parameters after user have verified email
type YearMonthRangeRequest ¶ added in v0.5.0
type YearMonthRangeRequest struct { StartYearMonth string `form:"start_year_month"` EndYearMonth string `form:"end_year_month"` }
YearMonthRangeRequest represents all parameters of a request with year and month range
func (*YearMonthRangeRequest) GetNumericYearMonthRange ¶ added in v0.5.0
GetNumericYearMonthRange returns numeric start year, start month, end year and end month
Source Files
¶
- account.go
- auth_response.go
- data_management.go
- exchange_rate.go
- forget_password.go
- imported_transaction.go
- token_record.go
- transaction.go
- transaction_category.go
- transaction_picture_info.go
- transaction_tag.go
- transaction_tag_index.go
- transaction_template.go
- two_factor.go
- two_factor_recovery_code.go
- user.go