moduleRepo

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

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"`
	Enabled    bool      `sql:"enabled"`
	ModuleType string    `sql:"module_type"`
	// 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)
	FindByModuleTypeAndStatus(moduleType string, status string) error
	MarkModuleAsEnabledWithTransaction(moduleName string, tx *pg.Tx) error
	GetConnection() (dbConnection *pg.DB)
	MarkOtherModulesDisabledOfSameType(moduleName, moduleType string, tx *pg.Tx) error
	UpdateWithTransaction(module *Module, tx *pg.Tx) error
	SaveWithTransaction(module *Module, tx *pg.Tx) error
	MarkModuleAsEnabled(moduleName 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) FindByModuleTypeAndStatus added in v0.6.18

func (impl ModuleRepositoryImpl) FindByModuleTypeAndStatus(moduleType string, status string) error

func (ModuleRepositoryImpl) FindOne

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

func (ModuleRepositoryImpl) GetConnection added in v0.6.18

func (impl ModuleRepositoryImpl) GetConnection() (dbConnection *pg.DB)

func (ModuleRepositoryImpl) GetInstalledModuleNames

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

func (ModuleRepositoryImpl) MarkModuleAsEnabled added in v0.6.18

func (impl ModuleRepositoryImpl) MarkModuleAsEnabled(moduleName string) error

func (ModuleRepositoryImpl) MarkModuleAsEnabledWithTransaction added in v0.6.18

func (impl ModuleRepositoryImpl) MarkModuleAsEnabledWithTransaction(moduleName string, tx *pg.Tx) error

func (ModuleRepositoryImpl) MarkOtherModulesDisabledOfSameType added in v0.6.18

func (impl ModuleRepositoryImpl) MarkOtherModulesDisabledOfSameType(moduleName, moduleType string, tx *pg.Tx) error

func (ModuleRepositoryImpl) ModuleExists

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

func (ModuleRepositoryImpl) Save

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

func (ModuleRepositoryImpl) SaveWithTransaction added in v0.6.18

func (impl ModuleRepositoryImpl) SaveWithTransaction(module *Module, tx *pg.Tx) error

func (ModuleRepositoryImpl) Update

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

func (ModuleRepositoryImpl) UpdateWithTransaction added in v0.6.18

func (impl ModuleRepositoryImpl) UpdateWithTransaction(module *Module, tx *pg.Tx) 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