api

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2024 License: MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Accounts = &AccountsApi{
		ApiUsingConfig: ApiUsingConfig{
			container: settings.Container,
		},
		ApiUsingDuplicateChecker: ApiUsingDuplicateChecker{
			container: duplicatechecker.Container,
		},
		accounts: services.Accounts,
	}
)

Initialize an account api singleton instance

View Source
var (
	AmapApis = &AmapApiProxy{
		ApiUsingConfig: ApiUsingConfig{
			container: settings.Container,
		},
	}
)

Initialize a amap api proxy singleton instance

View Source
var (
	Authorizations = &AuthorizationsApi{
		ApiUsingConfig: ApiUsingConfig{
			container: settings.Container,
		},
		ApiWithUserInfo: ApiWithUserInfo{
			ApiUsingConfig: ApiUsingConfig{
				container: settings.Container,
			},
			ApiUsingAvatarProvider: ApiUsingAvatarProvider{
				container: avatars.Container,
			},
		},
		users:                   services.Users,
		tokens:                  services.Tokens,
		twoFactorAuthorizations: services.TwoFactorAuthorizations,
	}
)

Initialize a authorization api singleton instance

View Source
var (
	DataManagements = &DataManagementsApi{
		ApiUsingConfig: ApiUsingConfig{
			container: settings.Container,
		},
		tokens:       services.Tokens,
		users:        services.Users,
		accounts:     services.Accounts,
		transactions: services.Transactions,
		categories:   services.TransactionCategories,
		tags:         services.TransactionTags,
		pictures:     services.TransactionPictures,
		templates:    services.TransactionTemplates,
	}
)

Initialize a data management api singleton instance

View Source
var (
	Default = &DefaultApi{}
)

Initialize a default api singleton instance

View Source
var (
	ExchangeRates = &ExchangeRatesApi{
		ApiUsingConfig: ApiUsingConfig{
			container: settings.Container,
		},
	}
)

Initialize a exchange rate api singleton instance

View Source
var (
	ForgetPasswords = &ForgetPasswordsApi{
		ApiUsingConfig: ApiUsingConfig{
			container: settings.Container,
		},
		users:           services.Users,
		tokens:          services.Tokens,
		forgetPasswords: services.ForgetPasswords,
	}
)

Initialize a user api singleton instance

View Source
var (
	Healths = &HealthsApi{}
)

Initialize a healths api singleton instance

View Source
var (
	MapImages = &MapImageProxy{
		ApiUsingConfig: ApiUsingConfig{
			container: settings.Container,
		},
	}
)

Initialize a map image proxy singleton instance

View Source
var (
	QrCodes = &QrCodesApi{
		ApiUsingConfig: ApiUsingConfig{
			container: settings.Container,
		},
	}
)

Initialize a qrcode generator api singleton instance

View Source
var (
	ServerSettings = &ServerSettingsApi{
		ApiUsingConfig: ApiUsingConfig{
			container: settings.Container,
		},
	}
)

Initialize a server settings api singleton instance

View Source
var (
	Tokens = &TokensApi{
		ApiUsingConfig: ApiUsingConfig{
			container: settings.Container,
		},
		ApiWithUserInfo: ApiWithUserInfo{
			ApiUsingConfig: ApiUsingConfig{
				container: settings.Container,
			},
			ApiUsingAvatarProvider: ApiUsingAvatarProvider{
				container: avatars.Container,
			},
		},
		tokens: services.Tokens,
		users:  services.Users,
	}
)

Initialize a token api singleton instance

View Source
var (
	TransactionCategories = &TransactionCategoriesApi{
		ApiUsingConfig: ApiUsingConfig{
			container: settings.Container,
		},
		ApiUsingDuplicateChecker: ApiUsingDuplicateChecker{
			container: duplicatechecker.Container,
		},
		categories: services.TransactionCategories,
	}
)

Initialize a transaction category api singleton instance

View Source
var (
	TransactionPictures = &TransactionPicturesApi{
		ApiUsingConfig: ApiUsingConfig{
			container: settings.Container,
		},
		ApiUsingDuplicateChecker: ApiUsingDuplicateChecker{
			container: duplicatechecker.Container,
		},
		users:    services.Users,
		pictures: services.TransactionPictures,
	}
)

