renderer

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Licensed to Elasticsearch B.V. under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. Elasticsearch B.V. licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed to Elasticsearch B.V. under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. Elasticsearch B.V. licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed to Elasticsearch B.V. under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. Elasticsearch B.V. licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AsciidoctorRenderer

type AsciidoctorRenderer struct {
	*Functions
	// contains filtered or unexported fields
}

func NewAsciidoctorRenderer

func NewAsciidoctorRenderer(conf *config.Config) (*AsciidoctorRenderer, error)

func (AsciidoctorRenderer) IsKubeType

func (k AsciidoctorRenderer) IsKubeType(t *types.Type) bool

func (AsciidoctorRenderer) LinkForKubeType

func (k AsciidoctorRenderer) LinkForKubeType(t *types.Type) string

func (*AsciidoctorRenderer) Render

func (*AsciidoctorRenderer) RenderAnchorID

func (adr *AsciidoctorRenderer) RenderAnchorID(id string) string
func (adr *AsciidoctorRenderer) RenderExternalLink(link, text string) string

func (*AsciidoctorRenderer) RenderFieldDoc added in v0.0.8

func (adr *AsciidoctorRenderer) RenderFieldDoc(text string) string
func (adr *AsciidoctorRenderer) RenderGVLink(gv types.GroupVersionDetails) string
func (adr *AsciidoctorRenderer) RenderLocalLink(prefix, link, text string) string

func (*AsciidoctorRenderer) RenderType

func (adr *AsciidoctorRenderer) RenderType(t *types.Type) string
func (adr *AsciidoctorRenderer) RenderTypeLink(t *types.Type) string

func (*AsciidoctorRenderer) RenderValidation added in v0.0.11

func (adr *AsciidoctorRenderer) RenderValidation(text string) string

func (*AsciidoctorRenderer) ShouldRenderType

func (adr *AsciidoctorRenderer) ShouldRenderType(t *types.Type) bool

func (*AsciidoctorRenderer) ToFuncMap

func (adr *AsciidoctorRenderer) ToFuncMap() template.FuncMap

type Functions

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

func NewFunctions

func NewFunctions(conf *config.Config) (*Functions, error)

func (*Functions) BasicTypeName

func (f *Functions) BasicTypeName(name string) string

func (*Functions) GroupVersionID

func (f *Functions) GroupVersionID(gv types.GroupVersionDetails) string

func (*Functions) IsKnownType added in v0.0.9

func (f *Functions) IsKnownType(t *types.Type) (*config.KnownType, bool)

func (Functions) IsKubeType

func (k Functions) IsKubeType(t *types.Type) bool

func (*Functions) LinkForKnownType added in v0.0.9

func (f *Functions) LinkForKnownType(kt *config.KnownType) string

func (Functions) LinkForKubeType

func (k Functions) LinkForKubeType(t *types.Type) string

func (*Functions) LinkForType

func (f *Functions) LinkForType(t *types.Type) (link string, local bool)

func (*Functions) SafeID

func (f *Functions) SafeID(id string) string

func (*Functions) SimplifiedTypeName

func (f *Functions) SimplifiedTypeName(t *types.Type) string

func (*Functions) TypeID

func (f *Functions) TypeID(t *types.Type) string

type MarkdownRenderer added in v0.0.8

type MarkdownRenderer struct {
	*Functions
	// contains filtered or unexported fields
}

func NewMarkdownRenderer added in v0.0.8

func NewMarkdownRenderer(conf *config.Config) (*MarkdownRenderer, error)

func (MarkdownRenderer) IsKubeType added in v0.0.8

func (k MarkdownRenderer) IsKubeType(t *types.Type) bool

func (MarkdownRenderer) LinkForKubeType added in v0.0.8

func (k MarkdownRenderer) LinkForKubeType(t *types.Type) string

func (*MarkdownRenderer) Render added in v0.0.8

func (*MarkdownRenderer) RenderDefault added in v0.0.11

func (m *MarkdownRenderer) RenderDefault(text string) string
func (m *MarkdownRenderer) RenderExternalLink(link, text string) string

func (*MarkdownRenderer) RenderFieldDoc added in v0.0.10

func (m *MarkdownRenderer) RenderFieldDoc(text string) string
func (m *MarkdownRenderer) RenderGVLink(gv types.GroupVersionDetails) string
func (m *MarkdownRenderer) RenderLocalLink(text string) string

func (*MarkdownRenderer) RenderType added in v0.0.8

func (m *MarkdownRenderer) RenderType(t *types.Type) string
func (m *MarkdownRenderer) RenderTypeLink(t *types.Type) string

func (*MarkdownRenderer) ShouldRenderType added in v0.0.8

func (m *MarkdownRenderer) ShouldRenderType(t *types.Type) bool

func (*MarkdownRenderer) ToFuncMap added in v0.0.8

func (m *MarkdownRenderer) ToFuncMap() template.FuncMap

type Renderer

type Renderer interface {
	Render(gvd []types.GroupVersionDetails) error
}

func New

func New(conf *config.Config) (Renderer, error)

Jump to

Keyboard shortcuts

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