app

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2019 License: Apache-2.0 Imports: 11 Imported by: 2

Documentation

Overview

Package app contains the app base

Index

Constants

View Source
const (
	// Version of the APIDoc
	Version string = "beta-0.3.5"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type App

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

App main structure

func New

func New(c Configuration) App

New application instance

func (*App) Extract

func (a *App) Extract() (ExtractResult, error)

Extract the documentation

func (*App) ReduceEndpoints added in v0.3.1

func (a *App) ReduceEndpoints(endpoints [][]token.Token) [][]token.Token

ReduceEndpoints filters out invalid endpoints

func (*App) Start

func (a *App) Start()

Start the application

func (*App) Tokenize

func (a *App) Tokenize(extract ExtractResult) (TokenizationResult, error)

Tokenize the extracted documentation

type Configuration

type Configuration struct {
	// Main documentation file
	MainFile string
	// Endpoints root folder
	EndsRoot string
	// Output documentation folder
	Output string
	// Verbose mode, i.e. show warnings
	Verbose bool
}

Configuration of the app

type ExtractResult

type ExtractResult struct {
	// Main API docmentation block
	Main extract.Block
	// Endpoints API documentation blocks
	Endpoints []extract.Block
}

ExtractResult of the documentation extraction

type TokenizationResult

type TokenizationResult struct {
	// Main holds tokens for the main API docmentation section
	Main []token.Token
	// Endpoints holds tokens each docmentation endpoint
	Endpoints [][]token.Token
}

TokenizationResult produced by token parser

Jump to

Keyboard shortcuts

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