Documentation
¶
Index ¶
- func Fail(ctx *gin.Context)
- func FailToError(ctx *gin.Context, err error)
- func FailToParameter(ctx *gin.Context, err error)
- func FailWithDetailed(data interface{}, message string, ctx *gin.Context)
- func FailWithMessage(message string, ctx *gin.Context)
- func Forbidden(ctx *gin.Context)
- func FrequentOperation(ctx *gin.Context)
- func Ok(ctx *gin.Context)
- func OkWithData(data interface{}, ctx *gin.Context)
- func OkWithDetailed(data interface{}, message string, ctx *gin.Context)
- func OkWithMessage(message string, ctx *gin.Context)
- func Response(status int, data interface{}, msg string, ctx *gin.Context)
- func ResponseAndAbort(status int, data interface{}, msg string, ctx *gin.Context)
- func TokenExpired(ctx *gin.Context)
- type AccountDetail
- type AccountDetailList
- type AccountInfo
- type AccountMapping
- type AccountOne
- type AccountTemplateList
- type AccountTemplateOne
- type AccountUser
- type AccountUserConfig
- type AccountUserInfo
- type AccountUserInvitation
- type CategoryDetail
- type CategoryDetailList
- type CategoryMappingTree
- type CategoryMappingTreeFather
- type CategoryOne
- type CategoryTree
- type CommonCaptcha
- type CreateResponse
- type Data
- type ExpirationTime
- type Father
- type FatherOne
- type Id
- type List
- type Login
- type NameId
- type NameValue
- type NoContent
- type PageData
- type ProductList
- type ProductMappingTree
- type ProductMappingTreeFather
- type ProductOne
- type ProductTransactionCategory
- type ProductTransactionCategoryList
- type Register
- type Token
- type TransactionCategoryAmountRank
- type TransactionDayStatistic
- type TransactionDetail
- type TransactionDetailList
- type TransactionGetList
- type TransactionInfo
- type TransactionInfoList
- type TransactionStatistic
- type TransactionTiming
- type TransactionTimingConfig
- type TransactionTimingList
- type TransactionTotal
- type TwoLevelTree
- type UserCurrentClientInfo
- type UserFriendInvitation
- type UserHome
- type UserHomeHeaderCard
- type UserHomeTimePeriodStatistics
- type UserInfo
- type UserOne
- type UserTransactionShareConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FailToError ¶
func FailToParameter ¶
func FailWithDetailed ¶
func FailWithMessage ¶
func FrequentOperation ¶
func OkWithData ¶
func OkWithDetailed ¶
func OkWithMessage ¶
func ResponseAndAbort ¶
func TokenExpired ¶
Types ¶
type AccountDetail ¶
type AccountDetail struct { AccountOne CreatorId uint CreatorName string Role accountModel.UserRole JoinTime time.Time }
func (*AccountDetail) SetData ¶
func (a *AccountDetail) SetData(accountUser accountModel.User) error
func (*AccountDetail) SetDataFromAccount ¶
func (a *AccountDetail) SetDataFromAccount(account accountModel.Account) error
SetDataFromAccount 通过account设置数据,数据中的user来源为account.UserId
func (*AccountDetail) SetDataFromAccountAndUser ¶
func (a *AccountDetail) SetDataFromAccountAndUser(account accountModel.Account, user userModel.User) error
type AccountDetailList ¶
type AccountDetailList []AccountDetail
func (*AccountDetailList) SetData ¶
func (a *AccountDetailList) SetData(list dataTool.Slice[uint, accountModel.User]) error
type AccountInfo ¶
type AccountInfo struct { TodayTransTotal *global.IEStatisticWithTime CurrentMonthTransTotal *global.IEStatisticWithTime RecentTrans *TransactionDetailList }
type AccountMapping ¶
type AccountMapping struct { Id uint MainAccount AccountOne RelatedAccount AccountDetail CreateTime time.Time UpdateTime time.Time }
AccountMapping 账本关联
func (*AccountMapping) SetData ¶
func (a *AccountMapping) SetData(data accountModel.Mapping) error
type AccountOne ¶
type AccountOne struct { Id uint Name string Icon string Type accountModel.Type Location string CreateTime time.Time UpdateTime time.Time }
func (*AccountOne) SetData ¶
func (a *AccountOne) SetData(data accountModel.Account) error
type AccountTemplateList ¶
type AccountTemplateList struct {
List []AccountTemplateOne
}
type AccountTemplateOne ¶
type AccountTemplateOne struct { Id uint Name string Icon string Type accountModel.Type }
type AccountUser ¶
type AccountUser struct { Id uint AccountId uint UserId uint Info UserInfo Role accountModel.UserRole CreateTime time.Time }
func (*AccountUser) SetData ¶
func (a *AccountUser) SetData(data accountModel.User) error
type AccountUserConfig ¶
type AccountUserConfig struct { Id uint AccountId uint UserId uint Trans struct { SyncMappingAccount bool } CreateTime time.Time UpdateTime time.Time }
func (*AccountUserConfig) SetData ¶
func (auc *AccountUserConfig) SetData(data accountModel.UserConfig) error
type AccountUserInfo ¶
type AccountUserInfo struct { TodayTransTotal *global.IEStatisticWithTime CurrentMonthTransTotal *global.IEStatisticWithTime RecentTrans *TransactionDetailList }
type AccountUserInvitation ¶
type AccountUserInvitation struct { Id uint Account AccountOne Inviter UserInfo Invitee UserInfo Status accountModel.UserInvitationStatus Role accountModel.UserRole CreateTime time.Time }
func (*AccountUserInvitation) SetData ¶
func (a *AccountUserInvitation) SetData(data accountModel.UserInvitation) error
type CategoryDetail ¶
type CategoryDetail struct { Id uint Name string Icon string FatherId uint FatherName string IncomeExpense constant.IncomeExpense }
func (*CategoryDetail) SetData ¶
func (cd *CategoryDetail) SetData(category categoryModel.Category, father categoryModel.Father) error
type CategoryDetailList ¶
type CategoryDetailList []CategoryDetail
func (*CategoryDetailList) SetData ¶
func (cdl *CategoryDetailList) SetData(categoryList dataTool.Slice[uint, categoryModel.Category]) error
type CategoryMappingTree ¶
type CategoryMappingTree struct {
Tree []CategoryMappingTreeFather
}
type CategoryMappingTreeFather ¶
func (*CategoryMappingTreeFather) SetDataFromCategoryMapping ¶
func (m *CategoryMappingTreeFather) SetDataFromCategoryMapping(data []categoryModel.Mapping) error
type CategoryOne ¶
type CategoryOne struct { Id uint Name string AccountId uint Icon string IncomeExpense constant.IncomeExpense }
func (*CategoryOne) SetData ¶
func (co *CategoryOne) SetData(category categoryModel.Category) error
type CategoryTree ¶
type CategoryTree struct {
Tree []FatherOne
}
type CommonCaptcha ¶
type CreateResponse ¶
type ExpirationTime ¶
type ExpirationTime struct {
ExpirationTime int
}
type FatherOne ¶
type FatherOne struct { Id uint Name string AccountId uint IncomeExpense constant.IncomeExpense Children []CategoryOne }
func (*FatherOne) SetData ¶
func (fo *FatherOne) SetData(father categoryModel.Father, categoryList []categoryModel.Category) error
type Login ¶
type Login struct { Token string TokenExpirationTime time.Time CurrentAccount AccountDetail User UserOne }
func (*Login) SetDataFormClientInto ¶
func (l *Login) SetDataFormClientInto(data userModel.UserClientBaseInfo) error
type ProductList ¶
type ProductList struct {
List []ProductOne
}
type ProductMappingTree ¶
type ProductMappingTree struct {
Tree []ProductMappingTreeFather
}
type ProductOne ¶
type ProductTransactionCategory ¶
type ProductTransactionCategory struct { Id uint Name string IncomeExpense constant.IncomeExpense }
type ProductTransactionCategoryList ¶
type ProductTransactionCategoryList struct {
List []ProductTransactionCategory
}
type TransactionCategoryAmountRank ¶
type TransactionCategoryAmountRank struct { Category CategoryOne global.AmountCount }
type TransactionDayStatistic ¶
type TransactionDayStatistic struct { global.AmountCount Date time.Time }
type TransactionDetail ¶
type TransactionDetail struct { Id uint UserId uint UserName string AccountId uint AccountName string Amount int CategoryId uint CategoryIcon string CategoryName string CategoryFatherName string IncomeExpense constant.IncomeExpense Remark string RecordType transactionModel.RecordType TradeTime time.Time UpdateTime time.Time CreateTime time.Time }
TransactionDetail 交易详情
func (*TransactionDetail) SetData ¶
func (t *TransactionDetail) SetData( trans transactionModel.Transaction, account *accountModel.Account, ) error
func (*TransactionDetail) SetDataIgnoreErr ¶
func (t *TransactionDetail) SetDataIgnoreErr( trans transactionModel.Transaction, account *accountModel.Account, ) error
type TransactionDetailList ¶
type TransactionDetailList []TransactionDetail
TransactionDetailList 交易详情列表
func (*TransactionDetailList) SetData ¶
func (t *TransactionDetailList) SetData(transList []transactionModel.Transaction) error
type TransactionGetList ¶
type TransactionGetList struct { List TransactionDetailList PageData }
type TransactionInfo ¶
type TransactionInfo struct { Id uint UserId uint UserName string AccountId uint AccountName string Amount int CategoryId uint CategoryIcon string CategoryName string CategoryFatherName string IncomeExpense constant.IncomeExpense Remark string TradeTime time.Time }
func (*TransactionInfo) SetData ¶
func (ti *TransactionInfo) SetData(data transactionModel.Info) error
type TransactionInfoList ¶
type TransactionInfoList []TransactionInfo
func (*TransactionInfoList) SetData ¶
func (t *TransactionInfoList) SetData(list dataTool.Slice[uint, transactionModel.Info]) error
type TransactionStatistic ¶
type TransactionTiming ¶
type TransactionTiming struct { Trans TransactionInfo Config TransactionTimingConfig }
func (*TransactionTiming) SetData ¶
func (tt *TransactionTiming) SetData(data transactionModel.Timing) error
type TransactionTimingConfig ¶
type TransactionTimingList ¶
type TransactionTimingList []TransactionTiming
func (*TransactionTimingList) SetData ¶
func (ttl *TransactionTimingList) SetData(list dataTool.Slice[uint, transactionModel.Timing]) error
type TransactionTotal ¶
type TransactionTotal struct {
global.IEStatistic
}
type TwoLevelTree ¶
type TwoLevelTree struct {
Tree []Father
}
type UserCurrentClientInfo ¶
type UserCurrentClientInfo struct { CurrentAccount AccountDetail LoginTime time.Time }
func (*UserCurrentClientInfo) SetData ¶
func (u *UserCurrentClientInfo) SetData(info userModel.UserClientBaseInfo) error
type UserFriendInvitation ¶
type UserHome ¶
type UserHome struct { HeaderCard *UserHomeHeaderCard TimePeriodStatistics *UserHomeTimePeriodStatistics }
type UserHomeHeaderCard ¶
type UserHomeHeaderCard struct {
*TransactionStatistic
}
type UserHomeTimePeriodStatistics ¶
type UserHomeTimePeriodStatistics struct { TodayData *TransactionStatistic YesterdayData *TransactionStatistic WeekData *TransactionStatistic YearData *TransactionStatistic }
type UserInfo ¶
func (*UserInfo) SetMaskData ¶
type UserTransactionShareConfig ¶
type UserTransactionShareConfig struct {}
func (*UserTransactionShareConfig) SetData ¶
func (u *UserTransactionShareConfig) SetData(data userModel.TransactionShareConfig) error
Click to show internal directories.
Click to hide internal directories.