Documentation ¶
Index ¶
Constants ¶
View Source
const (
DB_NAME = "./data/risiti.db"
)
View Source
const (
RECEIPTS_PATH = "./data/"
)
View Source
const (
TOKEN_EXPIRATION_TIME = 24 * time.Hour
)
View Source
const (
YYYYMMDD = "2006-01-02"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthService ¶
type AuthService struct { JWTAuth *jwtauth.JWTAuth // contains filtered or unexported fields }
func NewAuthService ¶
func NewAuthService(secretKey []byte) AuthService
func (*AuthService) SignIn ¶
func (a *AuthService) SignIn(w *http.ResponseWriter, user *model.User) error
func (*AuthService) SignOut ¶
func (a *AuthService) SignOut(w *http.ResponseWriter)
type FileStorage ¶
type FileStorage struct{}
func NewFileStorage ¶
func NewFileStorage() *FileStorage
type IFileStorage ¶
type IReceiptService ¶
type IUserService ¶
type ReceiptService ¶
func NewReceiptService ¶
func NewReceiptService(db *sql.DB) *ReceiptService
func (*ReceiptService) ReadByName ¶
func (s *ReceiptService) ReadByName(name string) (model.Receipt, error)
func (*ReceiptService) ReadByText ¶
func (s *ReceiptService) ReadByText(text string) ([]model.Receipt, error)
type UserService ¶
func NewUserService ¶
func NewUserService(db *sql.DB) *UserService
func (*UserService) AnyExists ¶
func (s *UserService) AnyExists() (bool, error)
Click to show internal directories.
Click to hide internal directories.