controllers

package
v0.0.0-...-af4ee6b Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2021 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthFilter

func AuthFilter(ctx *context.Context)

Types

type AccountController

type AccountController struct {
	BaseController
}

func (*AccountController) CreateAccount

func (o *AccountController) CreateAccount(newAccount dt.AccountInsert)

@Title create new account @Param newAccount body dt.AccountInsert true "newAccount" @router / [post]

func (*AccountController) DeleteAccounts

func (o *AccountController) DeleteAccounts(accountDelete dt.AccountDelete)

@Title delete accounts by ids @Param accountDelete body dt.AccountDelete true "accountDelete" @router / [delete]

func (*AccountController) GetAccount

func (o *AccountController) GetAccount(id string)

@Title get an account by id @Param id path string true "id" @router /:id [get]

func (*AccountController) GetAllAccounts

func (o *AccountController) GetAllAccounts()

@Title get all accounts @router / [get]

func (*AccountController) UpdateAccounts

func (o *AccountController) UpdateAccounts(accountUpdate dt.AccountUpdate)

@Title update accounts by ids @Param accountUpdate body dt.AccountUpdate true "accountUpdate" @router / [put]

type AuthController

type AuthController struct {
	BaseController
}

func (*AuthController) Login

func (o *AuthController) Login(credential dt.AuthLogin)

@Title login user @Param credential body dt.AuthLogin true "credential" @router /login [post]

func (*AuthController) OauthGoogleCallback

func (o *AuthController) OauthGoogleCallback(state *string, code *string)

@Title callback with google @Param state query string true "state" @Param code query string true "code" @router /google/callback [get]

func (*AuthController) OauthGoogleLogin

func (o *AuthController) OauthGoogleLogin()

@Title login with google @router /google/login [get]

func (*AuthController) Register

func (o *AuthController) Register(newUser dt.AuthRegister)

@Title register user @Param newUser body dt.AuthRegister true "newUser" @router /register [post]

func (*AuthController) RequestResetUserPassword

func (o *AuthController) RequestResetUserPassword(requestResetUserPasswordBody dt.RequestResetUserPasswordBody)

@Title request reset password @Param requestResetUserPasswordBody body dt.RequestResetUserPasswordBody true "requestResetUserPasswordBody" @router /requestreset [post]

func (*AuthController) ResetUserPassword

func (o *AuthController) ResetUserPassword(resetUserPasswordBody dt.ResetUserPasswordBody)

@Title reset account password @Param resetUserPasswordBody body dt.ResetUserPasswordBody true "resetUserPasswordBody" @router /resetpassword [post]

func (*AuthController) VerifyUser

func (o *AuthController) VerifyUser(userId *string, verifyKey *string)

@Title verify user @Param userId query string true "userId" @Param verifyKey query string true "verifyKey" @router /verify [get]

type BaseController

type BaseController struct {
	beego.Controller
	UserId          primitive.ObjectID
	ResponseBuilder dt.ResponseBuilder
	Handler         *handlerPkg.Handler
}

func (*BaseController) Prepare

func (a *BaseController) Prepare()

type CategoryController

type CategoryController struct {
	BaseController
}

func (*CategoryController) CreateCategory

func (o *CategoryController) CreateCategory(newCategory dt.CategoryInsert)

@Title create new category @Param newCategory body dt.CategoryInsert true "newCategory" @router / [post]

func (*CategoryController) DeleteCategories

func (o *CategoryController) DeleteCategories(categoryDelete dt.CategoryDelete)

@Title delete categories by ids @Param categoryDelete body dt.CategoryDelete true "categoryDelete" @router / [delete]

func (*CategoryController) GetAllCategories

func (o *CategoryController) GetAllCategories()

@Title get all categories @router / [get]

func (*CategoryController) GetCategory

func (o *CategoryController) GetCategory(id string)

@Title get a category by id @Param id path string true "id" @router /:id [get]

func (*CategoryController) UpdateCategories

func (o *CategoryController) UpdateCategories(categoryUpdate dt.CategoryUpdate)

@Title update categories by ids @Param categoryUpdate body dt.CategoryUpdate true "categoryUpdate" @router / [put]

type GraphController

type GraphController struct {
	BaseController
}

func (*GraphController) GetTransactionAccountSummary

func (o *GraphController) GetTransactionAccountSummary(
	dateTimeStart *time.Time,
	dateTimeEnd *time.Time,
)

@Title get data for transaction graph by account @router /transaction/account [get]

func (*GraphController) GetTransactionCategorySummary

func (o *GraphController) GetTransactionCategorySummary(
	dateTimeStart *time.Time,
	dateTimeEnd *time.Time,
)

