gdoc

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 24, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultHandler = &Handler{
	DefaultVersionName: "default",
	DocsDir:            "storage/docs",
	PrefixUri:          "docs",
}

Functions

func Handle

func Handle(name string, opts ...Option) []byte

func UseInGin

func UseInGin(r gin.IRouter)

Types

type Handler

type Handler struct {
	DefaultVersionName string
	DocsDir            string
	PrefixUri          string
	// contains filtered or unexported fields
}

func (*Handler) GetContent

func (h *Handler) GetContent(version string, p string) string

func (*Handler) GetSidebar

func (h *Handler) GetSidebar(version string) string

func (*Handler) GetStorageFilePath

func (h *Handler) GetStorageFilePath(name string) string

func (*Handler) GetVersion

func (h *Handler) GetVersion(version string) map[string]string

func (*Handler) Handle

func (h *Handler) Handle(name string, opts ...Option) []byte

func (*Handler) ParseSidebar

func (h *Handler) ParseSidebar(version string) map[string]map[string]string

type Option

type Option func(h *Handler)

func WithTitle

func WithTitle(t string) Option

WithTitle allows you to set the document title.

Directories

Path Synopsis
resources

Jump to

Keyboard shortcuts

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