UserFuncs

package
v0.2.20 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActivateUser added in v0.2.17

func ActivateUser(id int) error

func CheckProhibitedUser added in v0.2.17

func CheckProhibitedUser(w http.ResponseWriter, r *http.Request) bool

assumes that the user is already validated

func DeactivateUser added in v0.2.17

func DeactivateUser(id int) error

func GetAllUsers

func GetAllUsers() ([]database.User, error)

func GetEndDateForUser added in v0.2.16

func GetEndDateForUser(id int) (database.Date, error)

func GetUserByEmail

func GetUserByEmail(email string) (database.User, error)

func GetUserByID

func GetUserByID(id int) (database.User, error)

func IsProhibited added in v0.2.17

func IsProhibited(id int) (bool, error)

func ProhibitUser added in v0.2.17

func ProhibitUser(id int) error

func UnprohibitUser added in v0.2.17

func UnprohibitUser(id int) error

Types

type Subscription added in v0.2.19

type Subscription struct {
	ID        string        `json:"id"`
	UserID    int           `json:"user_id"`
	StartDate database.Date `json:"start_date"`
	EndDate   database.Date `json:"end_date"`
	Active    bool          `json:"active"`
	Trial     bool          `json:"trial"`
	Used      bool          `json:"used"`
	Schedule  bool          `json:"schedule"`
}

subscription funs

func GetAllSubscriptions added in v0.2.19

func GetAllSubscriptions(userID int) ([]Subscription, error)

func (Subscription) String added in v0.2.19

func (s Subscription) String() string

type SubscriptionInterface added in v0.2.19

type SubscriptionInterface interface {
	Print() string
}

Jump to

Keyboard shortcuts

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