@Title get data for transaction graph by category @Param dateTimeStart query time.Time false "dateTimeStart" @Param dateTimeEnd query time.Time false "dateTimeEnd" @router /transaction/category [get]

func (*GraphController) MailTransactionSummary

func (o *GraphController) MailTransactionSummary(
	dateTimeStart *time.Time,
	dateTimeEnd *time.Time,
	email *string,
)

@Title get data for transaction graph by account @router /mail [get]

type TransactionController

type TransactionController struct {
	BaseController
}

func (*TransactionController) CreateTransaction

func (o *TransactionController) CreateTransaction(newTransaction dt.TransactionInsert)

@Title create new transaction @Param newTransaction body dt.TransactionInsert true "newTransaction" @router / [post]

func (*TransactionController) DeleteTransactions

func (o *TransactionController) DeleteTransactions(transactionDelete dt.TransactionDelete)

@Title delete transactions by ids @Param transactionDelete body dt.TransactionDelete true "transactionDelete" @router / [delete]

func (*TransactionController) ExportTransactions

func (o *TransactionController) ExportTransactions(
	dateTimeStart *time.Time,
	dateTimeEnd *time.Time,
)

@Title export transactions by downloadeding csv file @Param dateTimeStart query time.Time false "dateTimeStart" @Param dateTimeEnd query time.Time false "dateTimeEnd" @router /export [get]

func (*TransactionController) GetAccountsAndCategories

func (o *TransactionController) GetAccountsAndCategories()

@Title get accounts and categories @router /create [get]

func (*TransactionController) GetAllTransactions

func (o *TransactionController) GetAllTransactions(
	description *string,
	account *string,
	category *string,
	dateTimeStart *time.Time,
	dateTimeEnd *time.Time,
	amountMoreThan *float32,
	amountLessThan *float32,
	limit *int,
	afterCursor *string,
)

@Title get all transactions @Param description query string false "description" @Param account query string false "account" @Param category query string false "category" @Param dateTimeStart query time.Time false "dateTimeStart" @Param dateTimeEnd query time.Time false "dateTimeEnd" @Param limit query int false "limit" @Param afterCursor query string false "afterCursor" @router / [get]

func (*TransactionController) GetAllTransactionsForTable

func (o *TransactionController) GetAllTransactionsForTable(
	description *string,
	account *string,
	category *string,
	dateTimeStart *time.Time,
	dateTimeEnd *time.Time,
	amountMoreThan *float32,
	amountLessThan *float32,
	limit *int,
	afterCursor *string,
)

@Title get all transactions @Param description query string false "description" @Param account query string false "account" @Param category query string false "category" @Param dateTimeStart query time.Time false "dateTimeStart" @Param dateTimeEnd query time.Time false "dateTimeEnd" @Param limit query int false "limit" @Param afterCursor query string false "afterCursor" @router /table [get]

func (*TransactionController) GetSomeDescriptionAutocomplete

func (o *TransactionController) GetSomeDescriptionAutocomplete(description *string)

@Title get description autocomplete @Param description query sring false "description" @router /description/complete [get]

func (*TransactionController) GetTransaction

func (o *TransactionController) GetTransaction(id string)

@Title get a transaction by id @Param id path string true "id" @router /:id [get]

func (*TransactionController) GetTransactionWithAccountsCategoriesRecurrence

func (o *TransactionController) GetTransactionWithAccountsCategoriesRecurrence(id string)

@Title get a transaction by id with accounts and categories @Param id path string true "id" @router /edit/:id [get]

func (*TransactionController) ImportTransactions

func (o *TransactionController) ImportTransactions(transactionImport dt.TransactionImportCsv)

@Title import transactions through uploaded csv file @Param transactionImport body dt.TransactionImportCsv true "transactionImport" @router /import [post]

func (*TransactionController) UpdateTransactions

func (o *TransactionController) UpdateTransactions(transactionUpdate dt.TransactionUpdate)

@Title update transactions by ids @Param transactionUpdate body dt.TransactionUpdate true "transactionUpdate" @router / [put]

type UserController

type UserController struct {
	BaseController
}

func (*UserController) DeleteUser

func (o *UserController) DeleteUser(userDelete dt.UserDelete)

@Title delete a user by id @Param userDelete body dt.UserDelete true "userDelete" @router / [delete]

func (*UserController) GetUser

func (o *UserController) GetUser(id string)

@Title get a user by id @Param id path string true "id" @router /:id [get]

func (*UserController) UpdateUser

func (o *UserController) UpdateUser(userUpdate dt.UserUpdate)

@Title update a user by id @Param userUpdate body dt.UserDelete true "userUpdate" @router / [put]

Jump to

Keyboard shortcuts

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