docs

package
v0.4.11 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Chapters []string = []string{"config", "api", "endpoints", "heartbeats", "notifications"}

Functions

This section is empty.

Types

type Cache

type Cache struct {
	MaxSize int `json:"maxSize"`
	Reduce  int `json:"reduce"`
}

Cache is the struct for the cache

type Default

type Default struct {
	Key         string `json:"key"`
	Description string `json:"description"`
	Example     string `json:"example"`
}

Notification is the struct for the heartbeats

type Docs

type Docs struct {
	SiteRoot   string      `json:"siteRoot"`
	Cache      *Cache      `json:"cache"`
	Endpoints  []Endpoint  `json:"endpoints"`
	Examples   []Example   `json:"examples"`
	Heartbeats []Heartbeat `json:"heartbeats"`
	Services   []Service   `json:"services"`
	Defaults   []Default   `json:"defaults"`
}

Docs is the struct for the documentation

var Documentation Docs

func NewDocumentation

func NewDocumentation(siteRoot string, cache *Cache) *Docs

NewDocumentation creates a new documentation

type Endpoint

type Endpoint struct {
	Path        string   `json:"path"`
	Methods     []string `json:"method"`
	Description string   `json:"description"`
}

Endpoint is the struct for the endpoints

type Example

type Example struct {
	Title            string         `json:"title"`
	Code             string         `json:"code"`
	Description      string         `json:"description"`
	QueryParameters  string         `json:"queryParameters"`
	QueryDescription string         `json:"queryDescription"`
	ResponseCodes    []ResponseCode `json:"responseCodes"`
}

Example is the struct for the examples

type Heartbeat

type Heartbeat struct {
	Key         string `json:"key"`
	Description string `json:"description"`
	Example     string `json:"example"`
}

Heartbeat is the struct for the heartbeats

type ResponseCode

type ResponseCode struct {
	Code        string `json:"code"`
	Description string `json:"description"`
}

ResponseCode is the struct for the response codes

type Service

type Service struct {
	Key         string `json:"key"`
	Description string `json:"description"`
	Example     string `json:"example"`
}

Notification is the struct for the heartbeats

Jump to

Keyboard shortcuts

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