models

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AutoMigrate

func AutoMigrate(providers []*types.Provider) error

AutoMigrate runs gorm auto migration

func CreateAllManagers

func CreateAllManagers(providers []*types.Provider) error

CreateAllManagers : Creates all resource managers

func CreateOrUpdateResources

func CreateOrUpdateResources(resources []*resource.Resource) error

CreateOrUpdateResources : Creates resource if it does not exists else updates it

func GetDB

func GetDB() *gorm.DB

GetDB returns database handler

func SetDB

func SetDB(dbConfig *config.DatabaseConfig)

SetDB establishes connection to database and saves its handler into db *sqlx.DB

Types

type Task

type Task struct {
	gorm.Model
	// Status of Execution: SUCCESS, RUNNING, ERROR
	Status string
	// Logfile stores path to logs of the execution
	LogFile string
}

Task model stores details about all tasks executed by Reka.

Jump to

Keyboard shortcuts

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