Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCanvasSizes ¶
Types ¶
type Content ¶
type Content string
Content represents a raw string version of a roadmap
type DbReadWriter ¶
type FileFormat ¶
type FileFormat string
const ( SvgFormat FileFormat = "svg" PngFormat FileFormat = "png" PdfFormat FileFormat = "pdf" JpgFormat FileFormat = "jpg" GifFormat FileFormat = "gif" )
func NewFormatType ¶
func NewFormatType(t string) (FileFormat, error)
type Handler ¶
func NewHandler ¶
type IO ¶
type IO struct {
}
IO represents a persistence layer using the file system (or standard i/o)
type Milestone ¶
type Milestone struct {
Title string `json:"title"`
DeadlineAt *time.Time `json:"deadline_at,omitempty"`
Color *color.RGBA `json:"color,omitempty"`
URLs []string `json:"urls,omitempty"` // nolint
}
Milestone represents a milestone set for the roadmap
type MockDbReadWriter ¶
MockDbReadWriter is an autogenerated mock type for the DbReadWriter type
func (*MockDbReadWriter) Get ¶
func (_m *MockDbReadWriter) Get(c code.Code) (*Roadmap, error)
Get provides a mock function with given fields: c
func (*MockDbReadWriter) Write ¶
func (_m *MockDbReadWriter) Write(roadmap Roadmap) error
Write provides a mock function with given fields: roadmap
type Project ¶
type Project struct {
Indentation uint8 `json:"indentation"`
Title string `json:"title"`
Dates *Dates `json:"dates,omitempty"`
Color *color.RGBA `json:"color,omitempty"`
Percentage uint8 `json:"percentage"`
URLs []string `json:"urls,omitempty"` // nolint
Milestone uint8 `json:"milestone,omitempty"`
}
Project represents a project that belongs to a Roadmap
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
Repository represents a persistence layer using a database (Postgres)
func NewRepository ¶
func NewRepository(applicationName, dbHost, dbPort, dbName, dbUser, dbPass string, logQueries bool) Repository
NewRepository creates a Repository instance
func (Repository) Get ¶
func (drw Repository) Get(code code.Code) (*Roadmap, error)
Get retrieves a Roadmap from the database
func (Repository) Write ¶
func (drw Repository) Write(roadmap Roadmap) error
Write writes a roadmap to the database
type Roadmap ¶
type Roadmap struct {
ID uint64
PrevID *uint64
Title string
DateFormat string
BaseURL string
Projects []Project
Milestones []Milestone
CreatedAt time.Time
UpdatedAt time.Time
AccessedAt time.Time
}
Roadmap represents a roadmap, the main entity of Roadmapper
func (Roadmap) ToVisual ¶
func (r Roadmap) ToVisual() *VisualRoadmap
ToVisual converts a roadmap to a visual roadmap main difference between the two is that the visual roadmap will contain calculated values where possible