pkg

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

Generate takes a CRD content and path, and outputs

Types

type Error added in v0.0.7

type Error struct {
	Msg string
}

Error contains an HTML error message.

type Property

type Property struct {
	Name        string
	Description string
	Type        string
	Nullable    bool
	Patterns    string
	Format      string
	Indent      int
	Version     string
	Required    bool
	Properties  []*Property
}

Property builds up a Tree structure of embedded things.

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server wraps an address and creates a server around it.

func NewServer

func NewServer(address string) (*Server, error)

NewServer creates a new address wrapper.

func (*Server) FormHandler

func (s *Server) FormHandler(w http.ResponseWriter, r *http.Request)

FormHandler handles submits through the provided form and renders view.html.

func (*Server) IndexHandler

func (s *Server) IndexHandler(w http.ResponseWriter, r *http.Request)

IndexHandler handles all requests to / by rendering index.html.

func (*Server) Run

func (s *Server) Run() error

Run starts a simple http server.

type Version

type Version struct {
	Version     string
	Kind        string
	Group       string
	Properties  []*Property
	Description string
	YAML        string
}

Version wraps a top level version resource which contains the underlying openAPIV3Schema.

type ViewPage

type ViewPage struct {
	Versions []Version
}

ViewPage is the template for view.html.

Jump to

Keyboard shortcuts

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