name_generator

package
v3.3.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func New

func New() (BasicInstance, SqlInstance)

Types

type BasicInstance

type BasicInstance interface {
	InstanceName() string
	InstanceNameWithSeparator(sep string) string
}

type BasicNameGenerator

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

func (*BasicNameGenerator) InstanceName

func (bng *BasicNameGenerator) InstanceName() string

func (*BasicNameGenerator) InstanceNameWithSeparator

func (bng *BasicNameGenerator) InstanceNameWithSeparator(sep string) string

type SqlInstance

type SqlInstance interface {
	BasicInstance
	DatabaseName() string
	GenerateUsername(instanceID, bindingID string) (string, error)
	GeneratePassword() (string, error)
}

type SqlNameGenerator

type SqlNameGenerator struct {
	BasicNameGenerator
}

func (*SqlNameGenerator) DatabaseName

func (sng *SqlNameGenerator) DatabaseName() string

func (*SqlNameGenerator) GeneratePassword

func (*SqlNameGenerator) GeneratePassword() (string, error)

func (*SqlNameGenerator) GenerateUsername

func (*SqlNameGenerator) GenerateUsername(instanceID, bindingID string) (string, error)

func (*SqlNameGenerator) InstanceName

func (sng *SqlNameGenerator) InstanceName() string

Jump to

Keyboard shortcuts

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