Initialize a transaction api singleton instance

View Source
var (
	TransactionTags = &TransactionTagsApi{
		tags: services.TransactionTags,
	}
)

Initialize a transaction tag api singleton instance

View Source
var (
	TransactionTemplates = &TransactionTemplatesApi{
		ApiUsingConfig: ApiUsingConfig{
			container: settings.Container,
		},
		ApiUsingDuplicateChecker: ApiUsingDuplicateChecker{
			container: duplicatechecker.Container,
		},
		templates: services.TransactionTemplates,
	}
)

Initialize a transaction template api singleton instance

View Source
var (
	Transactions = &TransactionsApi{
		ApiUsingConfig: ApiUsingConfig{
			container: settings.Container,
		},
		ApiUsingDuplicateChecker: ApiUsingDuplicateChecker{
			container: duplicatechecker.Container,
		},
		transactions:          services.Transactions,
		transactionCategories: services.TransactionCategories,
		transactionTags:       services.TransactionTags,
		transactionPictures:   services.TransactionPictures,
		accounts:              services.Accounts,
		users:                 services.Users,
	}
)

Initialize a transaction api singleton instance

View Source
var (
	TwoFactorAuthorizations = &TwoFactorAuthorizationsApi{
		twoFactorAuthorizations: services.TwoFactorAuthorizations,
		users:                   services.Users,
		tokens:                  services.Tokens,
	}
)

Initialize a 2fa api singleton instance

View Source
var (
	Users = &UsersApi{
		ApiUsingConfig: ApiUsingConfig{
			container: settings.Container,
		},
		ApiWithUserInfo: ApiWithUserInfo{
			ApiUsingConfig: ApiUsingConfig{
				container: settings.Container,
			},
			ApiUsingAvatarProvider: ApiUsingAvatarProvider{
				container: avatars.Container,
			},
		},
		users:    services.Users,
		tokens:   services.Tokens,
		accounts: services.Accounts,
	}
)

Initialize a user api singleton instance

Functions

This section is empty.

Types

type AccountsApi

type AccountsApi struct {
	ApiUsingConfig
	ApiUsingDuplicateChecker
	// contains filtered or unexported fields
}

AccountsApi represents account api

func (*AccountsApi) AccountCreateHandler

func (a *AccountsApi) AccountCreateHandler(c *core.WebContext) (any, *errs.Error)

AccountCreateHandler saves a new account by request parameters for current user

func (*AccountsApi) AccountDeleteHandler

func (a *AccountsApi) AccountDeleteHandler(c *core.WebContext) (any, *errs.Error)

AccountDeleteHandler deletes an existed account by request parameters for current user

func (*AccountsApi) AccountGetHandler

func (a *AccountsApi) AccountGetHandler(c *core.WebContext) (any, *errs.Error)

AccountGetHandler returns one specific account of current user

func (*AccountsApi) AccountHideHandler

func (a *AccountsApi) AccountHideHandler(c *core.WebContext) (any, *errs.Error)

AccountHideHandler hides an existed account by request parameters for current user

func (*AccountsApi) AccountListHandler

func (a *AccountsApi) AccountListHandler(c *core.WebContext) (any, *errs.Error)

AccountListHandler returns accounts list of current user

func (*AccountsApi) AccountModifyHandler

func (a *AccountsApi) AccountModifyHandler(c *core.WebContext) (any, *errs.Error)

AccountModifyHandler saves an existed account by request parameters for current user

func (*AccountsApi) AccountMoveHandler

func (a *AccountsApi) AccountMoveHandler(c *core.WebContext) (any, *errs.Error)

AccountMoveHandler moves display order of existed accounts by request parameters for current user

type AmapApiProxy added in v0.4.0

type AmapApiProxy struct {
	ApiUsingConfig
}

AmapApiProxy represents amap api proxy

func (*AmapApiProxy) AmapApiProxyHandler added in v0.4.0

func (p *AmapApiProxy) AmapApiProxyHandler(c *core.WebContext) (*httputil.ReverseProxy, *errs.Error)

AmapApiProxyHandler returns amap api response

