app

package
v0.0.0-...-6b47566 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppExists

func AppExists(ctx context.Context, app_name string) bool

func InitializeAppRestAPI

func InitializeAppRestAPI(res *huma.Resource) error

func InitializeApps

func InitializeApps()

Types

type App

type App struct {
	gorm.Model `json:"-"`
	AppDetails
	AssociatedUsers []*user.User `gorm:"many2many:app_user;"`
	Filters         []ApplicationFilters
}

func CreateApp

func CreateApp(ctx context.Context, app AppDetails) (newapp *App, err error)

func FindApp

func FindApp(ctx context.Context, app_name string) (app *App, err error)

func GetApps

func GetApps(ctx context.Context) []App

func (App) ProcessMessage

func (app App) ProcessMessage(ctx context.Context, msg *msg.Message) error

type AppDetails

type AppDetails struct {
	AppName     string `doc:"Application Name" pattern:"^[a-z0-9]+$" gorm:"unique;uniqueIndex"`
	Status      string `doc:"Status of Application" enum:"Enabled,Disabled" default:"Enabled"`
	Description string `doc:"Description of Application"`
	Icon        string `doc:"Icon of Application"`
	URL         string `doc:"URL of Application"`
}

type ApplicationFilters

type ApplicationFilters struct {
	gorm.Model `json:"-"`
	AppID      uint `json:"-"`
	Name       string
}

Jump to

Keyboard shortcuts

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