Documentation
¶
Index ¶
- func GetCanvasSizes(fw, lh uint64) (uint64, uint64)
- func RenderImg(cvs *canvas.Canvas, fileFormat FileFormat) []byte
- type Content
- type Dates
- type DbReadWriter
- type FileFormat
- type Handler
- type IO
- type Milestone
- type MockDbReadWriter
- type Project
- type Repository
- type Roadmap
- type RoadmapExchange
- type VisualRoadmap
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" )
func NewFormatType ¶
func NewFormatType(t string) (FileFormat, error)
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
func NewMilestoneStub ¶ added in v0.10.0
type MockDbReadWriter ¶
MockDbReadWriter is an autogenerated mock type for the DbReadWriter type
func (*MockDbReadWriter) Create ¶ added in v0.9.0
func (_m *MockDbReadWriter) Create(roadmap Roadmap) error
Create 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
func NewProjectStub ¶ added in v0.10.0
type Repository ¶
type Repository struct {
repository.PgRepository
}
Repository represents a persistence layer using a database (Postgres)
func (Repository) Create ¶ added in v0.9.0
func (drw Repository) Create(roadmap Roadmap) error
Create 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) ToExchange ¶ added in v0.10.0
func (r Roadmap) ToExchange() RoadmapExchange
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
type RoadmapExchange ¶ added in v0.10.0
type RoadmapExchange struct { ID string `json:"id,omitempty"` PrevID *string `json:"prev_id,omitempty"` Title string `json:"title"` DateFormat string `json:"date_format"` BaseURL string `json:"base_url,omitempty"` Projects []Project `json:"projects,omitempty"` Milestones []Milestone `json:"milestones,omitempty"` }
Roadmap represents a roadmap, the main entity of Roadmapper
func NewRoadmapExchangeStub ¶ added in v0.10.0
func NewRoadmapExchangeStub(minProjects, minMilestones int, minDate, maxDate time.Time) RoadmapExchange
func (RoadmapExchange) ToRoadmap ¶ added in v0.10.0
func (re RoadmapExchange) ToRoadmap() Roadmap