type ApiUsingAvatarProvider added in v0.6.0

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

ApiUsingAvatarProvider represents an api that need to use avatar provider

func (*ApiUsingAvatarProvider) GetAvatarUrl added in v0.6.0

func (a *ApiUsingAvatarProvider) GetAvatarUrl(user *models.User) string

GetAvatarUrl returns the avatar url by the current user avatar provider

type ApiUsingConfig added in v0.6.0

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

ApiUsingConfig represents an api that need to use config

func (*ApiUsingConfig) CurrentConfig added in v0.6.0

func (a *ApiUsingConfig) CurrentConfig() *settings.Config

CurrentConfig returns the current config

func (*ApiUsingConfig) GetAfterLoginNotificationContent added in v0.6.0

func (a *ApiUsingConfig) GetAfterLoginNotificationContent(userLanguage string, clientLanguage string) string

GetAfterLoginNotificationContent returns the notification content displayed each time users log in

func (*ApiUsingConfig) GetAfterOpenNotificationContent added in v0.6.0

func (a *ApiUsingConfig) GetAfterOpenNotificationContent(userLanguage string, clientLanguage string) string

GetAfterOpenNotificationContent returns the notification content displayed each time users open the app

func (*ApiUsingConfig) GetAfterRegisterNotificationContent added in v0.6.0

func (a *ApiUsingConfig) GetAfterRegisterNotificationContent(userLanguage string, clientLanguage string) string

GetAfterRegisterNotificationContent returns the notification content displayed each time users register

func (*ApiUsingConfig) GetTransactionPictureInfoResponse added in v0.6.0

func (a *ApiUsingConfig) GetTransactionPictureInfoResponse(pictureInfo *models.TransactionPictureInfo) *models.TransactionPictureInfoBasicResponse

GetTransactionPictureInfoResponse returns the view-object of transaction picture basic info according to the transaction picture model

func (*ApiUsingConfig) GetTransactionPictureInfoResponseList added in v0.6.0

func (a *ApiUsingConfig) GetTransactionPictureInfoResponseList(pictureInfos []*models.TransactionPictureInfo) models.TransactionPictureInfoBasicResponseSlice

GetTransactionPictureInfoResponseList returns the view-object list of transaction picture basic info according to the transaction picture model

type ApiUsingDuplicateChecker added in v0.6.0

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

ApiUsingDuplicateChecker represents an api that need to use duplicate checker

func (*ApiUsingDuplicateChecker) GetSubmissionRemark added in v0.6.0

func (a *ApiUsingDuplicateChecker) GetSubmissionRemark(checkerType duplicatechecker.DuplicateCheckerType, uid int64, identification string) (bool, string)

GetSubmissionRemark returns whether the same submission has been processed and related remark by the current duplicate checker

func (*ApiUsingDuplicateChecker) SetSubmissionRemark added in v0.6.0

func (a *ApiUsingDuplicateChecker) SetSubmissionRemark(checkerType duplicatechecker.DuplicateCheckerType, uid int64, identification string, remark string)

SetSubmissionRemark saves the identification and remark to in-memory cache by the current duplicate checker

type ApiWithUserInfo added in v0.6.0

type ApiWithUserInfo struct {
	ApiUsingConfig
	ApiUsingAvatarProvider
}

ApiWithUserInfo represents an api that can returns user info

func (*ApiWithUserInfo) GetUserBasicInfo added in v0.6.0

func (a *ApiWithUserInfo) GetUserBasicInfo(user *models.User) *models.UserBasicInfo

GetUserBasicInfo returns the view-object of user basic info according to the user model

type AuthorizationsApi

type AuthorizationsApi struct {
	ApiUsingConfig
	ApiWithUserInfo
	// contains filtered or unexported fields
}

AuthorizationsApi represents authorization api

func (*AuthorizationsApi) AuthorizeHandler

func (a *AuthorizationsApi) AuthorizeHandler(c *core.WebContext) (any, *errs.Error)

AuthorizeHandler verifies and authorizes current login request

func (*AuthorizationsApi) TwoFactorAuthorizeByRecoveryCodeHandler

