pkg

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(crd *v1beta1.CustomResourceDefinition, w io.WriteCloser) (err error)

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.

func (*Server) URLHandler added in v0.1.0

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

URLHandler handles sharing urls.

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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