blip

package
v0.0.0-...-7fd7830 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Quadrants = 4
	Tiers     = 4
)

Variables

This section is empty.

Functions

func Create

func Create(fsys rwfs.FS, name string, page *pageparser.ContentFrontMatter) error

func IsSourceFile

func IsSourceFile(name string) bool

func Read

func Read(fsys rwfs.FS, name string) (pageparser.ContentFrontMatter, error)

func Update

func Update(fsys rwfs.FS, name string, page *pageparser.ContentFrontMatter) error

Types

type BlipParameters

type BlipParameters struct {
	Quadrant string
	Tier     string
	Title    string
}

type Orientation

type Orientation = [2]float64

type Percentage

type Percentage = float64

type Position

type Position = Orientation

func CalculatePosition

func CalculatePosition(radar *RadarParameters, blip *BlipParameters) (Position, error)

type RadarOptions

type RadarOptions struct {
	// Tiers names of tiers from the innermost to the outermost
	Tiers [4]string

	// Quadrants names of quadrants in a clockwise order starting with the top-left one
	Quadrants [4]string

	// Proportion of each tier rim relative to the radar radius. It must sum to a 100%
	Proportion [4]Percentage

	// Angle maximum angle the blips will end up
	Angle float64

	// BlipRadius the radius of blips plotted on the radar
	BlipRadius float64

	// Radius the radar maximum radius
	Radius float64
}

type RadarParameters

type RadarParameters struct {
	QuadrantOrientation map[string]Orientation
	TierRadius          map[string]float64
	TierOffset          map[string]float64
	Angle               float64
	BlipRadius          float64
	Radius              float64
}

func NewRadar

func NewRadar(options RadarOptions) (*RadarParameters, error)

type Section

type Section string
const (
	Languages  Section = "languages"
	Platforms  Section = "platforms"
	Techniques Section = "techniques"
	Tools      Section = "tools"
)

func (*Section) Set

func (s *Section) Set(v string) error

func (Section) String

func (s Section) String() string

func (*Section) Type

func (s *Section) Type() string

type Tier

type Tier string
const (
	Adopt  Tier = "adopt"
	Assess Tier = "assess"
	Hold   Tier = "hold"
	Trial  Tier = "trial"
)

func (*Tier) Set

func (t *Tier) Set(v string) error

func (Tier) String

func (t Tier) String() string

func (*Tier) Type

func (t *Tier) Type() string

Jump to

Keyboard shortcuts

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