nametemplate

package
v0.0.0-...-a69e88d Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NameValues

type NameValues struct {
	ServiceName string
	Namespace   string
	TypeName    string
	Zone        string
}

TODO(infoblox): what's this?

type Template

type Template struct {

	// Element is a map of element name :: index in the segmented record name for the named element
	Element map[string]int
	// contains filtered or unexported fields
}

TODO(infoblox): docs

func (*Template) IsValid

func (t *Template) IsValid() bool

IsValid returns true if the template has all the required symbols, false otherwise.

func (*Template) NamespaceFromSegmentArray

func (t *Template) NamespaceFromSegmentArray(segments []string) string

NamespaceFromSegmentArray returns the namespace string from the segments.

func (*Template) RecordNameFromNameValues

func (t *Template) RecordNameFromNameValues(values NameValues) string

RecordNameFromNameValues returns the string produced by applying the values to the NameTemplate format string.

func (*Template) ServiceFromSegmentArray

func (t *Template) ServiceFromSegmentArray(segments []string) string

ServiceFromSegmentArray returns the service string from the segments.

func (*Template) SetTemplate

func (t *Template) SetTemplate(s string) error

TODO(infoblox): docs

func (*Template) TypeFromSegmentArray

func (t *Template) TypeFromSegmentArray(segments []string) string

TypeFromSegmentArray returns the type string from the segments.

func (*Template) ZoneFromSegmentArray

func (t *Template) ZoneFromSegmentArray(segments []string) string

ZoneFromSegmentArray returns the zone string from the segments.

Jump to

Keyboard shortcuts

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