func (a *AuthorizationsApi) TwoFactorAuthorizeByRecoveryCodeHandler(c *core.WebContext) (any, *errs.Error)

TwoFactorAuthorizeByRecoveryCodeHandler verifies and authorizes current 2fa login by recovery code

func (*AuthorizationsApi) TwoFactorAuthorizeHandler

func (a *AuthorizationsApi) TwoFactorAuthorizeHandler(c *core.WebContext) (any, *errs.Error)

TwoFactorAuthorizeHandler verifies and authorizes current 2fa login by passcode

type DataManagementsApi

type DataManagementsApi struct {
	ApiUsingConfig
	// contains filtered or unexported fields
}

DataManagementsApi represents data management api

func (*DataManagementsApi) ClearDataHandler

func (a *DataManagementsApi) ClearDataHandler(c *core.WebContext) (any, *errs.Error)

ClearDataHandler deletes all user data

func (*DataManagementsApi) DataStatisticsHandler added in v0.2.0

func (a *DataManagementsApi) DataStatisticsHandler(c *core.WebContext) (any, *errs.Error)

DataStatisticsHandler returns user data statistics

func (*DataManagementsApi) ExportDataToEzbookkeepingCSVHandler added in v0.5.0

func (a *DataManagementsApi) ExportDataToEzbookkeepingCSVHandler(c *core.WebContext) ([]byte, string, *errs.Error)

ExportDataToEzbookkeepingCSVHandler returns exported data in csv format

func (*DataManagementsApi) ExportDataToEzbookkeepingTSVHandler added in v0.5.0

func (a *DataManagementsApi) ExportDataToEzbookkeepingTSVHandler(c *core.WebContext) ([]byte, string, *errs.Error)

ExportDataToEzbookkeepingTSVHandler returns exported data in csv format

type DefaultApi

type DefaultApi struct{}

DefaultApi represents default api

func (*DefaultApi) ApiNotFound

func (a *DefaultApi) ApiNotFound(c *core.WebContext) (any, *errs.Error)

ApiNotFound returns api not found error

func (*DefaultApi) MethodNotAllowed

func (a *DefaultApi) MethodNotAllowed(c *core.WebContext) (any, *errs.Error)

MethodNotAllowed returns method not allowed error

type ExchangeRatesApi

type ExchangeRatesApi struct {
	ApiUsingConfig
}

ExchangeRatesApi represents exchange rate api

func (*ExchangeRatesApi) LatestExchangeRateHandler

func (a *ExchangeRatesApi) LatestExchangeRateHandler(c *core.WebContext) (any, *errs.Error)

LatestExchangeRateHandler returns latest exchange rate data

type ForgetPasswordsApi added in v0.4.0

type ForgetPasswordsApi struct {
	ApiUsingConfig
	// contains filtered or unexported fields
}

ForgetPasswordsApi represents user forget password api

func (*ForgetPasswordsApi) UserForgetPasswordRequestHandler added in v0.4.0

func (a *ForgetPasswordsApi) UserForgetPasswordRequestHandler(c *core.WebContext) (any, *errs.Error)

UserForgetPasswordRequestHandler generates password reset link and send user an email with this link

func (*ForgetPasswordsApi) UserResetPasswordHandler added in v0.4.0

func (a *ForgetPasswordsApi) UserResetPasswordHandler(c *core.WebContext) (any, *errs.Error)

UserResetPasswordHandler resets user password by request parameters

type HealthsApi added in v0.2.0

type HealthsApi struct{}

HealthsApi represents health api

func (*HealthsApi) HealthStatusHandler added in v0.2.0

func (a *HealthsApi) HealthStatusHandler(c *core.WebContext) (any, *errs.Error)

HealthStatusHandler returns the health status of current service

type MapImageProxy added in v0.3.0

type MapImageProxy struct {
	ApiUsingConfig
}

MapImageProxy represents map image proxy

func (*MapImageProxy) MapAnnotationImageProxyHandler added in v0.5.0

func (p *MapImageProxy) MapAnnotationImageProxyHandler(c *core.WebContext) (*httputil.ReverseProxy, *errs.Error)

MapAnnotationImageProxyHandler returns map annotation image

