autodocs

package module
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2019 License: Apache-2.0 Imports: 0 Imported by: 0

README

auto-docs

Maintainability Test Coverage

background

This project aims to be somewhat of a Knowledge Management system within an automated software development ecosystem.

configuration

By default, configuration is loaded from ~/.ad.yaml, but this file can be specified using the --config flag when running the command.

# Listen defines the listener string that the server will respond to.
# Generally, this will be a colon followed by the desired port.
Listen: ":8008"

# Name is the pretty name to use through the application. (Not used).
Name: "AutoDocs"

# Git is an object that defines attributes used for interacting
# with git.
Git:

  # URI is the remote location of the repository.
  URI: "git@github.com:CerealBoy/auto-docs.git"

  # Branch denotes the remote branch to use.
  Branch: "master"

  # LocalPath is a location on-disk for auto-docs to manage the repo.
  LocalPath: "/tmp/auto-docs-git"

  # SSHKey is the path to the private key to use for git auth.
  SSHKey: "/home/ad/.ssh/id_rsa"

  # Timeout is the maximum time to wait (in ms) for a pull request to
  # complete. (Not used).
  Timeout: 5000

  # Username is the user to connect to git with.
  Username: "git"

  # Password is used instead of SSH if specified. (Not used).
  Password: ""

  # Period is the length (in s) between pull requests.
  Period: 10

building

go-bindata is required to load binary data into the Go context, allowing for files to be deflated at runtime. To install this tool, a make target is provided.

make bin-prep

To compile the frontend components ready for binary compilation, another make target is available.

make build-fe

To build the bindata requirements, separate make targets are utilised.

make bin-dist

Once all bindata requirements are available, a series of binaries can be constructed from 1 makefile command.

make binaries

A series of binaries will then be available within the build/ directory.

To build the complete set of required binaries, and prepare all the necessary dependent components, a target is also available.

make complete-binaries

development

Running tests will require the frontend to be built, and bindata to be made available. These are captured in appropriate make targets, and summed up into a single test.

make test

For streamlined development, the frontend can be setup to make use of a watch task.

make dev-fe

A base target is available to compile the Go binary and execute it.

make dev-be

Documentation

Overview

Package autodocs houses a series of data structures shared through the Auto Docs application. These structures give a shared method of communicating across components.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Git captures details about working with git.
	Git Git

	// Listen contains the host:port for listening on HTTP
	// requests incoming.
	Listen string

	// Name is the identifier and brand for auto-docs.
	Name string
}

Config manages all configuration attributes for auto-docs.

type Git

type Git struct {
	// Branch is used for checking against a particular branch.
	// If not specified, master is used.
	Branch string

	// LocalPath contains a local location that is used to store
	// and interact with the repository.
	LocalPath string

	// Password is used for the username authentication.
	Password string

	// SSHKey captures a key for use with SSH authentication.
	SSHKey string

	// Timeout specifies length of time to wait before terminating
	// checking for an update.
	Timeout int

	// URI for the repository remote.
	URI string

	// Username captures the user to connect as.
	Username string

	// Period provides a way to specify the number of seconds
	// between polling git for new commits.
	Period int
}

Git is a structure to capture information about working with a git repository.

type Page

type Page struct {
	// Name is the displayable identifier for the page.
	Name string `json:"name"`

	// Content contains the parsed content for this page.
	Content string `json:"content"`
}

Page is a structure to store an individual page that has been processed and ready to be displayed.

Directories

Path Synopsis
Package main is where the base binary will be built from.
Package main is where the base binary will be built from.
data
Package data provides functionality to interact with sources of documentation data.
Package data provides functionality to interact with sources of documentation data.
docs
Package docs provides storage and retrieval for a series of data points based around a tree structure of page content.
Package docs provides storage and retrieval for a series of data points based around a tree structure of page content.
server
Package server provides capabilities to manage and process incoming HTTP requests.
Package server provides capabilities to manage and process incoming HTTP requests.

Jump to

Keyboard shortcuts

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