librarian

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2021 License: Apache-2.0 Imports: 32 Imported by: 0

README

Librarian

A GoAdmin plugin which see markdown docs.

中文文档

How To

CLI
  • download the cli
  • download the database and put the db in your project folder
  • set up nav.yml in your docs folder, here is an example
  • run:
./librarian --port=9055 --path=./docs
Use in your GoAdmin app

An example:

cd example
GO111MODULE=on go run main.go

visit: http://localhost:9033/admin/librarian

TODO

  • Document encryption
  • Edit the new document
  • Real-time monitor nav. Yml

Documentation

Index

Constants

View Source
const Name = "librarian"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Path           string `json:"path",yaml:"path",ini:"path"`
	Title          string `json:"title",yaml:"title",ini:"title"`
	Theme          string `json:"theme",yaml:"theme",ini:"theme"`
	Prefix         string `json:"prefix",yaml:"prefix",ini:"prefix"`
	BuildMenu      bool   `json:"build_menu",yaml:"build_menu",ini:"build_menu"`
	MenuUserRoleID int64  `json:"menu_user_role_id",yaml:"menu_user_role_id",ini:"menu_user_role_id"`
}

type Librarian

type Librarian struct {
	*plugins.Base
	// contains filtered or unexported fields
}

func NewLibrarian

func NewLibrarian(rootPath string, menuUserRoleID ...int64) *Librarian

func NewLibrarianWithConfig

func NewLibrarianWithConfig(cfg Config) *Librarian

func (*Librarian) AddRoot

func (l *Librarian) AddRoot(key string, value root.Root) *Librarian

func (*Librarian) GetFirstMenu

func (l *Librarian) GetFirstMenu() Menu

func (*Librarian) GetIndexURL

func (l *Librarian) GetIndexURL() string

func (*Librarian) GetSettingPage

func (l *Librarian) GetSettingPage() table.Generator

func (*Librarian) InitMenu

func (l *Librarian) InitMenu()

func (*Librarian) InitPlugin

func (l *Librarian) InitPlugin(srv service.List)

func (*Librarian) IsInstalled

func (l *Librarian) IsInstalled() bool
type Menu struct {
	Name string
	Path string
}

Directories

Path Synopsis
modules

Jump to

Keyboard shortcuts

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