actions

package
v0.0.0-...-c869e04 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2020 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AUTH_COOKIE_KEY = envy.Get("BUDGETAL_COOKIE", "_budgetal_session")
View Source
var AUTH_HEADER_KEY = envy.Get("BUDGETAL_HEADER", "X-Budgetal-Session")
View Source
var COOKIE_DOMAIN = envy.Get("COOKIE_DOMAIN", "api.budgetal.com")
View Source
var ENV = envy.Get("GO_ENV", "development")
View Source
var StartTime = time.Now()

StartTime is the time the app booted

Functions

func AdminErrorPage

func AdminErrorPage(c buffalo.Context, currentUser *models.User) error

func AdminServerInfo

func AdminServerInfo(c buffalo.Context, currentUser *models.User) error

func AdminTestEmail

func AdminTestEmail(c buffalo.Context, currentUser *models.User) error

func AdminTestPushNotification

func AdminTestPushNotification(c buffalo.Context, currentUser *models.User) error

func AdminUsers

func AdminUsers(c buffalo.Context, currentUser *models.User) error

func AllowedMonth

func AllowedMonth(month int) bool

func AllowedNetWorthYear

func AllowedNetWorthYear(year int) bool

func AllowedYear

func AllowedYear(year int) bool

func AnnualBudgetItemsCreate

func AnnualBudgetItemsCreate(c buffalo.Context, currentUser *models.User) error

func AnnualBudgetItemsDelete

func AnnualBudgetItemsDelete(c buffalo.Context, currentUser *models.User) error

func AnnualBudgetItemsUpdate

func AnnualBudgetItemsUpdate(c buffalo.Context, currentUser *models.User) error

func AnnualBudgetsIndex

func AnnualBudgetsIndex(c buffalo.Context, currentUser *models.User) error

func App

func App() *buffalo.App

App is the "App"

func AssetsLiabilitiesCreate

func AssetsLiabilitiesCreate(c buffalo.Context, currentUser *models.User) error

AssetsLiabilitiesCreate creates an AssetLiability

func AssetsLiabilitiesDelete

func AssetsLiabilitiesDelete(c buffalo.Context, currentUser *models.User) error

AssetsLiabilitiesDelete deletes an AssetLiability and its items

func AssetsLiabilitiesUpdate

func AssetsLiabilitiesUpdate(c buffalo.Context, currentUser *models.User) error

AssetsLiabilitiesUpdate updates an AssetLiability

func BindParams

func BindParams(c buffalo.Context, params interface{}) error

func BudgetCategoryImport

func BudgetCategoryImport(c buffalo.Context, currentUser *models.User) error

func BudgetItemExpensesCreate

func BudgetItemExpensesCreate(c buffalo.Context, currentUser *models.User) error

func BudgetItemExpensesDelete

func BudgetItemExpensesDelete(c buffalo.Context, currentUser *models.User) error

func BudgetItemExpensesUpdate

func BudgetItemExpensesUpdate(c buffalo.Context, currentUser *models.User) error

func BudgetItemsCreate

func BudgetItemsCreate(c buffalo.Context, currentUser *models.User) error

func BudgetItemsDelete

func BudgetItemsDelete(c buffalo.Context, currentUser *models.User) error

func BudgetItemsUpdate

func BudgetItemsUpdate(c buffalo.Context, currentUser *models.User) error

func BudgetsIndex

func BudgetsIndex(c buffalo.Context, currentUser *models.User) error

func BudgetsUpdate

func BudgetsUpdate(c buffalo.Context, currentUser *models.User) error

func CorsPreware

func CorsPreware() *cors.Cors

func DeleteAuthenticationCookie

func DeleteAuthenticationCookie(res http.ResponseWriter)

func ErrorNotification

func ErrorNotification(err error, c buffalo.Context)

func GetCurrentUser

func GetCurrentUser(AuthenticationKey, AuthenticationToken string) *models.User

GetCurrentUser find a user from the database

func GetCurrentUserFromContext

func GetCurrentUserFromContext(c buffalo.Context) *models.User

GetCurrentUserFromContext returns the authenticated user from the headers

func Graphql

func Graphql(c buffalo.Context) error

Graphql is The Graphql Endpoint

func MonthlyStatisticsShow

func MonthlyStatisticsShow(c buffalo.Context, currentUser *models.User) error

func NetWorthItemsCreate

func NetWorthItemsCreate(c buffalo.Context, currentUser *models.User) error

NetWorthItemsCreate creates a Net worth item

func NetWorthItemsDelete

func NetWorthItemsDelete(c buffalo.Context, currentUser *models.User) error

NetWorthItemsDelete deletes a Net worth item

func NetWorthItemsUpdate

func NetWorthItemsUpdate(c buffalo.Context, currentUser *models.User) error

NetWorthItemsUpdate updates a Net worth item

func NetWorthsImport

func NetWorthsImport(c buffalo.Context, currentUser *models.User) error

NetWorthsImport creates and returns net worth items from a previous month for the current one

func NetWorthsIndex

func NetWorthsIndex(c buffalo.Context, currentUser *models.User) error

NetWorthsIndex returns assets and liabilties for a given year

func PasswordResetRequest

func PasswordResetRequest(c buffalo.Context) error

func PastExpenses

func PastExpenses(c buffalo.Context, currentUser *models.User) error

func RandomBytes

func RandomBytes(n int) []byte

func RandomHex

func RandomHex(s int) string

func RegisterUser

func RegisterUser(c buffalo.Context) error

func ResetPassword

func ResetPassword(c buffalo.Context) error

func SessionsDelete

func SessionsDelete(c buffalo.Context, currentUser *models.User) error

func SessionsIndex

func SessionsIndex(c buffalo.Context, currentUser *models.User) error

SessionsIndex default implementation.

func SetAuthenticationCookie

func SetAuthenticationCookie(res http.ResponseWriter, value uuid.UUID)

func SignIn

func SignIn(c buffalo.Context) error

SignIn default implementation.

func SignOut

func SignOut(c buffalo.Context, currentUser *models.User) error

SignOut default implementation.

func UsersChangePassword

func UsersChangePassword(c buffalo.Context, currentUser *models.User) error

func UsersUpdate

func UsersUpdate(c buffalo.Context, currentUser *models.User) error

func UsersUpdatePushNotificationToken

func UsersUpdatePushNotificationToken(c buffalo.Context, currentUser *models.User) error

Types

type AllSessionsResponse

type AllSessionsResponse struct {
	Active  []models.Session `json:"active"`
	Expired []models.Session `json:"expired"`
}

type Categories

type Categories []Category

func (Categories) Len

func (s Categories) Len() int

func (Categories) Less

func (s Categories) Less(i, j int) bool

func (Categories) Swap

func (s Categories) Swap(i, j int)

type Category

type Category struct {
	Name        string `json:"name" db:"name"`
	AmountSpent string `json:"amountSpent" db:"amount_spent"`
}

type User

type User struct {
	ID             int          `json:"-" db:"id"`
	Email          string       `json:"email" db:"email"`
	FirstName      nulls.String `json:"firstName" db:"first_name"`
	LastName       nulls.String `json:"lastName" db:"last_name"`
	LastSignIn     string       `json:"lastSignIn" db:"last_sign_in"`
	IP             string       `json:"ip" db:"last_ip"`
	Total          int          `json:"signInCount" db:"sign_in_count"`
	AvatarFileName nulls.String `json:"-" db:"avatar_file_name"`
	AvatarUrl      string       `json:"avatarUrl" db:"-"`
}

Jump to

Keyboard shortcuts

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