yaml

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadYamlDocFromFile

func LoadYamlDocFromFile(filename string, out interface{}, logger logging.Logger) (err error)

Types

type DutyAssignment

type DutyAssignment struct {
	OfficeSymbol  string  `yaml:"symbol"`
	Title         string  `yaml:"title"`
	CapwatchTitle *string `yaml:"capwatch_title"`
	MinGrade      *string `yaml:"min_grade"`
	MaxGrade      *string `yaml:"max_grade"`
	AsigneeCAPID  *uint   `yaml:"capid"`
}

type DutyAssignmentConfig

type DutyAssignmentConfig struct {
	DutyAssignments []DutyAssignment `yaml:"duty_assignments"`
}

func (DutyAssignmentConfig) DomainDutyAssignments

func (dac DutyAssignmentConfig) DomainDutyAssignments() (dutyAssignments map[string]pkg.DutyAssignment)

type DutyAssignmentNotDefinedError

type DutyAssignmentNotDefinedError struct {
	OfficeSymbol  string
	StaffGroup    string
	StaffSubGroup string
}

func (DutyAssignmentNotDefinedError) Error

func (err DutyAssignmentNotDefinedError) Error() (msg string)

type Element

type Element struct {
	Name              string         `yaml:"name"`
	ElementLeader     DutyAssignment `yaml:"leader"`
	AsstElementLeader DutyAssignment `yaml:"assistant"`
	Members           []uint         `yaml:"members"`
}

type Flight

type Flight struct {
	Name           string         `yaml:"name"`
	Commander      DutyAssignment `yaml:"cc"`
	FlightSergeant DutyAssignment `yaml:"ccf"`
	Elements       []Element      `yaml:"elements"`
}

type StaffGroup

type StaffGroup struct {
	Group     string          `yaml:"group"`
	Subgroups []StaffSubGroup `yaml:"subgroups"`
}

type StaffSubGroup

type StaffSubGroup struct {
	Subgroup      string           `yaml:"subgroup"`
	Leader        DutyAssignment   `yaml:"leader"`
	DirectReports []DutyAssignment `yaml:"direct_reports"`
}

type TableOfOrganization

type TableOfOrganization struct {
	Unit        Unit         `yaml:"unit"`
	StaffGroups []StaffGroup `yaml:"staff_groups"`
	Flights     []Flight     `yaml:"flights"`
	Inactive    []uint       `yaml:"inactive"`
}

func (TableOfOrganization) DomainTableOfOrganization

func (to TableOfOrganization) DomainTableOfOrganization(config map[string]pkg.DutyAssignment) (domainTO pkg.TableOfOrganization, err error)

type Unit

type Unit struct {
	Charter string `yaml:"charter"`
	Name    string `yaml:"name"`
}

Jump to

Keyboard shortcuts

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