moduleRepo

package
v0.6.12 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: Apache-2.0 Imports: 2 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Module

type Module struct {
	Id        int       `sql:"id,pk"`
	Name      string    `sql:"name, notnull"`
	Version   string    `sql:"version, notnull"`
	Status    string    `sql:"status,notnull"`
	UpdatedOn time.Time `sql:"updated_on"`
	// contains filtered or unexported fields
}

type ModuleRepository

type ModuleRepository interface {
	Save(module *Module) error
	FindOne(name string) (*Module, error)
	Update(module *Module) error
	FindAll() ([]Module, error)
	ModuleExists() (bool, error)
	GetInstalledModuleNames() ([]string, error)
}

type ModuleRepositoryImpl

type ModuleRepositoryImpl struct {
	// contains filtered or unexported fields
}

func NewModuleRepositoryImpl

func NewModuleRepositoryImpl(dbConnection *pg.DB) *ModuleRepositoryImpl

func (ModuleRepositoryImpl) FindAll

func (impl ModuleRepositoryImpl) FindAll() ([]Module, error)

func (ModuleRepositoryImpl) FindAllByStatus

func (impl ModuleRepositoryImpl) FindAllByStatus(status string) ([]Module, error)

func (ModuleRepositoryImpl) FindOne

func (impl ModuleRepositoryImpl) FindOne(name string) (*Module, error)

func (ModuleRepositoryImpl) GetInstalledModuleNames

func (impl ModuleRepositoryImpl) GetInstalledModuleNames() ([]string, error)

func (ModuleRepositoryImpl) ModuleExists

func (impl ModuleRepositoryImpl) ModuleExists() (bool, error)

func (ModuleRepositoryImpl) Save

func (impl ModuleRepositoryImpl) Save(module *Module) error

func (ModuleRepositoryImpl) Update

func (impl ModuleRepositoryImpl) Update(module *Module) error

type ModuleResourceStatus added in v0.6.10

type ModuleResourceStatus struct {
	Id            int       `sql:"id,pk"`
	ModuleId      int       `sql:"module_id,notnull"`
	Group         string    `sql:"group, notnull"`
	Version       string    `sql:"version, notnull"`
	Kind          string    `sql:"kind, notnull"`
	Name          string    `sql:"name, notnull"`
	HealthStatus  string    `sql:"health_status"`
	HealthMessage string    `sql:"health_message"`
	Active        bool      `sql:"active"`
	CreatedOn     time.Time `sql:"created_on, notnull"`
	UpdatedOn     time.Time `sql:"updated_on"`
	// contains filtered or unexported fields
}

type ModuleResourceStatusRepository added in v0.6.10

type ModuleResourceStatusRepository interface {
	GetConnection() *pg.DB
	FindAllActiveByModuleId(moduleId int) ([]*ModuleResourceStatus, error)
	Update(status *ModuleResourceStatus, tx *pg.Tx) error
	Save(statuses []*ModuleResourceStatus, tx *pg.Tx) error
}

type ModuleResourceStatusRepositoryImpl added in v0.6.10

type ModuleResourceStatusRepositoryImpl struct {
	// contains filtered or unexported fields
}

func NewModuleResourceStatusRepositoryImpl added in v0.6.10

func NewModuleResourceStatusRepositoryImpl(dbConnection *pg.DB) *ModuleResourceStatusRepositoryImpl

func (ModuleResourceStatusRepositoryImpl) FindAllActiveByModuleId added in v0.6.10

func (impl ModuleResourceStatusRepositoryImpl) FindAllActiveByModuleId(moduleId int) ([]*ModuleResourceStatus, error)

func (ModuleResourceStatusRepositoryImpl) GetConnection added in v0.6.10

func (impl ModuleResourceStatusRepositoryImpl) GetConnection() *pg.DB

func (ModuleResourceStatusRepositoryImpl) Save added in v0.6.10

func (ModuleResourceStatusRepositoryImpl) Update added in v0.6.10

Jump to

Keyboard shortcuts

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