model

package
v0.0.0-...-e34bf40 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2017 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chooser

type Chooser struct {
}

Chooser A class that is responsible to choose between some files based on a rule.

func (*Chooser) WhichOne

func (c *Chooser) WhichOne(files []*os.File) *os.File

WhichOne chooses the newest file.

type Configuration

type Configuration struct {
	Properties []Property
}

Configuration A class that is responsible to load the config file properties.

func (*Configuration) For

func (c *Configuration) For(name string) string

For reads the value for a property name given.

type Parser

type Parser struct {
}

Parser A class to transform a requested resource/file in a new format.

func (*Parser) ToHTML

func (p *Parser) ToHTML(file *os.File) string

ToHTML transforms the .md file given to html.

type Property

type Property struct {
	Name  string
	Value string
}

Property type is responsible for getting property name and value.

type Searcher

type Searcher struct {
	// contains filtered or unexported fields
}

Searcher A class to search for a name on some folders.

func (*Searcher) LookFor

func (s *Searcher) LookFor(name string) string

LookFor searches for a requested file.

type Storage

type Storage struct {
	// contains filtered or unexported fields
}

Storage A class that is responsible to know the folders to store files.

func (Storage) FolderContent

func (s Storage) FolderContent(name string) string

FolderContent grasp the type of file that should be on a folder based on its name eg. ../resource/md/ folder should have .md files. so, a ../resource/md/myfile.md will as name will return .md here.

func (*Storage) Save

func (s *Storage) Save(name string, content []byte, here string)

Save a file in the storage using a _here_ path

func (*Storage) Where

func (s *Storage) Where() []string

Where return a list of folders where files are storaged.

Jump to

Keyboard shortcuts

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