func (*MapImageProxy) MapTileImageProxyHandler added in v0.4.0

func (p *MapImageProxy) MapTileImageProxyHandler(c *core.WebContext) (*httputil.ReverseProxy, *errs.Error)

MapTileImageProxyHandler returns map tile image

type QrCodesApi added in v0.4.0

type QrCodesApi struct {
	ApiUsingConfig
}

QrCodesApi represents qrcode generator api

func (*QrCodesApi) MobileUrlQrCodeHandler added in v0.4.0

func (a *QrCodesApi) MobileUrlQrCodeHandler(c *core.WebContext) ([]byte, string, *errs.Error)

MobileUrlQrCodeHandler returns a mobile url qr code image

type ServerSettingsApi added in v0.7.0

type ServerSettingsApi struct {
	ApiUsingConfig
}

ServerSettingsApi represents server settings api

func (*ServerSettingsApi) ServerSettingsJavascriptHandler added in v0.7.0

func (a *ServerSettingsApi) ServerSettingsJavascriptHandler(c *core.WebContext) ([]byte, string, *errs.Error)

ServerSettingsJavascriptHandler returns the javascript contains server settings

type TokensApi

type TokensApi struct {
	ApiUsingConfig
	ApiWithUserInfo
	// contains filtered or unexported fields
}

TokensApi represents token api

func (*TokensApi) TokenListHandler

func (a *TokensApi) TokenListHandler(c *core.WebContext) (any, *errs.Error)

TokenListHandler returns available token list of current user

func (*TokensApi) TokenRefreshHandler

func (a *TokensApi) TokenRefreshHandler(c *core.WebContext) (any, *errs.Error)

TokenRefreshHandler refresh current token of current user

func (*TokensApi) TokenRevokeAllHandler

func (a *TokensApi) TokenRevokeAllHandler(c *core.WebContext) (any, *errs.Error)

TokenRevokeAllHandler revokes all tokens of current user except current token

func (*TokensApi) TokenRevokeCurrentHandler

func (a *TokensApi) TokenRevokeCurrentHandler(c *core.WebContext) (any, *errs.Error)

TokenRevokeCurrentHandler revokes current token of current user

func (*TokensApi) TokenRevokeHandler

func (a *TokensApi) TokenRevokeHandler(c *core.WebContext) (any, *errs.Error)

TokenRevokeHandler revokes specific token of current user

type TransactionCategoriesApi

type TransactionCategoriesApi struct {
	ApiUsingConfig
	ApiUsingDuplicateChecker
	// contains filtered or unexported fields
}

TransactionCategoriesApi represents transaction category api

func (*TransactionCategoriesApi) CategoryCreateBatchHandler

func (a *TransactionCategoriesApi) CategoryCreateBatchHandler(c *core.WebContext) (any, *errs.Error)

CategoryCreateBatchHandler saves some new transaction category by request parameters for current user

func (*TransactionCategoriesApi) CategoryCreateHandler

func (a *TransactionCategoriesApi) CategoryCreateHandler(c *core.WebContext) (any, *errs.Error)

CategoryCreateHandler saves a new transaction category by request parameters for current user

func (*TransactionCategoriesApi) CategoryDeleteHandler

func (a *TransactionCategoriesApi) CategoryDeleteHandler(c *core.WebContext) (any, *errs.Error)

CategoryDeleteHandler deletes an existed transaction category by request parameters for current user

func (*TransactionCategoriesApi) CategoryGetHandler

func (a *TransactionCategoriesApi) CategoryGetHandler(c *core.WebContext) (any, *errs.Error)

CategoryGetHandler returns one specific transaction category of current user

func (*TransactionCategoriesApi) CategoryHideHandler

func (a *TransactionCategoriesApi) CategoryHideHandler(c *core.WebContext) (any, *errs.Error)

CategoryHideHandler hides an existed transaction category by request parameters for current user

func (*TransactionCategoriesApi) CategoryListHandler

func (a *TransactionCategoriesApi) CategoryListHandler(c *core.WebContext) (any, *errs.Error)

CategoryListHandler returns transaction category list of current user

func (*TransactionCategoriesApi) CategoryModifyHandler

