application

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: May 23, 2020 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddApplicationUsage

func AddApplicationUsage(app *AppCard)

AddApplicationUsage add usage

func GetApplicationUsed

func GetApplicationUsed(cookieVal string) ([]string, error)

GetApplicationUsed saved in cookie

func ReloadAppList

func ReloadAppList()

ReloadAppList reload app list

Types

type API

type API struct{}

API api endpoint

func (API) Dislike

func (API) Dislike(c *gin.Context)

Dislike /app/:name/dislike

func (API) Like

func (API) Like(c *gin.Context)

Like /app/:name/like

type AppCard

type AppCard struct {
	Name            string
	TemplateName    string
	ImageURL        string
	FontsAwesomeTag string
	Link            string
	Title           string
	Description     string
	Used            bool
	AmountUsed      uint64
	Liked           bool
	AmountLiked     uint64
}

AppCard used to render app card in pages

func GetApplicationsByName

func GetApplicationsByName(name string) *AppCard

GetApplicationsByName get application by name

type AppCategory

type AppCategory struct {
	Category string
	AppCards []*AppCard
}

AppCategory card list for single category

func GetAppList

func GetAppList() []*AppCategory

GetAppList get app list from redis

func GetApplicationWithLiked

func GetApplicationWithLiked(user *db.User) []*AppCategory

GetApplicationWithLiked get application with liked populated

type Page

type Page struct{}

Page logic

func (Page) RenderApplicationPage

func (Page) RenderApplicationPage(c *gin.Context)

RenderApplicationPage renders /app/:name

Jump to

Keyboard shortcuts

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