naming_hint

package
v0.65.1 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NamingConstraints

type NamingConstraints struct {
	LowerCaseLetters  bool
	UpperCaseLetters  bool
	Numbers           bool
	SpecialCharacters string
	MaxLength         uint
}

func (*NamingConstraints) SplitCharacter added in v0.23.6

func (a *NamingConstraints) SplitCharacter() rune

type Translator

type Translator interface {
	Translate(input string) (string, error)
}

func NewNameHintTranslator

func NewNameHintTranslator(constraints *NamingConstraints) (Translator, error)

type UniqueGenerator

type UniqueGenerator interface {

	// Generate create unique and consistent name that can be used in the target data source to create access elements.
	// The argument ap is an access provider pointer. Each next ap that is provided to the class should have an ascending ID to guarantee a deterministic ID generation
	// The output is a map that will point AccessIDs to the unique generate name
	Generate(ap *sync_to_target.AccessProvider) (string, error)
}

func NewUniqueNameGenerator

func NewUniqueNameGenerator(logger hclog.Logger, prefix string, constraints *NamingConstraints) (UniqueGenerator, error)

NewUniqueNameGenerator will create an implementation of the UniqueGenerator interface. The UniqueGenerator will ensure the constraints provided in the first argument

Jump to

Keyboard shortcuts

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