func (a *TransactionCategoriesApi) CategoryModifyHandler(c *core.WebContext) (any, *errs.Error)

CategoryModifyHandler saves an existed transaction category by request parameters for current user

func (*TransactionCategoriesApi) CategoryMoveHandler

func (a *TransactionCategoriesApi) CategoryMoveHandler(c *core.WebContext) (any, *errs.Error)

CategoryMoveHandler moves display order of existed transaction categories by request parameters for current user

type TransactionPicturesApi added in v0.6.0

type TransactionPicturesApi struct {
	ApiUsingConfig
	ApiUsingDuplicateChecker
	// contains filtered or unexported fields
}

TransactionPicturesApi represents transaction pictures api

func (*TransactionPicturesApi) TransactionPictureGetHandler added in v0.6.0

func (a *TransactionPicturesApi) TransactionPictureGetHandler(c *core.WebContext) ([]byte, string, *errs.Error)

TransactionPictureGetHandler returns transaction picture data for current user

func (*TransactionPicturesApi) TransactionPictureRemoveUnusedHandler added in v0.6.0

func (a *TransactionPicturesApi) TransactionPictureRemoveUnusedHandler(c *core.WebContext) (any, *errs.Error)

TransactionPictureRemoveUnusedHandler removes unused transaction picture by request parameters for current user

func (*TransactionPicturesApi) TransactionPictureUploadHandler added in v0.6.0

func (a *TransactionPicturesApi) TransactionPictureUploadHandler(c *core.WebContext) (any, *errs.Error)

TransactionPictureUploadHandler saves transaction picture by request parameters for current user

type TransactionTagsApi

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

TransactionTagsApi represents transaction tag api

func (*TransactionTagsApi) TagCreateHandler

func (a *TransactionTagsApi) TagCreateHandler(c *core.WebContext) (any, *errs.Error)

TagCreateHandler saves a new transaction tag by request parameters for current user

func (*TransactionTagsApi) TagDeleteHandler

func (a *TransactionTagsApi) TagDeleteHandler(c *core.WebContext) (any, *errs.Error)

TagDeleteHandler deletes an existed transaction tag by request parameters for current user

func (*TransactionTagsApi) TagGetHandler

func (a *TransactionTagsApi) TagGetHandler(c *core.WebContext) (any, *errs.Error)

TagGetHandler returns one specific transaction tag of current user

func (*TransactionTagsApi) TagHideHandler

func (a *TransactionTagsApi) TagHideHandler(c *core.WebContext) (any, *errs.Error)

TagHideHandler hides a transaction tag by request parameters for current user

func (*TransactionTagsApi) TagListHandler

func (a *TransactionTagsApi) TagListHandler(c *core.WebContext) (any, *errs.Error)

TagListHandler returns transaction tag list of current user

func (*TransactionTagsApi) TagModifyHandler

func (a *TransactionTagsApi) TagModifyHandler(c *core.WebContext) (any, *errs.Error)

TagModifyHandler saves an existed transaction tag by request parameters for current user

func (*TransactionTagsApi) TagMoveHandler

func (a *TransactionTagsApi) TagMoveHandler(c *core.WebContext) (any, *errs.Error)

TagMoveHandler moves display order of existed transaction tags by request parameters for current user

type TransactionTemplatesApi added in v0.5.0

type TransactionTemplatesApi struct {
	ApiUsingConfig
	ApiUsingDuplicateChecker
	// contains filtered or unexported fields
}

TransactionTemplatesApi represents transaction template api

func (*TransactionTemplatesApi) TemplateCreateHandler added in v0.5.0

func (a *TransactionTemplatesApi) TemplateCreateHandler(c *core.WebContext) (any, *errs.Error)

TemplateCreateHandler saves a new transaction template by request parameters for current user

func (*TransactionTemplatesApi) TemplateDeleteHandler added in v0.5.0

func (a *TransactionTemplatesApi) TemplateDeleteHandler(c *core.WebContext) (any, *errs.Error)

TemplateDeleteHandler deletes an existed transaction template by request parameters for current user

func (*TransactionTemplatesApi) TemplateGetHandler added in v0.5.0

