dashboard

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2022 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DatabaseName       string = "dashboard"
	DatabaseCollection string = "dashboard"
)

Variables

View Source
var (
	ErrFailedUpdatingDashboard error = errors.New("failed updating dashboard")
)

Functions

func DeletebyID

func DeletebyID(ID string) (*mongo.DeleteResult, error)

func SetCollationIndexes

func SetCollationIndexes() error

Types

type Dashboard

type Dashboard struct {
	ID          primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"`
	Name        string             `json:"name,omitempty" bson:"name,omitempty"`
	Description string             `json:"description,omitempty" bson:"description,omitempty"`
	Owner       string             `json:"owner,omitempty" bson:"owner,omitempty"`
	Projects    []Project          `json:"projects,omitempty" bson:"projects,omitempty"`
}

func SearchAll

func SearchAll() ([]Dashboard, error)

loadDashboard query a database to retrieve projects

func SearchbyID

func SearchbyID(ID string) (Dashboard, error)

func (*Dashboard) Init

func (d *Dashboard) Init() error

func (*Dashboard) Run

func (d *Dashboard) Run() error

func (Dashboard) Save

func (d Dashboard) Save() error

func (Dashboard) SaveByID

func (d Dashboard) SaveByID(ID string) (*mongo.UpdateResult, error)

type Project

type Project struct {
	ID          primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"`
	Name        string             `json:"name,omitempty" bson:"name,omitempty"`
	Description string             `json:"description,omitempty" bson:"description,omitempty"`
	Apps        []app.App          `json:"apps,omitempty" bson:"apps,omitempty"`
}

Jump to

Keyboard shortcuts

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