data

package
v0.0.0-...-d994944 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2017 License: MIT Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileInfo

type FileInfo struct {
	Name    string      `json:"name"`
	Size    int64       `json:"size"`
	Mode    os.FileMode `json:"mode"`
	ModTime time.Time   `json:"mod_time"`
	IsDir   bool        `json:"is_dir"`
}

FileInfo is a struct created from os.FileInfo interface for serialization.

type Node

type Node struct {
	FullPath  string    `json:"path"`
	LocalPath string    `json:"local_path"`
	Info      *FileInfo `json:"info"`
	Children  []*Node   `json:"children"`
	IsDir     bool      `json:"is_dir"`
	Parent    *Node     `json:"-"`
}

Node represents a node in a directory tree.

type ProjectData

type ProjectData struct {
	Name              string // Project title
	Root              *Node  // Root fot parsed data
	ProjectRootFolder string // path to data folder
}

ProjectData is root object collects whole information about this project and used for TOC generation as well as HTML version build.

func New

func New() ProjectData

New is basic factory that build ProjectData object

func (*ProjectData) LoadData

func (p *ProjectData) LoadData()

LoadData will go through data dir and load all examples, parse Ruby & Go files Add Sections and Articles into ProjectData object for future use.

Directories

Path Synopsis
basics
cases

Jump to

Keyboard shortcuts

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