util

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2018 License: BSD-3-Clause Imports: 11 Imported by: 2

Documentation

Overview

Package util implements utility methods

Package util implements utility methods

Package util implements utility methods

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateDocs

func GenerateDocs(hugoDir string) error

GenerateDocs is a wrapper around the Hugo binary in the container and instructs the binary to generate the site

func GetAPIDoc

func GetAPIDoc(url string) (string, error)

GetAPIDoc performs an HTTP request to a specified URL to retrieve the OpenAPI document

func GetEnvKey

func GetEnvKey(key string, fallback string) string

GetEnvKey tries to get the specified key from the OS environment and returns either the value or the fallback that was provided

func HomeDir

func HomeDir() string

HomeDir gets the homedir of the current user

func WriteSwaggerToDisk

func WriteSwaggerToDisk(name string, apidoc string, svchost string, swaggerStore string, hugoStore string) error

WriteSwaggerToDisk takes a swagger document and writes both its content as well as a hugo template to disk to enable the static site to be updated with the new API

Types

This section is empty.

Jump to

Keyboard shortcuts

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