fakerenderer

package
v0.0.0-...-02c76fb Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeRenderer

type FakeRenderer struct {
	ID           string
	DotValue     resource.Value
	ValuePresent bool
}

FakeRenderer is a pass-through renderer for testing resources

func New

func New() *FakeRenderer

New gets a default FakeRenderer

func NewWithID

func NewWithID(id string) *FakeRenderer

NewWithID gets a FakeRenderer with the specified ID

func NewWithValue

func NewWithValue(val string) *FakeRenderer

NewWithValue gets a FakeRenderer with the appropriate value set

func (*FakeRenderer) GetID

func (fr *FakeRenderer) GetID() string

GetID returns the ID of this renderer

func (*FakeRenderer) Render

func (fr *FakeRenderer) Render(name, content string) (string, error)

Render returns whatever content is passed in

func (*FakeRenderer) Value

func (fr *FakeRenderer) Value() (resource.Value, bool)

Value returns the dotvalue

Jump to

Keyboard shortcuts

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