func (a *TransactionTemplatesApi) TemplateGetHandler(c *core.WebContext) (any, *errs.Error)

TemplateGetHandler returns one specific transaction template of current user

func (*TransactionTemplatesApi) TemplateHideHandler added in v0.5.0

func (a *TransactionTemplatesApi) TemplateHideHandler(c *core.WebContext) (any, *errs.Error)

TemplateHideHandler hides a transaction template by request parameters for current user

func (*TransactionTemplatesApi) TemplateListHandler added in v0.5.0

func (a *TransactionTemplatesApi) TemplateListHandler(c *core.WebContext) (any, *errs.Error)

TemplateListHandler returns transaction template list of current user

func (*TransactionTemplatesApi) TemplateModifyHandler added in v0.5.0

func (a *TransactionTemplatesApi) TemplateModifyHandler(c *core.WebContext) (any, *errs.Error)

TemplateModifyHandler saves an existed transaction template by request parameters for current user

func (*TransactionTemplatesApi) TemplateMoveHandler added in v0.5.0

func (a *TransactionTemplatesApi) TemplateMoveHandler(c *core.WebContext) (any, *errs.Error)

TemplateMoveHandler moves display order of existed transaction templates by request parameters for current user

type TransactionsApi

type TransactionsApi struct {
	ApiUsingConfig
	ApiUsingDuplicateChecker
	// contains filtered or unexported fields
}

TransactionsApi represents transaction api

func (*TransactionsApi) TransactionAmountsHandler

func (a *TransactionsApi) TransactionAmountsHandler(c *core.WebContext) (any, *errs.Error)

TransactionAmountsHandler returns transaction amounts of current user

func (*TransactionsApi) TransactionCountHandler

func (a *TransactionsApi) TransactionCountHandler(c *core.WebContext) (any, *errs.Error)

TransactionCountHandler returns transaction total count of current user

func (*TransactionsApi) TransactionCreateHandler

func (a *TransactionsApi) TransactionCreateHandler(c *core.WebContext) (any, *errs.Error)

TransactionCreateHandler saves a new transaction by request parameters for current user

func (*TransactionsApi) TransactionDeleteHandler

func (a *TransactionsApi) TransactionDeleteHandler(c *core.WebContext) (any, *errs.Error)

TransactionDeleteHandler deletes an existed transaction by request parameters for current user

func (*TransactionsApi) TransactionGetHandler

func (a *TransactionsApi) TransactionGetHandler(c *core.WebContext) (any, *errs.Error)

TransactionGetHandler returns one specific transaction of current user

func (*TransactionsApi) TransactionImportHandler added in v0.6.0

func (a *TransactionsApi) TransactionImportHandler(c *core.WebContext) (any, *errs.Error)

TransactionImportHandler imports transactions by request parameters for current user

func (*TransactionsApi) TransactionListHandler

func (a *TransactionsApi) TransactionListHandler(c *core.WebContext) (any, *errs.Error)

TransactionListHandler returns transaction list of current user

func (*TransactionsApi) TransactionModifyHandler

func (a *TransactionsApi) TransactionModifyHandler(c *core.WebContext) (any, *errs.Error)

TransactionModifyHandler saves an existed transaction by request parameters for current user

func (*TransactionsApi) TransactionMonthListHandler

func (a *TransactionsApi) TransactionMonthListHandler(c *core.WebContext) (any, *errs.Error)

TransactionMonthListHandler returns all transaction list of current user by month

func (*TransactionsApi) TransactionParseImportFileHandler added in v0.6.0

func (a *TransactionsApi) TransactionParseImportFileHandler(c *core.WebContext) (any, *errs.Error)

TransactionParseImportFileHandler returns the parsed transaction data by request parameters for current user

func (*TransactionsApi) TransactionStatisticsHandler

func (a *TransactionsApi) TransactionStatisticsHandler(c *core.WebContext) (any, *errs.Error)

TransactionStatisticsHandler returns transaction statistics of current user

func (*TransactionsApi) TransactionStatisticsTrendsHandler added in v0.5.0

func (a *TransactionsApi) TransactionStatisticsTrendsHandler(c *core.WebContext) (any, *errs.Error)

