Exemplo n.º 1
0
Arquivo: id.go Projeto: xh3b4sd/anna
// DefaultConfig provides a default configuration to create a new ID service
// object by best effort.
func DefaultConfig() Config {
	newConfig := Config{
		// Settings.
		HashChars:     "abcdef0123456789", // hex character set
		RandomService: random.MustNew(),
		Type:          Hex128,
	}

	return newConfig
}
Exemplo n.º 2
0
// DefaultCollectionConfig provides a default configuration to create a new
// service collection object by best effort.
func DefaultCollectionConfig() CollectionConfig {
	newConfig := CollectionConfig{
		// Dependencies.
		FSService:          mem.MustNew(),
		IDService:          id.MustNew(),
		PermutationService: permutation.MustNew(),
		RandomService:      random.MustNew(),
		TextInputService:   textinput.MustNew(),
		TextOutputService:  textoutput.MustNew(),
	}

	return newConfig
}