models

package
v0.0.0-...-b2cb109 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2014 License: Apache-2.0 Imports: 24 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 AddServer

func AddServer(sname string) error

func DelServer

func DelServer(id string) error

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()

func RegisterDB

func RegisterDB()

Types

type Category

type Category struct {
	Id              int64
	Title           string
	Created         time.Time `orm:"index"`
	Views           int64     `orm:"index"`
	TopicTime       time.Time `orm:"index"`
	TopicCount      int64
	TopicLastUserID int64
}

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
}

type Servers

type Servers struct {
	Id          int64
	Uid         int64
	Name        string
	Description string `orm:"size(300)"`
	Attachment  string
	//Created         time.Time `orm:"index"`
	//Updated         time.Time `orm:"index"`
	Views  int64 `orm:"index"`
	Author string
	//DelteTime       time.Time `orm:"index"`
	Cpu    int64
	Memory int64
}

func GetAllServerNmaes

func GetAllServerNmaes() ([]*Servers, error)

Jump to

Keyboard shortcuts

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