Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ByName ¶
type ByName []Risk
ByName implements sort.Interface for []Risk based on the Name field.
type Repository ¶
type Repository interface { // GetRiskMatrix returns the risk matrix with the given ID GetRiskMatrix(int) (RiskMatrix, error) // GetRiskMatrixByPath returns a risk matrix with the specified image path GetRiskMatrixByPath(string) (RiskMatrix, error) // GetAllRiskMatrix returns all the risk matrix stored GetAllRiskMatrix() []RiskMatrix // GetAllRisks returns a list of all risks for a given RiskMatrix ID GetAllRisks(int) []Risk // GetRisk returns a risk with the given ID GetRisk(string) (Risk, error) // GetMediaPath returns the path where the media is stored GetMediaPath() (string, error) }
type RiskMatrix ¶
type RiskMatrix struct { ID int Path string Project string DateCreated time.Time MatImgWidth int MatImgHeight int MatNrRows int MatNrCols int MatSize int BorderWidth int Multiple int WordHeight int WordWidth int HighRiskColor color.RGBA MediumRiskColor color.RGBA LowRiskColor color.RGBA RiskLabelColor color.RGBA BorderColor color.RGBA }
type Service ¶
type Service interface { GetRiskMatrix(int) (RiskMatrix, error) GetRiskMatrixByPath(string) (RiskMatrix, error) GetAllRisks(int) []Risk GetRisk(string) (Risk, error) GetAllRiskMatrix() []RiskMatrix GetMediaPath() (string, error) }
Service provides risk matrix and risk listing operations
func NewService ¶
func NewService(r Repository) Service
NewService creates a listing service with the necessary dependencies
Click to show internal directories.
Click to hide internal directories.