internal

package
v0.24.8 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2024 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Overview

Package main for atlas. Atlas provides a _very_ simple web browser of a story model.

Future work might include: * Parameterization of the story data source. * Moving from html templates to json gets.

  • ex. vue.js, custom css, etc.

* More data inspection views:

  • Links from aspect properties to aspect info.
  • Lists of nouns using selected traits.
  • ...

* Support for custom relations:

  • Containment, directions.
  • Graphical maps.

* Search ( ex. by name. ) * Inspecting in progress, or saved, games.

Index

Constants

This section is empty.

Variables

View Source
var AtlasTemplate = atlasTemplate
View Source
var Templates *template.Template = template.New("none").Funcs(funcMap)

Functions

func CreateAtlas

func CreateAtlas(db *sql.DB) (err error)

func CreateTestData

func CreateTestData(db *sql.DB) (err error)

func ListOfKinds

func ListOfKinds(w io.Writer, db *sql.DB) (err error)

Types

type Aspect

type Aspect struct {
	Name, Spec string
	Kinds      []string
	Traits     []Trait
}

type Kind

type Kind struct {
	Name, Path, Spec string
	Props            []Prop // newly introduced fields, or fields with new default values
	Nouns            []string
}

some things we could do: . an alphabetical index . a hierarchical, indented listing . headings per kind

func (Kind) Parent

func (k Kind) Parent() string

type Noun

type Noun struct {
	Name, Kind, Spec string
	Props            []Prop
	Relations        []string // list of relations involving the noun
}

type Pair

type Pair struct {
	First, Second string
}

type Pairing

type Pairing struct {
	Rel   *Relation
	Pairs []*Pair
}

type Prop

type Prop struct {
	Name, Value string
	Spec        sql.NullString
}

type Relation

type Relation struct {
	Name, Kind, Cardinality, OtherKind, Spec string
}

type Trait

type Trait struct {
	Name, Spec string
}

Jump to

Keyboard shortcuts

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