renderer

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: Apache-2.0 Imports: 14 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.

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

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) 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

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

func (Functions) IsKubeType

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

func (*Functions) LinkForKnownType

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

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

func NewMarkdownRenderer

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

func (MarkdownRenderer) IsKubeType

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

func (MarkdownRenderer) LinkForKubeType

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

func (*MarkdownRenderer) Render

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

func (*MarkdownRenderer) RenderFieldDoc

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

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

func (*MarkdownRenderer) RenderValidation

func (m *MarkdownRenderer) RenderValidation(f *types.Field) string

func (*MarkdownRenderer) ShouldRenderType

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

func (*MarkdownRenderer) ToFuncMap

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