repository

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GenericNote

type GenericNote struct {
	Id             int      `sql:"id,pk" json:"id"`
	Identifier     int      `sql:"identifier" json:"identifier" validate:"required"`
	IdentifierType NoteType `sql:"identifier_type,notnull" json:"identifierType"`
	Description    string   `sql:"description" json:"description"`
	sql.AuditLog
	// contains filtered or unexported fields
}

type GenericNoteHistory

type GenericNoteHistory struct {
	Id          int    `sql:"id,pk"`
	NoteId      int    `sql:"note_id"`
	Description string `sql:"description"`
	sql.AuditLog
	// contains filtered or unexported fields
}

type GenericNoteHistoryRepository

type GenericNoteHistoryRepository interface {
	sql.TransactionWrapper
	SaveHistory(tx *pg.Tx, model *GenericNoteHistory) error
	FindHistoryByNoteId(id []int) ([]GenericNoteHistory, error)
}

type GenericNoteHistoryRepositoryImpl

type GenericNoteHistoryRepositoryImpl struct {
	*sql.TransactionUtilImpl
	// contains filtered or unexported fields
}

func NewGenericNoteHistoryRepositoryImpl

func NewGenericNoteHistoryRepositoryImpl(dbConnection *pg.DB, TransactionUtilImpl *sql.TransactionUtilImpl) *GenericNoteHistoryRepositoryImpl

func (GenericNoteHistoryRepositoryImpl) FindHistoryByNoteId

func (impl GenericNoteHistoryRepositoryImpl) FindHistoryByNoteId(id []int) ([]GenericNoteHistory, error)

func (GenericNoteHistoryRepositoryImpl) SaveHistory

func (impl GenericNoteHistoryRepositoryImpl) SaveHistory(tx *pg.Tx, model *GenericNoteHistory) error

type GenericNoteRepository

type GenericNoteRepository interface {
	//transaction util funcs
	sql.TransactionWrapper
	Save(tx *pg.Tx, model *GenericNote) error
	FindByClusterId(id int) (*GenericNote, error)
	FindByAppId(id int) (*GenericNote, error)
	FindByIdentifier(identifier int, identifierType NoteType) (*GenericNote, error)
	Update(tx *pg.Tx, model *GenericNote) error
	GetGenericNotesForAppIds(appIds []int) ([]*GenericNote, error)
	GetDescriptionFromAppIds(appIds []int) ([]*GenericNote, error)
}

type GenericNoteRepositoryImpl

type GenericNoteRepositoryImpl struct {
	*sql.TransactionUtilImpl
	// contains filtered or unexported fields
}

func NewGenericNoteRepositoryImpl

func NewGenericNoteRepositoryImpl(dbConnection *pg.DB, TransactionUtilImpl *sql.TransactionUtilImpl) *GenericNoteRepositoryImpl

func (GenericNoteRepositoryImpl) FindByAppId

func (impl GenericNoteRepositoryImpl) FindByAppId(id int) (*GenericNote, error)

func (GenericNoteRepositoryImpl) FindByClusterId

func (impl GenericNoteRepositoryImpl) FindByClusterId(id int) (*GenericNote, error)

func (GenericNoteRepositoryImpl) FindByIdentifier

func (impl GenericNoteRepositoryImpl) FindByIdentifier(identifier int, identifierType NoteType) (*GenericNote, error)

func (GenericNoteRepositoryImpl) GetDescriptionFromAppIds

func (impl GenericNoteRepositoryImpl) GetDescriptionFromAppIds(appIds []int) ([]*GenericNote, error)

func (GenericNoteRepositoryImpl) GetGenericNotesForAppIds

func (impl GenericNoteRepositoryImpl) GetGenericNotesForAppIds(appIds []int) ([]*GenericNote, error)

func (GenericNoteRepositoryImpl) Save

func (impl GenericNoteRepositoryImpl) Save(tx *pg.Tx, model *GenericNote) error

func (GenericNoteRepositoryImpl) Update

func (impl GenericNoteRepositoryImpl) Update(tx *pg.Tx, model *GenericNote) error

type NoteType

type NoteType int
const AppType NoteType = 1
const ClusterType NoteType = 0

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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