TransactionStatisticsTrendsHandler returns transaction statistics trends of current user

type TwoFactorAuthorizationsApi

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

TwoFactorAuthorizationsApi represents 2fa api

func (*TwoFactorAuthorizationsApi) TwoFactorDisableHandler

func (a *TwoFactorAuthorizationsApi) TwoFactorDisableHandler(c *core.WebContext) (any, *errs.Error)

TwoFactorDisableHandler disables 2fa for current user

func (*TwoFactorAuthorizationsApi) TwoFactorEnableConfirmHandler

func (a *TwoFactorAuthorizationsApi) TwoFactorEnableConfirmHandler(c *core.WebContext) (any, *errs.Error)

TwoFactorEnableConfirmHandler enables 2fa for current user

func (*TwoFactorAuthorizationsApi) TwoFactorEnableRequestHandler

func (a *TwoFactorAuthorizationsApi) TwoFactorEnableRequestHandler(c *core.WebContext) (any, *errs.Error)

TwoFactorEnableRequestHandler returns a new 2fa secret and qr code for current user to set 2fa and verify passcode next

func (*TwoFactorAuthorizationsApi) TwoFactorRecoveryCodeRegenerateHandler

func (a *TwoFactorAuthorizationsApi) TwoFactorRecoveryCodeRegenerateHandler(c *core.WebContext) (any, *errs.Error)

TwoFactorRecoveryCodeRegenerateHandler returns new 2fa recovery codes and revokes old recovery codes for current user

func (*TwoFactorAuthorizationsApi) TwoFactorStatusHandler

func (a *TwoFactorAuthorizationsApi) TwoFactorStatusHandler(c *core.WebContext) (any, *errs.Error)

TwoFactorStatusHandler returns 2fa status of current user

type UsersApi

type UsersApi struct {
	ApiUsingConfig
	ApiWithUserInfo
	// contains filtered or unexported fields
}

UsersApi represents user api

func (*UsersApi) UserEmailVerifyHandler added in v0.4.0

func (a *UsersApi) UserEmailVerifyHandler(c *core.WebContext) (any, *errs.Error)

UserEmailVerifyHandler sets user email address verified

func (*UsersApi) UserGetAvatarHandler added in v0.5.0

func (a *UsersApi) UserGetAvatarHandler(c *core.WebContext) ([]byte, string, *errs.Error)

UserGetAvatarHandler returns user avatar data for current user

func (*UsersApi) UserProfileHandler

func (a *UsersApi) UserProfileHandler(c *core.WebContext) (any, *errs.Error)

UserProfileHandler returns user profile of current user

func (*UsersApi) UserRegisterHandler

func (a *UsersApi) UserRegisterHandler(c *core.WebContext) (any, *errs.Error)

UserRegisterHandler saves a new user by request parameters

func (*UsersApi) UserRemoveAvatarHandler added in v0.5.0

func (a *UsersApi) UserRemoveAvatarHandler(c *core.WebContext) (any, *errs.Error)

UserRemoveAvatarHandler removes user avatar by request parameters for current user

func (*UsersApi) UserSendVerifyEmailByLoginedUserHandler added in v0.4.0

func (a *UsersApi) UserSendVerifyEmailByLoginedUserHandler(c *core.WebContext) (any, *errs.Error)

UserSendVerifyEmailByLoginedUserHandler sends logined user verify email

func (*UsersApi) UserSendVerifyEmailByUnloginUserHandler added in v0.4.0

func (a *UsersApi) UserSendVerifyEmailByUnloginUserHandler(c *core.WebContext) (any, *errs.Error)

UserSendVerifyEmailByUnloginUserHandler sends unlogin user verify email

func (*UsersApi) UserUpdateAvatarHandler added in v0.5.0

func (a *UsersApi) UserUpdateAvatarHandler(c *core.WebContext) (any, *errs.Error)

UserUpdateAvatarHandler saves user avatar by request parameters for current user

func (*UsersApi) UserUpdateProfileHandler

func (a *UsersApi) UserUpdateProfileHandler(c *core.WebContext) (any, *errs.Error)

UserUpdateProfileHandler saves user profile by request parameters for current user

Jump to

Keyboard shortcuts

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