service

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultPaddingService

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

func NewPaddingService

func NewPaddingService(cfg *config.Config, rngSvc RNGService) (*DefaultPaddingService, error)

func (*DefaultPaddingService) Pad

func (s *DefaultPaddingService) Pad(slice []string) (string, error)

type DefaultPasswordGeneratorService

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

func NewPasswordGeneratorService

func NewPasswordGeneratorService(
	cfg *config.Config,
	transformerSvc TransformerService,
	separatorSvc SeparatorService,
	paddingSvc PaddingService,
	wordListSvc WordListService,
) (*DefaultPasswordGeneratorService, error)

func (*DefaultPasswordGeneratorService) Generate

func (s *DefaultPasswordGeneratorService) Generate() ([]string, error)

type DefaultRNGService

type DefaultRNGService struct{}

func NewRNGService

func NewRNGService() *DefaultRNGService

func (*DefaultRNGService) Generate

func (s *DefaultRNGService) Generate() (int, error)

func (*DefaultRNGService) GenerateSlice

func (s *DefaultRNGService) GenerateSlice(length int) ([]int, error)

func (*DefaultRNGService) GenerateSliceWithMax

func (s *DefaultRNGService) GenerateSliceWithMax(length, max int) ([]int, error)

func (*DefaultRNGService) GenerateWithMax

func (s *DefaultRNGService) GenerateWithMax(max int) (int, error)

type DefaultSeparatorService

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

func NewSeparatorService

func NewSeparatorService(cfg *config.Config, rngSvc RNGService) (*DefaultSeparatorService, error)

func (*DefaultSeparatorService) Separate

func (s *DefaultSeparatorService) Separate(slice []string) ([]string, error)

type DefaultTransformerService

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

func NewTransformerService

func NewTransformerService(cfg *config.Config, rngSvc RNGService) (*DefaultTransformerService, error)

func (*DefaultTransformerService) Transform

func (s *DefaultTransformerService) Transform(slice []string) ([]string, error)

type DefaultWordListService

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

func NewWordListService

func NewWordListService(cfg *config.Config, rngSvc RNGService) (*DefaultWordListService, error)

func (*DefaultWordListService) GetWords

func (s *DefaultWordListService) GetWords() ([]string, error)

type PaddingService

type PaddingService interface {
	Pad(slice []string) (string, error)
}

type PasswordGeneratorService

type PasswordGeneratorService interface {
	Generate() ([]string, error)
}

type RNGService

type RNGService interface {
	GenerateWithMax(max int) (int, error)
	Generate() (int, error)
	GenerateSlice(length int) ([]int, error)
	GenerateSliceWithMax(length, max int) ([]int, error)
}

type SeparatorService

type SeparatorService interface {
	Separate(slice []string) ([]string, error)
}

type TransformerService

type TransformerService interface {
	Transform(slice []string) ([]string, error)
}

type WordListService

type WordListService interface {
	GetWords() ([]string, error)
}

Jump to

Keyboard shortcuts

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