Documentation ¶
Index ¶
- Constants
- Variables
- func FormatCurrency(value int) string
- type DashboardData
- type DbTransaction
- type ErrInvalidForm
- type Member
- type Navbar
- type NavbarContext
- type NavbarWallet
- type Page
- type PaginatedResponse
- type Session
- type SettingsContext
- type SignInContext
- type Tag
- type TagBalance
- type TagsContext
- type Transaction
- type TransactionRender
- type TransactionsContext
- type TransactionsListRequest
- type User
- type UserCredentials
- type Wallet
- type WalletsContext
Constants ¶
View Source
const SessionCookieName = "session"
Variables ¶
Functions ¶
func FormatCurrency ¶
Types ¶
type DashboardData ¶
type DashboardData struct { Income int Outcome int Balance int NrTransactions int TagBalance []TagBalance }
type DbTransaction ¶
type DbTransaction struct { Id int `db:"id"` WalletId int `db:"wallet_id"` Name string `db:"name"` Value int `db:"value"` CreatedAt time.Time `db:"created_at"` TagId sql.NullInt32 `db:"tag_id"` }
func (*DbTransaction) ToModel ¶
func (dt *DbTransaction) ToModel() *Transaction
type ErrInvalidForm ¶
type ErrInvalidForm struct {
Message string
}
func (*ErrInvalidForm) Error ¶
func (e *ErrInvalidForm) Error() string
type NavbarContext ¶
type NavbarContext struct {}
type NavbarWallet ¶
type NavbarWallet struct {}
type PaginatedResponse ¶
type Session ¶
type Session struct { User *User `json:"user"` ExpiresAt time.Time `json:"expires_at"` Signature string `json:"-"` }
func SessionFromCookie ¶
type SettingsContext ¶
type SignInContext ¶
type TagBalance ¶
type TagsContext ¶
type TagsContext struct { Tags []*Tag }
type Transaction ¶
func (*Transaction) Render ¶
func (t *Transaction) Render() *TransactionRender
type TransactionRender ¶
type TransactionRender struct { Id int Name string Value string FormValue string Type string Tag *Tag FormTagId string CreatedAt string FormCreatedAt string }
func RenderTransactions ¶
func RenderTransactions(transactions []*Transaction) []*TransactionRender
type TransactionsContext ¶
type TransactionsListRequest ¶
type UserCredentials ¶
type WalletsContext ¶
type WalletsContext struct { Wallets []*Wallet }
Click to show internal directories.
Click to hide internal directories.