models

package
v0.0.0-...-b811b28 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2015 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package models is for loading and updating documentation files.

Index

Constants

This section is empty.

Variables

View Source
var Products = new(products)

Functions

func GetBlog

func GetBlog(fullName, lang string) *docFile

GetBlog returns 'docFile' by given name and language version.

func GetDoc

func GetDoc(fullName, lang string) *docFile

GetDoc returns 'docFile' by given name and language version.

func InitModels

func InitModels()

Types

type DocList

type DocList []*DocNode

func (DocList) Len

func (s DocList) Len() int

func (DocList) Less

func (s DocList) Less(i, j int) bool

func (DocList) Swap

func (s DocList) Swap(i, j int)

type DocNode

type DocNode struct {
	IsDir       bool
	Path        string
	RelPath     string
	FileRelPath string
	FilePath    string
	Date        time.Time
	Name        string
	Sort        int
	Link        string
	Docs        DocList

	Root   *DocRoot
	Parent *DocNode
	// contains filtered or unexported fields
}

func (*DocNode) GetContent

func (d *DocNode) GetContent() string

func (*DocNode) HasContent

func (d *DocNode) HasContent() bool

func (*DocNode) SortDocs

func (d *DocNode) SortDocs()

type DocRoot

type DocRoot struct {
	Wd   string
	Path string
	Doc  *DocNode
	// contains filtered or unexported fields
}

func GetDocByLocale

func GetDocByLocale(lang string) *DocRoot

func ParseDocs

func ParseDocs(path string) (*DocRoot, error)
func (d *DocRoot) GetNodeByLink(link string) (*DocNode, bool)

type Project

type Project struct {
	Name      string
	Thumb     string
	Desc      string
	Url       string
	Src       string
	Submitter string
	Date      string
}

Jump to

Keyboard shortcuts

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